/* ============================================
   Vii Landing Page - Dark Wood + Serif Theme
   A Payton Violins project — shares Payton's tonewood
   dark palette, gold accent, and serif/sans type pairing.
   ============================================ */

:root {
    --vii-bg: #2A2018;
    --vii-surface: #35291F;
    --vii-border: #4A3B2C;
    --vii-ink: #FAF8F5;
    --vii-ink-muted: #B8AFA3;
    --vii-gold: #CAA649;
    --vii-brass: #836721;
    --vii-font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --vii-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

    /* Aliases so the many inline var(--accent, #hex) / var(--text-secondary, #hex)
       fallbacks used throughout the public detail/learn pages resolve to the new
       palette instead of falling back to their old hard-coded hex values. */
    --accent: var(--vii-gold);
    --text-primary: var(--vii-ink);
    --text-secondary: var(--vii-ink-muted);
    --text-muted: var(--vii-ink-muted);
}

/* ---- SELF-HOSTED FONTS ---- */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
}

/* Reset & Base */
.landing-page {
    margin: 0;
    padding: 0;
    font-family: var(--vii-font-sans);
    color: var(--vii-ink-muted);
    background: var(--vii-bg);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.landing-page *,
.landing-page *::before,
.landing-page *::after {
    box-sizing: border-box;
}

.landing-page a {
    color: var(--vii-gold);
    text-decoration: none;
    transition: color 0.2s;
}

.landing-page a:hover {
    color: var(--vii-ink);
}

/* ---- NAV ---- */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(42, 32, 24, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--vii-border);
}

.landing-nav-brand {
    font-family: var(--vii-font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--vii-ink);
    letter-spacing: 0.03em;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.landing-nav-brand span {
    color: var(--vii-gold);
}

/* Spacing lives on the suffix, not a flex gap, so "V" and "ii" stay one word. */
.landing-nav-brand .brand-suffix {
    margin-left: 0.5rem;
    font-family: var(--vii-font-sans);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--vii-ink-muted);
    text-transform: none;
}

