/* ============================================================
   eyes.cash — 1970s desert optometrist showroom
   ============================================================ */

:root {
    --terracotta: #8B3A2F;
    --parchment: #F5E6D3;
    --walnut: #3B2318;
    --cream: #FAF0E4;
    --umber: #2C1810;
    --copper: #B87333;
    --gold: #C4943A;
    --sage: #6B5B4E;

    --bg: var(--terracotta);
    --fg: var(--cream);

    --font-display: "Playfair Display", "Lora", Georgia, serif;
    --font-body: "Lora", Georgia, serif;
    --font-accent: "Josefin Sans", "Helvetica Neue", sans-serif;

    --film-filter: sepia(0.25) saturate(0.85) contrast(1.1) brightness(0.95);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    transition: background-color 800ms ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    position: relative;
    z-index: 1;
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2 {
    font-family: var(--font-display);
    line-height: 0.95;
}

.hero-headline {
    font-weight: 900;
    font-size: clamp(3.5rem, 10vw, 8rem);
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--cream);
    max-width: 70vw;
}

h2 {
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.01em;
    line-height: 1.05;
    margin-bottom: 1.2em;
}

p {
    max-width: 58ch;
    margin-bottom: 1.4em;
}

p:last-child {
    margin-bottom: 0;
}

em {
    font-style: italic;
    color: inherit;
}

.caption,
.kicker {
    font-family: var(--font-accent);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    color: var(--sage);
    margin-bottom: 1.6em;
}

.kicker {
    color: var(--copper);
    font-weight: 600;
}

/* ============================================================
   Bands (full-width horizontal sections)
   ============================================================ */

.band {
    position: relative;
    width: 100%;
    padding: clamp(4rem, 10vh, 8rem) clamp(1.5rem, 6vw, 6rem);
    transition: background-color 600ms ease, color 600ms ease;
}

/* Band 1 — Hero */
.band-hero {
    min-height: 100vh;
    background-color: var(--terracotta);
    color: var(--cream);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding-bottom: 14vh;
}

.sunburst {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.sunburst svg {
    width: 100%;
    height: 100%;
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-inner .kicker {
    color: var(--copper);
}

.hero-rule {
    border: 0;
    height: 1px;
    background-color: var(--copper);
    width: 100%;
    margin: 2rem 0 1.5rem 0;
    opacity: 0.85;
}

.hero-sub {
    font-style: italic;
    color: var(--cream);
    opacity: 0.85;
    max-width: 50ch;
}

.hero-headline .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.05em);
    transition: opacity 700ms ease-out, transform 700ms ease-out;
    will-change: opacity, transform;
}

.hero-headline .char.in {
    opacity: 1;
    transform: translateY(0);
}

.hero-headline .char.space {
    width: 0.28em;
}

/* Band 2 — Vision */
.band-vision {
    background-color: var(--parchment);
    color: var(--umber);
}

.vision-grid {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.vision-text {
    max-width: 520px;
}

.vision-text h2 {
    color: var(--walnut);
    margin-bottom: 1.2em;
}

.vision-text p {
    color: var(--umber);
}

.vision-text .caption {
    color: var(--sage);
}

.vision-photo {
    position: relative;
}

.vision-photo .caption {
    margin-top: 1rem;
    color: var(--sage);
    margin-bottom: 0;
}

/* Band 3 — Gallery */
.band-gallery {
    background-color: var(--terracotta);
    color: var(--cream);
}

.gallery-intro {
    max-width: 1400px;
    margin: 0 auto 3rem;
}

.gallery-intro h2 {
    color: var(--cream);
}

.gallery-intro .caption {
    color: var(--gold);
}

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 1400px;
    margin: 0 auto;
}

.slide {
    position: relative;
    background-color: var(--terracotta);
}

.slide .photo {
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px rgba(44, 24, 16, 0.18), inset 0 2px 6px rgba(44, 24, 16, 0.25);
    transition: filter 500ms ease;
}

.slide .caption {
    margin-top: 0.9rem;
    color: var(--gold);
    margin-bottom: 0;
}

.slide:hover .photo {
    filter: sepia(0.4) saturate(0.85) contrast(1.15) brightness(0.92);
}

.slide:hover .photo::after {
    background: radial-gradient(circle at 50% 50%, rgba(59, 35, 24, 0) 40%, rgba(59, 35, 24, 0.55) 100%);
}

/* ============================================================
   Photographs (CSS-only film emulation)
   ============================================================ */

.photo {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    filter: var(--film-filter);
    isolation: isolate;
}

.photo::before {
    /* film grain */
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.23  0 0 0 0 0.14  0 0 0 0 0.09  0 0 0 0.5 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
    background-size: 200px 200px;
    mix-blend-mode: multiply;
    opacity: 0.18;
    pointer-events: none;
    z-index: 2;
}

.photo::after {
    /* vignette */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 35, 24, 0) 45%, rgba(59, 35, 24, 0.35) 100%);
    pointer-events: none;
    z-index: 1;
    transition: background 500ms ease;
}

