/* ==============================================
   Family Photo Archive — Landing Page Styles
   landing.css
   ============================================== */


/* -----------------------------------------------
   1. DESIGN TOKENS
----------------------------------------------- */
:root {
    /* Palette */
    --color-primary:        #5C7A5C;   /* Muted Sage Green */
    --color-secondary:      #7A8C6E;   /* Dusty Olive */
    --color-accent:         #B5956A;   /* Muted Warm Gold */
    --color-bg:             #F2EDE4;   /* Warm Cream */
    --color-surface:        #FAFAF8;   /* Soft White */
    --color-text:           #333330;   /* Charcoal */
    --color-text-secondary: #6B6B63;   /* Warm Grey */
    --color-border:         #D9D2C5;   /* Light Taupe */

    /* Hero-specific darks */
    --color-hero-bg:        #1C1A14;   /* Deep sepia-black */
    --color-hero-mid:       #2E2A1E;   /* Warm dark brown */
    --color-hero-text:      #F2EDE4;   /* Cream on dark */

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Roboto', system-ui, sans-serif;

    /* Type scale */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-md:   1.125rem;
    --text-lg:   1.375rem;
    --text-xl:   1.75rem;
    --text-2xl:  2.25rem;
    --text-3xl:  3rem;
    --text-4xl:  4rem;

    /* Spacing */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Borders */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}


/* -----------------------------------------------
   2. RESET & BASE
----------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

/* -----------------------------------------------
   3. LAYOUT UTILITIES
----------------------------------------------- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}


/* -----------------------------------------------
   4. BUTTON SYSTEM
----------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background-color var(--transition-base),
                color var(--transition-base),
                border-color var(--transition-base),
                box-shadow var(--transition-base);
    white-space: nowrap;
}

/* Sizes */
.btn-sm  { padding: var(--space-2) var(--space-4); }
.btn-md  { padding: var(--space-3) var(--space-6); }
.btn-lg  { padding: var(--space-4) var(--space-8); font-size: var(--text-sm); }

/* Primary — sage green */
.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background-color: #4a6349;
    border-color: #4a6349;
}

/* Gold — accent CTA */
.btn-gold {
    background-color: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-gold:hover {
    background-color: #a0804f;
    border-color: #a0804f;
}

/* Ghost — nav, light context */
.btn-ghost {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-ghost:hover {
    background-color: var(--color-border);
}

/* Outline light — for use on dark hero */
.btn-outline-light {
    background-color: transparent;
    color: var(--color-hero-text);
    border-color: rgba(242, 237, 228, 0.5);
}
.btn-outline-light:hover {
    background-color: rgba(242, 237, 228, 0.1);
    border-color: rgba(242, 237, 228, 0.8);
}

/* Ghost dark — for use on cream/light backgrounds */
.btn-ghost-dark {
    background-color: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-ghost-dark:hover {
    background-color: rgba(0,0,0,0.05);
}


/* -----------------------------------------------
   5. TOP NAVIGATION
----------------------------------------------- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(28, 26, 20, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background-color var(--transition-base);
}

/* Nav becomes cream when scrolled past hero */
.site-nav.scrolled {
    background-color: rgba(242, 237, 228, 0.96);
    border-bottom-color: var(--color-border);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-mark {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    background-color: rgba(181, 149, 106, 0.15);
    border: 1px solid rgba(181, 149, 106, 0.4);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    line-height: 1;
}

.logo-mark--sm {
    font-size: var(--text-xs);
    padding: 2px var(--space-2);
}

.logo-name {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-hero-text);
    letter-spacing: 0.01em;
    transition: color var(--transition-base);
}

/* Logo name turns dark after scroll */
.site-nav.scrolled .logo-name {
    color: var(--color-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Nav ghost button needs to be cream-text on dark bg */
.site-nav .btn-ghost {
    color: rgba(242, 237, 228, 0.85);
    border-color: rgba(242, 237, 228, 0.25);
}
.site-nav .btn-ghost:hover {
    background-color: rgba(242, 237, 228, 0.1);
    color: var(--color-hero-text);
}

/* After scroll, ghost becomes standard dark */
.site-nav.scrolled .btn-ghost {
    color: var(--color-text);
    border-color: var(--color-border);
}
.site-nav.scrolled .btn-ghost:hover {
    background-color: var(--color-border);
}


/* -----------------------------------------------
   6. HERO SECTION
----------------------------------------------- */
.hero {
    position: relative;
    min-height: 100svh;
    background-color: var(--color-hero-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    /* Archival gradient — warm sepia darks, subtle radial glow at center */
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 40%, #3a3020 0%, var(--color-hero-bg) 70%);
}

/* CSS grain texture — the signature archival element */
.hero-grain {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;

    /* SVG-based noise filter — no image needed */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.55;
    mix-blend-mode: overlay;
}

/* Dark edge vignette for depth */
.hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 100% 100% at 50% 50%,
            transparent 40%,
            rgba(10, 9, 6, 0.6) 100%);
}

/* Film strip decoration — left and right edges */
.film-strip {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.45);
    border: none;
    gap: 0;
    justify-content: center;
}

.film-strip--left  { left: 0; }
.film-strip--right { right: 0; }

/* Sprocket holes */
.film-holes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
}

.film-holes span {
    display: block;
    width: 14px;
    height: 10px;
    border-radius: 2px;
    background-color: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.06);
}

/* Blank film frames */
.film-frames {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    width: 100%;
    padding: 0 6px;
    justify-content: center;
}

.film-frame {
    flex: 1;
    max-height: 80px;
    background-color: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1px;
}

/* Hero text content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: var(--space-32) var(--space-8) var(--space-20);
    max-width: 720px;
}

.hero-eyebrow {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-4);

    /* Subtle gold rule either side */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background-color: var(--color-accent);
    opacity: 0.5;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 7vw, var(--text-4xl));
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-hero-text);
    margin-bottom: var(--space-6);
    letter-spacing: -0.01em;
}

