/* ============================================================
   VIVIANN — retro one-page portfolio
   Palette: warm paper, deep ink, tomato / mustard / teal / pink
   ============================================================ */

:root {
  --sky: #5bb8d6;
  --sky-light: #bfe6f2;
  --sky-pale: #e4f4fa;
  --cream: #fffaf0;
  --paper: var(--sky-pale);
  --paper-2: #d6edf6;
  --ink: #16234f;
  --ink-soft: #3a4674;
  --red: #e33b2e;
  --orange: #e8552b;
  --mustard: #f4b73e;
  --teal: #1f8a7a;
  --pink: #d6457b;

  /* Retro pattern kit — used as ACCENTS in a few places, not page-wide */
  --stripes: repeating-linear-gradient(-45deg, #ffffff 0 22px, var(--sky-light) 22px 44px);
  --dots: radial-gradient(var(--sky-light) 2px, transparent 2.4px);
  --checks: repeating-conic-gradient(var(--sky-light) 0% 25%, #ffffff 0% 50%);
  --sunburst: repeating-conic-gradient(from 0deg at 50% 42%, var(--sky-light) 0deg 6deg, #ffffff 6deg 12deg);

  --shadow: 6px 6px 0 var(--ink);
  --radius: 14px;

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-hand: "Caveat", cursive;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  background: var(--sky-pale);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--orange); color: var(--cream); }

/* ---------- Film grain ---------- */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}
.nav__brand {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 1px;
  text-decoration: none; color: var(--ink); margin-right: auto;
}
.blink { animation: blink 1s steps(1) infinite; color: var(--orange); }
@keyframes blink { 50% { opacity: 0; } }

.nav__links { display: flex; gap: 1.4rem; }
.nav__links a {
  font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.5px; text-decoration: none; padding: 0.2rem 0;
  border-bottom: 2px solid transparent; transition: border-color 0.15s, color 0.15s;
}
.nav__links a:hover { border-color: var(--orange); color: var(--orange); }

.nav__cta {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; text-decoration: none;
  background: var(--ink); color: var(--cream);
  padding: 0.45rem 0.9rem; border-radius: 40px;
  border: 2px solid var(--ink); transition: background 0.15s, color 0.15s;
}
.nav__cta:hover { background: var(--orange); border-color: var(--orange); }

.nav__burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav__burger span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
.nav__burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(0.9rem, 2vh, 1.7rem);
  padding: 92px clamp(1rem, 4vw, 2.5rem) 2rem;
  position: relative;
  /* bright center over a light-blue sunburst = retro, but keeps content legible */
  background:
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.55) 34%, rgba(255,255,255,0) 68%),
    var(--sunburst);
}