.photo-frames {
    aspect-ratio: 4 / 5;
    background:
        radial-gradient(ellipse at 30% 35%, #2a1810 0 8%, transparent 9%),
        radial-gradient(ellipse at 70% 35%, #2a1810 0 8%, transparent 9%),
        radial-gradient(ellipse at 30% 35%, #6b3a1f 0 14%, transparent 15%),
        radial-gradient(ellipse at 70% 35%, #6b3a1f 0 14%, transparent 15%),
        linear-gradient(180deg, #5a3a2c 0%, #4a2c1f 100%),
        repeating-linear-gradient(45deg, #5a3a2c 0 6px, #4a2c1f 6px 12px);
}

.photo-awning {
    aspect-ratio: 1 / 1;
    background:
        linear-gradient(180deg, transparent 0% 35%, #C4943A 35% 38%, transparent 38% 100%),
        repeating-linear-gradient(90deg, #8B3A2F 0 30px, #6b2a22 30px 60px),
        linear-gradient(180deg, #d8b27a 0% 60%, #b8946a 60% 100%);
    background-size: 100% 100%, 100% 38%, 100% 100%;
    background-repeat: no-repeat;
    background-position: top, top, bottom;
}

.photo-counter {
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(circle at 22% 38%, #f0d9a8 0 6%, transparent 7%),
        radial-gradient(circle at 50% 38%, #f0d9a8 0 6%, transparent 7%),
        radial-gradient(circle at 78% 38%, #f0d9a8 0 6%, transparent 7%),
        linear-gradient(180deg, #6b4a30 0% 30%, #4a3220 30% 65%, #2a1810 65% 100%),
        repeating-linear-gradient(0deg, #5a3a26 0 14px, #4a2f1f 14px 28px);
}

.photo-window {
    aspect-ratio: 1 / 1;
    background:
        radial-gradient(circle at 70% 30%, rgba(245, 230, 211, 0.7) 0 12%, transparent 35%),
        linear-gradient(135deg, #d8a45a 0%, #b87333 60%, #6b3a1f 100%),
        repeating-linear-gradient(90deg, transparent 0 80px, rgba(44, 24, 16, 0.15) 80px 82px),
        repeating-linear-gradient(0deg, transparent 0 80px, rgba(44, 24, 16, 0.15) 80px 82px);
}

/* Band 4 — Manifesto */
.band-manifesto {
    background-color: var(--walnut);
    color: var(--cream);
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: clamp(5rem, 12vh, 9rem);
    padding-bottom: clamp(5rem, 12vh, 9rem);
}

.manifesto-rings {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.manifesto-rings .ring {
    position: absolute;
    border: 1px solid var(--copper);
    border-radius: 50%;
    aspect-ratio: 1;
}

.manifesto-rings .ring-1 { width: 22vmin; opacity: 0.15; }
.manifesto-rings .ring-2 { width: 36vmin; opacity: 0.12; }
.manifesto-rings .ring-3 { width: 52vmin; opacity: 0.09; }
.manifesto-rings .ring-4 { width: 70vmin; opacity: 0.07; }
.manifesto-rings .ring-5 { width: 90vmin; opacity: 0.05; }

.zigzag-divider {
    position: absolute;
    left: 0;
    width: 100%;
    height: 12px;
    z-index: 1;
}

.zigzag-top { top: 0; }
.zigzag-bottom { bottom: 0; transform: scaleY(-1); }

.manifesto-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}

.manifesto-inner h2 {
    color: var(--cream);
    font-style: italic;
}

.manifesto-inner .caption {
    color: var(--copper);
}

.manifesto-body {
    font-size: clamp(1.05rem, 1.9vw, 1.3rem);
    line-height: 1.85;
    color: var(--cream);
    max-width: 60ch;
    margin: 0 auto;
}

/* Band 5 — Closing */
.band-closing {
    background-color: var(--terracotta);
    color: var(--cream);
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.closing-inner {
    max-width: 900px;
}

.closing-headline {
    font-size: clamp(4rem, 14vw, 11rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 0.95;
    color: var(--cream);
    font-style: italic;
}

.closing-inner .caption {
    color: var(--gold);
    margin-bottom: 1.5em;
}

.closing-inner .hero-rule {
    max-width: 360px;
    margin: 1.5rem auto;
}

/* ============================================================
   Monocle navigation
   ============================================================ */

.monocle-nav {
    position: fixed;
    top: clamp(1rem, 2.5vh, 2rem);
    right: clamp(1rem, 2.5vw, 2rem);
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.7rem;
    color: var(--copper);
    text-decoration: none;
    border-radius: 999px;
    background-color: rgba(245, 230, 211, 0.0);
    transition: background-color 300ms ease, color 300ms ease;
}

.monocle-icon {
    width: 32px;
    height: 32px;
    display: block;
    color: inherit;
    transition: transform 300ms ease, color 300ms ease;
}

.monocle-label {
    font-family: var(--font-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    color: inherit;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 350ms ease, opacity 350ms ease;
}

.monocle-nav:hover {
    background-color: rgba(245, 230, 211, 0.1);
    color: var(--gold);
}

.monocle-nav:hover .monocle-icon {
    transform: rotate(15deg);
}

.monocle-nav:hover .monocle-label {
    max-width: 12ch;
    opacity: 1;
}

/* ============================================================
   Reveal animation
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
    will-change: opacity, transform;
}

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

/* ============================================================
   Body color shifts as bands enter
   ============================================================ */

body[data-band="hero"],
body[data-band="gallery"],
body[data-band="closing"] {
    background-color: var(--terracotta);
}

body[data-band="vision"] {
    background-color: var(--parchment);
}

body[data-band="manifesto"] {
    background-color: var(--walnut);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 820px) {
    .vision-grid {
        grid-template-columns: 1fr;
    }

    .gallery-strip {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-headline {
        max-width: 90vw;
    }

    .band-hero {
        padding-bottom: 8vh;
    }
}

@media (max-width: 480px) {
    .monocle-label {
        display: none;
    }

    .band {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
