/* ========== MAYGAN RALSTON · PORTFOLIO v2 ==========
   Clean modern minimal — pure white, sans-serif throughout, accent-driven.
   Accent is themable via --accent / --accent-ink. */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Surfaces */
  --paper: #ffffff;
  --paper-2: #f5f5f4;
  --paper-3: #ebeae7;

  /* Ink */
  --ink: #0e0e0c;
  --ink-2: #3a3a36;
  --ink-3: #767670;
  --ink-4: #a8a8a2;

  /* Hairlines */
  --hair: rgba(14,14,12,0.10);
  --hair-strong: rgba(14,14,12,0.18);

  /* Accent — overridable via JS (Tweaks). Default matches TWEAK_DEFAULTS
     so the first paint never flashes a different color before JS runs. */
  --accent: #b13a87;            /* fuchsia default */
  --accent-ink: #b13a87;
  --accent-soft: rgba(177,58,135,0.10);

  --sans: 'Geist', 'Inter', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body { font-size: 16px; line-height: 1.55; font-weight: 400; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 56px; }

/* ── NAV ── flat, sans, accent dot for the wordmark */
.nav {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 56px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.nav-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.nav-mark::before {
  content: ""; width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  position: relative; padding: 4px 0;
  transition: color .25s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .35s cubic-bezier(.65,0,.35,1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 80px 0 80px;
}
.hero-left { display: flex; flex-direction: column; gap: 36px; max-width: 720px; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px;
  color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--accent);
}
.hero-h {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(58px, 7.4vw, 124px);
  line-height: 0.96;
  letter-spacing: -0.038em;
  text-wrap: balance;
}
.hero-h .accent { color: var(--accent); }
.hero-deck {
  font-size: 19px; line-height: 1.55; color: var(--ink-2);
  max-width: 54ch; text-wrap: pretty;
  font-weight: 400;
}
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  padding: 14px 24px 14px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  transition: transform .25s, background .25s;
  border: 1px solid var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-primary::after { content: "→"; font-size: 16px; line-height: 1; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  border: 1px solid var(--hair-strong); color: var(--ink-2);
  font-size: 14px; font-weight: 500;
  transition: all .25s;
}
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.hero-right { position: relative; }
.hero-portrait {
  aspect-ratio: 4 / 5;
  overflow: hidden; background: var(--paper-2);
  position: relative; border-radius: 4px;
}
.hero-portrait::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid var(--hair); border-radius: 4px;
  pointer-events: none;
}
.hero-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.7,.3,1);
}
.hero-portrait:hover img { transform: scale(1.04); }

.hero-stats {
  position: absolute; bottom: -30px; right: -10px;
  background: var(--paper); padding: 16px 22px;
  border: 1px solid var(--hair-strong);
  display: flex; flex-direction: column; gap: 4px;
  border-radius: 4px;
}
.hero-stats strong { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.hero-stats span { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }

/* ── SECTION CHROME ── */
.sec { padding: 110px 0; }
.sec + .sec { padding-top: 0; }
.sec-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hair-strong);
}
.sec-meta {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase;
}
.sec-meta strong { color: var(--ink); font-weight: 500; font-size: 12px; }
.sec-h {
  font-weight: 600;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.02; letter-spacing: -0.03em;
  text-wrap: balance;
}
.sec-h .accent { color: var(--accent); }

/* ── LONGFORM ── editorial layout, tiles match each piece's native aspect ratio
   5 pieces of mixed aspect ratios composed across a 12-col grid:
   Row 1: featured (cols 1-7, landscape) + tall (cols 8-12, portrait 9:16)
   Row 2: portrait (1-4) + portrait (5-8) + portrait (9-12)
*/
.lf-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 56px 32px;
}
.lf-card.shape-landscape,
.lf-card.shape-tall {
  /* row 1 cards center themselves vertically so meta+title sit below the image rather than
     leaving a giant gap below the shorter card */
  justify-content: flex-start;
}

.lf-card { cursor: pointer; display: flex; flex-direction: column; }

.lf-card.shape-landscape { grid-column: span 8; }
.lf-card.shape-tall      { grid-column: span 4; }
.lf-card.shape-portrait  { grid-column: span 4; }

.lf-cv {
  overflow: hidden; background: var(--paper-2);
  margin-top: 18px; position: relative;
  border: 1px solid var(--hair);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .3s;
}
.lf-card:hover .lf-cv { border-color: var(--ink-4); }