.hero-headline em {
    font-style: italic;
    color: var(--color-accent);
}

.hero-subtext {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: 300;
    color: rgba(242, 237, 228, 0.7);
    max-width: 520px;
    margin: 0 auto var(--space-10);
    line-height: 1.8;
    margin-bottom: var(--space-8);
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: rgba(242, 237, 228, 0.35);
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-arrow {
    animation: scrollBounce 2s ease-in-out infinite;
    font-size: var(--text-base);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(5px); }
}


/* -----------------------------------------------
   7. ABOUT SECTION
----------------------------------------------- */
.about {
    padding: var(--space-24) 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.section-eyebrow {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: var(--space-3);
}

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text);
    margin-bottom: var(--space-6);
}

.body-text {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-4);
}

.about-text .btn {
    margin-top: var(--space-4);
}

/* --- Polaroid Stack --- */
.polaroid-stack {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.polaroid {
    position: absolute;
    background-color: var(--color-surface);
    padding: 12px 12px 40px;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.12),
        0 1px 3px rgba(0,0,0,0.08);
    width: 200px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.polaroid:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 10;
}

.polaroid--back  {
    transform: rotate(-7deg) translate(-20px, 10px);
    z-index: 1;
}
.polaroid--mid   {
    transform: rotate(3deg) translate(25px, -10px);
    z-index: 2;
}
.polaroid--front {
    transform: rotate(-1deg) translate(-5px, -5px);
    z-index: 3;
}

.polaroid-img {
    width: 100%;
    height: 160px;
    background-color: var(--color-border);

    /* Faint sepia gradient to suggest an aged photo */
    background-image: linear-gradient(
        135deg,
        #d6cfc4 0%,
        #c4b89a 40%,
        #b8a882 60%,
        #cec4b0 100%
    );
}

.polaroid-caption {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-style: italic;
    color: var(--color-text-secondary);
    text-align: center;
    margin-top: var(--space-3);
    letter-spacing: 0.02em;
}


/* -----------------------------------------------
   8. FEATURES SECTION
----------------------------------------------- */
.features {
    padding: var(--space-24) 0;
    background-color: var(--color-bg);
}

.features-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.feature-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px rgba(181, 149, 106, 0.12);
}

.feature-icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--space-4);
    color: var(--color-primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-3);
    line-height: 1.3;
}

.feature-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.75;
}


/* -----------------------------------------------
   9. CLOSING CTA BAND
----------------------------------------------- */
.cta-band {
    padding: var(--space-20) 0;
    background-color: var(--color-hero-bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 50%, #2e2a1e 0%, var(--color-hero-bg) 70%);
    position: relative;
    overflow: hidden;
}

/* Reuse grain on CTA band */
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.cta-band-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta-band-heading {
    font-family: var(--font-display);
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    font-weight: 400;
    color: var(--color-hero-text);
    margin-bottom: var(--space-4);
}

.cta-band-sub {
    font-size: var(--text-md);
    font-weight: 300;
    color: rgba(242, 237, 228, 0.65);
    margin-bottom: var(--space-8);
}

.cta-band-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}


/* -----------------------------------------------
   10. FOOTER
----------------------------------------------- */
.site-footer {
    background-color: var(--color-hero-bg);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: var(--space-8) 0;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.footer-tagline {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    color: rgba(242, 237, 228, 0.5);
    font-style: italic;
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-links a {
    font-size: var(--text-sm);
    color: rgba(242, 237, 228, 0.45);
    letter-spacing: 0.04em;
    transition: color var(--transition-fast);
}

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

.footer-copy {
    font-size: var(--text-xs);
    color: rgba(242, 237, 228, 0.25);
    letter-spacing: 0.04em;
}


/* -----------------------------------------------
   11. SCROLL REVEAL ANIMATIONS
----------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children in features grid */
.feature-card:nth-child(1) { transition-delay: 0ms; }
.feature-card:nth-child(2) { transition-delay: 80ms; }
.feature-card:nth-child(3) { transition-delay: 160ms; }
.feature-card:nth-child(4) { transition-delay: 240ms; }
.feature-card:nth-child(5) { transition-delay: 320ms; }
.feature-card:nth-child(6) { transition-delay: 400ms; }


/* -----------------------------------------------
   12. REDUCED MOTION
----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}


/* -----------------------------------------------
   13. RESPONSIVE
----------------------------------------------- */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .polaroid-stack {
        height: 260px;
        margin-top: var(--space-8);
    }

    .polaroid {
        width: 160px;
    }

    .polaroid-img {
        height: 120px;
    }

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

@media (max-width: 600px) {
    .film-strip {
        width: 36px;
    }

    .film-holes span {
        width: 10px;
        height: 7px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding-left: var(--space-12);
        padding-right: var(--space-12);
    }

    .about {
        padding: var(--space-16) 0;
    }

    .about-grid {
        gap: var(--space-8);
    }

    .nav-links .btn-ghost {
        display: none; /* collapse Sign In on very small screens, keep Redeem */
    }

    .footer-links {
        gap: var(--space-4);
    }
}