.landing-nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.landing-nav-links a {
    color: var(--vii-ink-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.landing-nav-links a:hover {
    color: var(--vii-ink);
}

.btn-nav-login {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--vii-gold);
    border-radius: 2px;
    color: var(--vii-gold) !important;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
}

.btn-nav-login:hover {
    background: var(--vii-gold);
    color: var(--vii-bg) !important;
}

/* ---- HERO ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 20%, rgba(202, 166, 73, 0.08) 0%, transparent 60%),
                var(--vii-bg);
}

/* Subtle grid, wood/gold toned */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(202, 166, 73, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(202, 166, 73, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Fireflies: gold flecks that rise slowly, drift sideways and twinkle.
   The outer .particle carries the rise; its ::before carries drift, glow and
   twinkle, so the three motions combine without fighting over `transform`.
   Only transform/opacity animate, so this stays on the compositor. */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    --size: 3px;
    --rise: 14s;
    --drift: 18px;
    --twinkle: 3.2s;
    position: absolute;
    bottom: 0;
    width: var(--size);
    height: var(--size);
    opacity: 0;
    animation: fireflyRise var(--rise) linear infinite;
    will-change: transform, opacity;
}

.particle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #f1d488;
    box-shadow:
        0 0 calc(var(--size) * 2) calc(var(--size) * 0.6) rgba(202, 166, 73, 0.55),
        0 0 calc(var(--size) * 6) calc(var(--size) * 1.5) rgba(202, 166, 73, 0.18);
    animation:
        fireflyDrift calc(var(--rise) / 2.5) ease-in-out infinite alternate,
        fireflyTwinkle var(--twinkle) ease-in-out infinite;
}

/* Position, size and timing per fly; staggered so they never move in step. */
.particle:nth-child(1)  { left: 6%;  --size: 3px; --rise: 16s; --drift: 22px;  --twinkle: 3.1s; animation-delay: -2s; }
.particle:nth-child(2)  { left: 14%; --size: 2px; --rise: 21s; --drift: -16px; --twinkle: 2.4s; animation-delay: -9s; }
.particle:nth-child(3)  { left: 22%; --size: 4px; --rise: 18s; --drift: 14px;  --twinkle: 4.2s; animation-delay: -5s; }
.particle:nth-child(4)  { left: 31%; --size: 2px; --rise: 24s; --drift: -24px; --twinkle: 2.8s; animation-delay: -14s; }
.particle:nth-child(5)  { left: 38%; --size: 3px; --rise: 15s; --drift: 18px;  --twinkle: 3.6s; animation-delay: -11s; }
.particle:nth-child(6)  { left: 46%; --size: 2px; --rise: 20s; --drift: -12px; --twinkle: 2.2s; animation-delay: -3s; }
.particle:nth-child(7)  { left: 53%; --size: 3px; --rise: 17s; --drift: 20px;  --twinkle: 3.9s; animation-delay: -13s; }
.particle:nth-child(8)  { left: 60%; --size: 4px; --rise: 22s; --drift: -20px; --twinkle: 4.6s; animation-delay: -7s; }
.particle:nth-child(9)  { left: 67%; --size: 2px; --rise: 19s; --drift: 16px;  --twinkle: 2.6s; animation-delay: -16s; }
.particle:nth-child(10) { left: 74%; --size: 3px; --rise: 16s; --drift: -18px; --twinkle: 3.3s; animation-delay: -1s; }
.particle:nth-child(11) { left: 81%; --size: 2px; --rise: 23s; --drift: 12px;  --twinkle: 2.9s; animation-delay: -18s; }
.particle:nth-child(12) { left: 88%; --size: 3px; --rise: 18s; --drift: -22px; --twinkle: 4.0s; animation-delay: -6s; }
.particle:nth-child(13) { left: 94%; --size: 2px; --rise: 20s; --drift: 14px;  --twinkle: 2.5s; animation-delay: -12s; }
.particle:nth-child(14) { left: 43%; --size: 3px; --rise: 25s; --drift: -14px; --twinkle: 3.7s; animation-delay: -20s; }

@keyframes fireflyRise {
    0%   { transform: translate3d(0, 10vh, 0);   opacity: 0; }
    12%  { opacity: 1; }
    80%  { opacity: 0.9; }
    100% { transform: translate3d(0, -95vh, 0);  opacity: 0; }
}

@keyframes fireflyDrift {
    from { transform: translateX(calc(var(--drift) * -1)); }
    to   { transform: translateX(var(--drift)); }
}

@keyframes fireflyTwinkle {
    0%, 100% { opacity: 0.35; }
    45%      { opacity: 1; }
    60%      { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-particles { display: none; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border: 1px solid rgba(202, 166, 73, 0.35);
    border-radius: 50px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--vii-gold);
    margin-bottom: 2rem;
    background: rgba(202, 166, 73, 0.06);
}

.hero h1 {
    font-family: var(--vii-font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 500;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    color: var(--vii-ink);
}

.hero h1 .accent {
    color: var(--vii-gold);
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--vii-ink-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-landing,
.landing-page a.btn-primary-landing {
    padding: 0.9rem 2.5rem;
    background: var(--vii-gold);
    color: var(--vii-bg) !important;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--vii-gold);
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    text-decoration: none;
}

.btn-primary-landing:hover,
.landing-page a.btn-primary-landing:hover {
    background: #DCB65C;
    border-color: #DCB65C;
    color: var(--vii-bg) !important;
}

.btn-secondary-landing {
    padding: 0.9rem 2.5rem;
    background: transparent;
    color: var(--vii-ink);
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid var(--vii-border);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    text-decoration: none;
}

.btn-secondary-landing:hover {
    border-color: var(--vii-gold);
    background: rgba(202, 166, 73, 0.06);
    color: var(--vii-ink);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 1.5rem;
    color: rgba(202, 166, 73, 0.5);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ---- SECTIONS (shared) ---- */
.landing-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--vii-gold);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--vii-font-serif);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    color: var(--vii-ink);
    margin: 0 0 1rem;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--vii-ink-muted);
    max-width: 600px;
    line-height: 1.6;
}