/* Retro TV housing */
.tv {
  position: relative; width: min(660px, 92vw, 64vh); aspect-ratio: 4 / 3;
  background: var(--ink); border-radius: 22px;
  padding: 18px; box-shadow: var(--shadow);
}
.tv::after { /* screen glass curvature */
  content: ""; position: absolute; inset: 18px; border-radius: 14px;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.55); pointer-events: none; z-index: 3;
}
.tv__video, .tv__placeholder {
  position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px);
  border-radius: 14px; overflow: hidden; object-fit: cover; background: #000;
}
.tv__video { z-index: 1; }
.tv__placeholder { z-index: 2; display: grid; place-content: center; text-align: center; gap: 0.4rem; color: var(--cream); }
.tv__placeholder.hidden { display: none; }
.tv__scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 4px);
  animation: scan 8s linear infinite;
}
@keyframes scan { to { background-position: 0 100px; } }
.tv__noise {
  position: absolute; inset: 0; opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tv__label { position: relative; font-family: var(--font-display); font-size: clamp(1.4rem, 5vw, 2.4rem); letter-spacing: 2px; }
.tv__note { position: relative; font-family: var(--font-mono); font-size: 0.72rem; opacity: 0.75; padding: 0 1rem; }
.tv__note code { color: var(--mustard); }
.tv__ui {
  position: absolute; inset: 18px; z-index: 4; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none;
}
.rec { font-family: var(--font-mono); font-size: 0.7rem; color: #ff5b5b; display: flex; align-items: center; gap: 6px; letter-spacing: 1px; }
.rec__dot { width: 9px; height: 9px; border-radius: 50%; background: #ff3b3b; animation: blink 1.2s steps(1) infinite; }
.sound {
  pointer-events: auto; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 1px;
  background: rgba(0,0,0,0.5); color: var(--cream); border: 1px solid rgba(255,255,255,0.4);
  padding: 0.3rem 0.6rem; border-radius: 30px;
}
.sound:hover { background: var(--orange); border-color: var(--orange); }

.hero__title { text-align: center; margin-top: 1.5rem; }
.hero__kicker { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 3px; color: var(--orange); }
.hero__title h1 {
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 15vw, 9.5rem); line-height: 0.85; letter-spacing: 2px;
  margin: 0.3rem 0 1.2rem; color: var(--ink);
  text-shadow: 4px 4px 0 var(--mustard), 8px 8px 0 var(--red);
}
.hero__tag { font-family: var(--font-mono); font-size: clamp(0.75rem, 2.5vw, 1rem); letter-spacing: 2px; text-transform: uppercase; }

.scrollcue {
  display: grid; justify-items: center; gap: 2px; text-decoration: none;
  margin-top: clamp(0.4rem, 2vh, 1.4rem);
  font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--ink-soft); animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }

/* ============ MARQUEE ============ */
.marquee {
  background: var(--ink); color: var(--cream); overflow: hidden;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  padding: 0.6rem 0;
}
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 2px; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ INTRO ============ */
/* Content sections are cream "cards" floating on the striped page */
.intro, .section {
  width: min(var(--maxw), calc(100% - 2 * clamp(0.9rem, 4vw, 3rem)));
  margin-inline: auto;
  margin-block: clamp(1.6rem, 5vw, 3rem);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.intro {
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.4rem, 4vw, 3.5rem);
  display: grid; grid-template-columns: 340px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.polaroid {
  background: var(--cream); padding: 14px 14px 50px; border: 2px solid var(--ink);
  box-shadow: var(--shadow); transform: rotate(-3deg); transition: transform 0.3s;
}
.polaroid:hover { transform: rotate(0deg) scale(1.02); }
.polaroid__img {
  aspect-ratio: 4 / 5; background:
    repeating-linear-gradient(45deg, var(--paper-2) 0 12px, var(--paper) 12px 24px);
  display: grid; place-content: center; text-align: center;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); border: 1px dashed var(--ink-soft);
}
.polaroid__cap { font-family: var(--font-hand); font-size: 1.5rem; text-align: center; margin-top: 8px; }

.intro__text .lead { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 500; margin-bottom: 1.1rem; }
.intro__text p { margin-bottom: 1.1rem; }
.intro__punch {
  font-family: var(--font-hand); font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2;
  color: var(--orange); font-weight: 700;
}

/* ============ SECTIONS ============ */
.section { padding: clamp(2.2rem, 6vw, 4.5rem) clamp(1.4rem, 4vw, 3.5rem); }
/* alternating sections get a subtle retro polka-dot backdrop */
.section--alt { background-color: var(--cream); background-image: var(--dots); background-size: 22px 22px; }

/* Full-bleed striped divider — a retro accent used sparingly between sections */
.stripe-band {
  height: 22px; width: 100%;
  background: var(--stripes);
  border-block: 3px solid var(--ink);
}

.section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2rem; border-bottom: 3px solid var(--ink); padding-bottom: 0.8rem; }
.section__num { font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; color: var(--orange); }
.section__title { font-family: var(--font-display); font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: 0.95; letter-spacing: 1px; }
.section__title em { font-style: normal; color: var(--pink); }
.section__intro { font-family: var(--font-mono); font-size: 0.9rem; margin-bottom: 2rem; color: var(--ink-soft); }

/* ============ PROJECT ============ */
.project {
  display: grid; grid-template-columns: 300px 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4vw, 2.5rem) 0; border-bottom: 2px dashed var(--ink-soft);
}
.project:last-child { border-bottom: none; }
.project--wide { grid-template-columns: 1fr; }
.project__meta { position: sticky; top: 100px; align-self: start; }
.tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--cream);
  padding: 0.25rem 0.6rem; border-radius: 40px; border: 2px solid var(--ink); margin-bottom: 0.8rem;
}
.tag--orange { background: var(--orange); }
.tag--teal { background: var(--teal); }
.tag--pink { background: var(--pink); }
.tag--mustard { background: var(--mustard); color: var(--ink); }
.project__title { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1; letter-spacing: 0.5px; }
.project__sub { font-family: var(--font-hand); font-size: 1.5rem; color: var(--pink); margin: 0.1rem 0 0.6rem; }
.project__role { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }
.project__body p { margin-bottom: 1.1rem; }
.project__punch, .project__body .project__punch { font-family: var(--font-hand); font-size: 1.7rem; color: var(--orange); }

/* ---------- Sub-label inside a project ---------- */
.project__label {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: var(--ink-soft);
  margin: 1.6rem 0 0.4rem;
}

/* ---------- Campaign reels (vertical MP4 from R2) ---------- */
.reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-top: 0.4rem; }
.reel {
  position: relative; aspect-ratio: 9 / 16; border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; background: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}
.reel__facade {
  position: absolute; inset: 0; color: var(--cream);
  background-color: var(--ink); background-size: cover; background-position: center;
  transition: transform 0.3s;
}
.reel:hover .reel__facade { transform: scale(1.05); }
.reel__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,15,40,0.15) 0%, rgba(10,15,40,0.0) 35%, rgba(10,15,40,0.65) 100%);
}
.reel .embed-card__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0;
}
.reel:hover .embed-card__play { transform: translate(-50%, -50%) scale(1.12); }
.reel__label {
  position: absolute; left: 12px; bottom: 10px; z-index: 2;
  font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; z-index: 3; }

