/* =============================================
   VectaMail Website — Light Theme
   Mirrors the iOS app's design system (SF Pro,
   system colors, spacing tokens).
   ============================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Colors (iOS light-mode equivalents) */
    --color-bg:              #F2F2F7;
    --color-surface:         #FFFFFF;
    --color-label-primary:   #000000;
    --color-label-secondary: #8E8E93;
    --color-label-tertiary:  #C7C7CC;
    --color-separator:       rgba(60, 60, 67, 0.12);
    --color-blue:            #007AFF;
    --color-purple:          #5856D6;
    --color-red:             #FF3B30;
    --color-green:           #34C759;
    --color-orange:          #FF9500;
    --ai-gradient-start:     #7B61FF;
    --ai-gradient-end:       #FF6B9D;

    /* Typography (matches VMFont) */
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                   "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* Spacing (VMSpacing tokens) */
    --sp-xs:  4px;
    --sp-sm:  6px;
    --sp-md:  8px;
    --sp-base: 10px;
    --sp-lg:  12px;
    --sp-xl:  14px;
    --sp-xl2: 16px;
    --sp-xl3: 20px;
    --sp-xl4: 24px;
    --sp-xl5: 32px;

    /* Radii (VMRadius) */
    --r-sm:  4px;
    --r-md:  8px;
    --r-lg:  12px;
    --r-xl:  14px;
    --r-xxl: 16px;
    --r-pill: 20px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-label-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: var(--color-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Animations ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Scroll-triggered reveal (JS adds .visible) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-stagger .feature-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.visible .feature-card:nth-child(1) { transition-delay: 0.0s; }
.reveal-stagger.visible .feature-card:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.visible .feature-card:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.visible .feature-card:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.visible .feature-card:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.visible .feature-card:nth-child(6) { transition-delay: 0.40s; }

.reveal-stagger.visible .feature-card {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Container ---------- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--sp-xl3);
}

.container--narrow {
    max-width: 720px;
}

/* ---------- Navigation ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(242, 242, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--color-separator);
    animation: fadeIn 0.5s ease;
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-label-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav__brand:hover { text-decoration: none; opacity: 0.8; }

.nav__logo {
    width: 32px;
    height: 32px;
    border-radius: var(--r-md);
    background: var(--color-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__logo svg {
    width: 22px;
    height: 22px;
}

.nav__brand:hover .nav__logo {
    transform: scale(1.1) rotate(-3deg);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: var(--sp-xl4);
    list-style: none;
}

.nav__links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-label-secondary);
    transition: color 0.2s;
    position: relative;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-blue);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__links a:hover {
    color: var(--color-label-primary);
    text-decoration: none;
}

.nav__links a:hover::after {
    width: 100%;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero__icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: var(--color-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-xl4);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.22);
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both,
               float 4s ease-in-out 1s infinite;
}

.hero__icon svg {
    width: 56px;
    height: 56px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: var(--sp-xl2);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--color-blue), var(--color-purple), var(--ai-gradient-end));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

.hero__subtitle {
    font-size: 19px;
    color: var(--color-label-secondary);
    max-width: 520px;
    margin: 0 auto var(--sp-xl5);
    line-height: 1.55;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-md);
    background: var(--color-label-primary);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: var(--r-pill);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s ease;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

.hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-decoration: none;
    color: #fff;
}

.hero__cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero__cta svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* ---------- Features ---------- */
.features {
    padding: 40px 0 60px;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-xl3);
}

.feature-card {
    background: var(--color-surface);
    border-radius: var(--r-xxl);
    padding: var(--sp-xl4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.feature-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-xl2);
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .feature-card__icon {
    transform: scale(1.1);
}

.feature-card__icon--blue   { background: rgba(0,122,255,0.1); color: var(--color-blue); }
.feature-card__icon--purple { background: rgba(88,86,214,0.1); color: var(--color-purple); }
.feature-card__icon--green  { background: rgba(52,199,89,0.1); color: var(--color-green); }
.feature-card__icon--orange { background: rgba(255,149,0,0.1); color: var(--color-orange); }
.feature-card__icon--red    { background: rgba(255,59,48,0.1); color: var(--color-red); }
.feature-card__icon--ai     { background: rgba(123,97,255,0.08); color: var(--ai-gradient-start); }

.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: var(--sp-sm);
}

.feature-card p {
    font-size: 15px;
    color: var(--color-label-secondary);
    line-height: 1.55;
}

/* ---------- Privacy Banner ---------- */
.privacy-banner {
    background: var(--color-surface);
    border-radius: var(--r-xxl);
    padding: 48px 40px;
    text-align: center;
    margin-bottom: 60px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease;
}

.privacy-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* Subtle gradient accent line at top */
.privacy-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-blue), var(--color-purple));
}

.privacy-banner h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: var(--sp-md);
}

.privacy-banner p {
    font-size: 15px;
    color: var(--color-label-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.55;
}

/* ---------- Footer ---------- */
.footer {
    border-top: 0.5px solid var(--color-separator);
    padding: var(--sp-xl5) 0 var(--sp-xl4);
    text-align: center;
    font-size: 13px;
    color: var(--color-label-tertiary);
}

.footer a {
    color: var(--color-label-secondary);
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--color-label-primary);
    text-decoration: none;
}

.footer__links {
    display: flex;
    justify-content: center;
    gap: var(--sp-xl4);
    margin-bottom: var(--sp-lg);
}

/* ---------- Privacy Policy Page ---------- */
.policy {
    padding: 48px 0 60px;
}

.policy__header {
    margin-bottom: var(--sp-xl5);
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.policy__header h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: var(--sp-sm);
}

.policy__header .meta {
    font-size: 13px;
    color: var(--color-label-tertiary);
}

.policy__section {
    margin-bottom: var(--sp-xl5);
    padding-bottom: var(--sp-xl4);
    border-bottom: 0.5px solid var(--color-separator);
}

.policy__section:last-child {
    border-bottom: none;
}

.policy__section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--sp-lg);
}

.policy__section p,
.policy__section ul {
    font-size: 15px;
    color: var(--color-label-secondary);
    line-height: 1.7;
}

.policy__section p + p,
.policy__section ul + p {
    margin-top: var(--sp-lg);
}

.policy__section ul {
    padding-left: var(--sp-xl3);
    margin-top: var(--sp-md);
}

.policy__section ul li {
    margin-bottom: var(--sp-md);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero { padding: 48px 0 40px; }
    .hero h1 { font-size: 36px; }
    .hero__subtitle { font-size: 17px; }
    .hero__icon { width: 72px; height: 72px; border-radius: 18px; }
    .hero__icon svg { width: 36px; height: 36px; }

    .features__grid {
        grid-template-columns: 1fr;
        gap: var(--sp-xl2);
    }

    .privacy-banner { padding: var(--sp-xl4); }

    .nav__links { gap: var(--sp-xl2); }

    .policy__header h1 { font-size: 28px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 28px; letter-spacing: -0.5px; }
    .container { padding: 0 var(--sp-xl2); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .reveal-stagger .feature-card { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