.section-desc.centered {
    margin: 0 auto;
    text-align: center;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--vii-border), transparent);
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- HOW IT WORKS ---- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: var(--vii-surface);
    border: 1px solid var(--vii-border);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}

.step-card:hover {
    border-color: var(--vii-gold);
    transform: translateY(-2px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background: rgba(202, 166, 73, 0.12);
    color: var(--vii-gold);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.step-card h3 {
    font-family: var(--vii-font-serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--vii-ink);
    margin: 0 0 0.75rem;
}

.step-card p {
    font-size: 0.95rem;
    color: var(--vii-ink-muted);
    line-height: 1.6;
    margin: 0;
}

/* ---- TECH / STATS ---- */
.tech-section {
    background: var(--vii-surface);
    border-top: 1px solid var(--vii-border);
    border-bottom: 1px solid var(--vii-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--vii-font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: var(--vii-gold);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--vii-ink-muted);
    margin-top: 0.5rem;
}

.tech-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tech-card {
    background: var(--vii-bg);
    border: 1px solid var(--vii-border);
    border-radius: 4px;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.tech-card:hover {
    border-color: var(--vii-gold);
}

.tech-card-icon {
    font-size: 1.5rem;
    color: var(--vii-gold);
    margin-bottom: 0.75rem;
}

.tech-card h4 {
    font-family: var(--vii-font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--vii-ink);
    margin: 0 0 0.5rem;
}

.tech-card p {
    font-size: 0.85rem;
    color: var(--vii-ink-muted);
    margin: 0;
    line-height: 1.5;
}

/* ---- ABOUT ---- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.about-text h3 {
    font-family: var(--vii-font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--vii-ink);
    margin: 0 0 1rem;
}

.about-text p {
    font-size: 1rem;
    color: var(--vii-ink-muted);
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

.about-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-stat-row {
    display: flex;
    gap: 1rem;
}

.about-stat {
    flex: 1;
    background: var(--vii-surface);
    border: 1px solid var(--vii-border);
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
}

.about-stat .stat-val {
    font-family: var(--vii-font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--vii-gold);
}

.about-stat .stat-lbl {
    font-size: 0.8rem;
    color: var(--vii-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ---- CTA / CONTACT ---- */
.cta-section {
    text-align: center;
    background: var(--vii-bg);
}

.cta-section .section-desc {
    margin: 0 auto 2.5rem;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--vii-surface);
    border: 1px solid var(--vii-border);
    border-radius: 2px;
    color: var(--vii-ink);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--vii-ink-muted);
    opacity: 0.7;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--vii-gold);
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form .btn-primary-landing {
    align-self: center;
    width: auto;
}

/* ---- FOOTER ---- */
.landing-footer {
    border-top: 1px solid var(--vii-border);
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: auto auto 0;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    font-family: var(--vii-font-serif);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--vii-ink);
}

.footer-brand span {
    color: var(--vii-gold);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--vii-ink-muted);
}

.footer-links a:hover {
    color: var(--vii-gold);
}

.footer-payton {
    display: flex;
    align-items: center;
}

.footer-payton img {
    height: 22px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-payton:hover img {
    opacity: 1;
}

.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--vii-border);
    font-size: 0.8rem;
    color: var(--vii-ink-muted);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 992px) {
    .steps-grid,
    .tech-cards {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .landing-nav-links a:not(.btn-nav-login) {
        display: none;
    }

    .landing-nav-brand .brand-suffix {
        display: none;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .landing-section {
        padding: 4rem 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary-landing,
    .btn-secondary-landing {
        width: 100%;
        text-align: center;
    }
}