/* aspect ratios — each tile is the SAME shape as its image */
.lf-card.shape-landscape .lf-cv { aspect-ratio: 16 / 9; }
/* Landscape covers can be wider than 16:9 (e.g. 2:1 deck slides) — show the whole image
   with letterbox bars rather than cropping the edges. */
.lf-card.shape-landscape .lf-cv img {
  object-fit: contain;
  object-position: center;
}
/* Tall tile is constrained by max-height so it doesn't tower over its row neighbor.
   The image scales down (object-fit: contain) inside the resulting box. */
.lf-card.shape-tall .lf-cv {
  aspect-ratio: 9 / 16;
  max-height: 420px;
  background: transparent;
  border: none;
  justify-content: flex-start;
}
.lf-card.shape-tall .lf-cv img {
  object-fit: contain;
  object-position: left center;
}
.lf-card.shape-portrait .lf-cv { aspect-ratio: 4 / 5; }

.lf-cv img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1s cubic-bezier(.2,.7,.3,1);
}
.lf-card:hover .lf-cv img { transform: scale(1.03); }

.lf-cv-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.94); color: var(--ink);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 8px; border-radius: 2px;
  display: inline-flex; align-items: center; gap: 6px;
}
.lf-cv-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: 999px; background: var(--accent);
}
.lf-meta {
  display: flex; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 10px;
}
.lf-meta .cat { color: var(--accent); font-weight: 500; }
.lf-meta .div { color: var(--ink-4); }
.lf-t {
  font-weight: 600; font-size: 22px;
  line-height: 1.18; letter-spacing: -0.018em;
  margin-bottom: 10px; text-wrap: balance;
}
.lf-card.shape-landscape .lf-t { font-size: 28px; line-height: 1.1; max-width: 18ch; }
.lf-d { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; max-width: 50ch; }

/* Cover image is the visual anchor — its TOP edge should align across all
   cards in a row regardless of how many lines title/desc wrap to. Pin the
   title and desc to consistent heights (longest natural wrap), and push the
   link to the bottom with margin-top: auto. */
.lf-card.shape-portrait .lf-t  { min-height: calc(1.18em * 2); }
.lf-card.shape-portrait .lf-d  { min-height: calc(1.6em * 3); }
.lf-card.shape-landscape .lf-d,
.lf-card.shape-tall .lf-d { min-height: calc(1.6em * 3); }

.lf-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto; /* push link to card bottom so all "Open PDF →" links line up */
  padding-top: 14px;
  font-size: 13px; font-weight: 500; color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: gap .25s;
  align-self: flex-start;
}
.lf-card:hover .lf-link { gap: 14px; }

/* ── CAMPAIGNS ── */
.ad-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
}
.ad-tile {
  position: relative;
  flex: 0 0 calc((100% - 48px) / 4); /* 4 per row with 16px gaps */
  aspect-ratio: 1; overflow: hidden; background: var(--paper-2);
  cursor: zoom-in;
  border: 1px solid var(--hair);
  border-radius: 2px;
}
.ad-tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s cubic-bezier(.2,.7,.3,1);
}
.ad-tile:hover img { transform: scale(1.04); }
.ad-tile::after {
  content: "↗ View"; position: absolute; bottom: 12px; right: 12px;
  background: rgba(255,255,255,0.94); color: var(--ink);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 2px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .3s, transform .3s;
}
.ad-tile:hover::after { opacity: 1; transform: translateY(0); }

/* ── REEL — vertical-native video presentation ── */
.reel {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 80px;
  align-items: center;
  padding: 48px 0;
  position: relative;
}
.reel::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 18% 50%, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none; z-index: -1;
  opacity: 0.6;
}
.reel-stage {
  position: relative;
  display: flex; justify-content: center;
}
.reel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 30px 60px -20px rgba(15, 23, 35, 0.35),
    0 12px 24px -12px rgba(15, 23, 35, 0.2),
    0 0 0 1px rgba(15, 23, 35, 0.08);
  cursor: pointer;
  transition: transform .4s cubic-bezier(.2,.7,.3,1), box-shadow .4s;
}
.reel-frame:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 40px 70px -20px rgba(15, 23, 35, 0.4),
    0 16px 30px -12px rgba(15, 23, 35, 0.25),
    0 0 0 1px rgba(15, 23, 35, 0.08);
}
.reel-frame video {
  width: 100%; height: 100%;
  object-fit: cover; /* video IS 9:16, frame IS 9:16 — perfect fit, no letterbox */
  display: block;
}
/* When the user enters native fullscreen, the 9:16 video would otherwise
   be cropped to fill the viewport. Switch to `contain` so the whole
   frame is visible with letterboxing on the sides. */