/* ---------- Instagram embeds ---------- */
.embeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.embed-card {
  position: relative; aspect-ratio: 9 / 12; border: 2px solid var(--ink); border-radius: var(--radius);
  overflow: hidden; background: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}
.embed-card__facade {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 0.5rem; text-align: center;
  color: var(--cream);
  background: linear-gradient(135deg, var(--pink), var(--orange));
}
.embed-card__facade svg { width: 42px; height: 42px; margin: 0 auto; }
.embed-card__facade span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 1px; }
.embed-card__play {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.9);
  display: grid; place-content: center; margin: 0 auto; box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.embed-card:hover .embed-card__play { transform: scale(1.1); }
.embed-card__play svg { width: 22px; height: 22px; fill: var(--ink); }
.embed-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.gallery figure { margin: 0; border: 2px solid var(--ink); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.25s; }
.gallery figure:nth-child(odd) { transform: rotate(-1.5deg); }
.gallery figure:nth-child(even) { transform: rotate(1.5deg); }
.gallery figure:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ---------- Placeholders ---------- */
.placeholder {
  border: 2px dashed var(--ink); border-radius: var(--radius); background: var(--cream);
  padding: 2rem 1rem; text-align: center; margin-top: 1.4rem;
}
.placeholder__row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; margin-top: 1.4rem; }
.placeholder__icon { font-size: 2.4rem; display: block; margin-bottom: 0.4rem; }
.placeholder--deck { padding: 3rem 1rem; }

.note { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); font-style: italic; margin-top: 0.6rem; }

/* ============ SUBSCRIBE ============ */
.subscribe {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.10), transparent 55%),
    repeating-conic-gradient(from 0deg at 50% 0%, rgba(255,255,255,0.045) 0deg 6deg, transparent 6deg 12deg),
    var(--ink);
  color: var(--cream); padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 4vw, 2.5rem) 0;
  text-align: center;
}
.subscribe__card { max-width: 640px; margin: 0 auto; }
.subscribe__kicker { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 1px; color: var(--mustard); text-transform: uppercase; margin-bottom: 1rem; }
.subscribe__card h2 { font-family: var(--font-display); font-size: clamp(2.8rem, 9vw, 5.5rem); line-height: 0.9; letter-spacing: 1px; }
.subscribe__body { font-size: clamp(1.05rem, 2.5vw, 1.3rem); margin: 1.2rem auto 2rem; max-width: 460px; }
.subscribe__actions { margin-bottom: 2rem; }
.btn {
  display: inline-block; font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  text-decoration: none; padding: 0.9rem 1.8rem; border-radius: 50px; border: 2px solid var(--cream); transition: transform 0.15s, background 0.15s, color 0.15s;
}
.btn--primary { background: var(--red); border-color: var(--red); color: var(--cream); }
.btn--primary:hover { transform: translateY(-3px); background: var(--mustard); border-color: var(--mustard); color: var(--ink); }
.subscribe__links { list-style: none; display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 0.8rem; }
.subscribe__links a { font-family: var(--font-mono); font-size: 0.85rem; text-decoration: none; border-bottom: 2px solid transparent; }
.subscribe__links a:hover { border-color: var(--mustard); color: var(--mustard); }
.subscribe .note { color: rgba(251,245,232,0.5); }

.footer {
  margin-top: 4rem; border-top: 1px solid rgba(251,245,232,0.2); padding: 1.4rem 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: rgba(251,245,232,0.6);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  /* Burger stays on the top row (order 1, right of the brand); the menu
     wraps onto full-width rows BELOW the bar so nothing overlaps it. */
  .nav { flex-wrap: wrap; row-gap: 0; }
  .nav.open { background: var(--paper); }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; order: 1; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; order: 2;
    flex: 0 0 100%; gap: 0.9rem;
    margin-top: 0.7rem; padding-top: 0.9rem;
    border-top: 2px solid var(--ink);
  }
  .nav.open .nav__cta {
    display: block; order: 3; flex: 0 0 100%;
    text-align: center; margin: 0.2rem 0 0.5rem;
  }
  .intro { grid-template-columns: 1fr; }
  .polaroid { max-width: 280px; margin: 0 auto; }
  .project { grid-template-columns: 1fr; }
  .project__meta { position: static; }
  .placeholder__row { grid-template-columns: 1fr; }

  /* Hyundai films & Dookan images become swipeable horizontal carousels */
  .reels, .gallery {
    display: flex; flex-wrap: nowrap;
    grid-template-columns: none;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 1rem; padding: 0.3rem 0 1rem;
    scroll-padding: 0 clamp(1.4rem, 4vw, 3.5rem);
  }
  .reels > .reel { flex: 0 0 66%; scroll-snap-align: center; }
  .gallery > figure { flex: 0 0 78%; scroll-snap-align: center; transform: none; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