.reel-frame video:fullscreen,
.reel-frame video:-webkit-full-screen {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.reel-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.4) inset;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), opacity .3s;
  z-index: 2;
}
.reel-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.reel-frame.playing .reel-play { opacity: 0; pointer-events: none; }
.reel-runtime {
  position: absolute;
  bottom: 14px; right: 14px;
  font-family: var(--mono); font-size: 10px;
  color: rgba(255,255,255,0.92);
  background: rgba(0,0,0,0.55);
  padding: 4px 8px; border-radius: 3px;
  letter-spacing: 0.06em;
  z-index: 2;
  transition: opacity .3s;
}
.reel-frame.playing .reel-runtime { opacity: 0; }

.reel-credit { padding-right: 32px; }
.reel-format {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.reel-format-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.reel-title {
  font-size: 44px; line-height: 1.05;
  font-weight: 600; letter-spacing: -0.025em;
  margin-bottom: 24px; text-wrap: balance;
}
.reel-title em {
  font-style: italic; font-weight: 400;
  color: var(--ink-2);
}
.reel-body {
  font-size: 17px; line-height: 1.55;
  color: var(--ink-2);
  max-width: 48ch;
  margin-bottom: 36px;
}
.reel-meta {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  max-width: 540px;
}
.reel-meta dt {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.reel-meta dd { font-size: 14px; font-weight: 500; color: var(--ink); }

/* ── ABOUT ── moved to bottom, quiet bio */
.about {
  padding: 110px 0;
  border-top: 1px solid var(--hair-strong);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}
.about-label {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-3);
}
.about-body {
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.about-body p:first-child {
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 1em;
}
.about-body p + p { margin-top: 1em; }

/* ── CONTACT ── */
.colo {
  border-top: 1px solid var(--hair-strong);
  padding: 110px 0 48px;
}
.colo-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--hair);
}
.colo-h {
  font-weight: 600;
  font-size: clamp(48px, 6vw, 92px);
  line-height: 1; letter-spacing: -0.035em;
  text-wrap: balance;
}
.colo-h .accent { color: var(--accent); }
.colo-sub {
  margin-top: 24px;
  font-size: 17px; line-height: 1.6; color: var(--ink-2);
  max-width: 48ch;
}
.contact-list { display: flex; flex-direction: column; }
.contact-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--hair);
  transition: padding-left .3s, color .25s;
}
.contact-row:last-child { border-bottom: 1px solid var(--hair); }
.contact-row:hover { padding-left: 8px; color: var(--accent); }
.contact-l { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; }
.contact-v { font-size: 17px; font-weight: 500; }

.foot {
  margin-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* ── Lightbox ── */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14,14,12,0.94);
  display: none; align-items: center; justify-content: center;
  padding: 48px;
  cursor: zoom-out;
  backdrop-filter: blur(8px);
}
.lb.open { display: flex; animation: fadeIn .25s ease; }
.lb img { max-width: 90vw; max-height: 88vh; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.lb-close {
  position: absolute; top: 24px; right: 28px;
  font-family: var(--mono); font-size: 12px;
  color: #fff; letter-spacing: 0.1em;
  background: none; border: none; cursor: pointer;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Reveal animations ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .wrap { padding: 0 24px; }
  .nav { padding: 14px 24px; }
  .nav-meta { display: none; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; min-height: 0; }
  .hero-right { order: -1; max-width: 360px; }
  .hero-stats { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .sec-head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .lf-grid { grid-template-columns: 1fr; gap: 40px; }
  .lf-card.shape-landscape,
  .lf-card.shape-tall,
  .lf-card.shape-portrait { grid-column: 1 / -1; }
  .lf-card.shape-tall .lf-cv { aspect-ratio: 4 / 5; max-height: 70vh; }
  .lf-card.shape-tall .lf-cv img { object-fit: contain; }
  .ad-grid { gap: 12px; }
  .ad-tile { flex: 0 0 calc((100% - 12px) / 2); }
  .video-meta { grid-template-columns: 1fr; gap: 16px; }
  .reel { grid-template-columns: 1fr; gap: 40px; padding: 24px 0; }
  .reel-stage { max-width: 320px; margin: 0 auto; }
  .reel-credit { padding-right: 0; }
  .reel-title { font-size: 30px; }
  .reel-meta { grid-template-columns: 1fr 1fr; gap: 20px; }
  .colo-grid { grid-template-columns: 1fr; gap: 48px; align-items: start; padding-bottom: 40px; }
  .foot { flex-direction: column; gap: 12px; align-items: flex-start; }
}
