/* ==========================================================================
   Victoria Spina — portfolio
   Direction: a dark room where the posters are the light. Oxblood ink ground,
   bone type, one ochre accent taken from the work. Display type is a tall
   condensed sans (the voice of the posters); text is a plain grotesque.
   Structure: 1 tokens · 2 base · 3 layout · 4 components · 5 home · 6 case study
   ========================================================================== */

/* 1 — Tokens ---------------------------------------------------------------- */
:root {
  --bg: #1a0d0e;
  --bg-2: #251214;
  --line: #4a2b2d;
  --text: #f1e7d9;
  --muted: #bba59b;
  --accent: #e2ab52;
  --field: #8d7a70;   /* input underline, 3:1 against the ground */

  --font-display: "League Gothic", "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* type scale */
  --fs-display: clamp(4.5rem, 10vw, 10.5rem);
  --fs-h1: clamp(3.75rem, 8.5vw, 8.5rem);
  --fs-h2: clamp(3rem, 6vw, 6rem);
  --fs-h3: clamp(2rem, 3.4vw, 3.25rem);
  --fs-lede: clamp(1.1875rem, 1.6vw, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;

  /* spacing: 4 8 12 16 24 32 48 64 96 128 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px;
  --s8: 32px; --s12: 48px; --s16: 64px; --s24: 96px; --s32: 128px;

  --margin: clamp(20px, 4.5vw, 72px);
  --gutter: clamp(12px, 1.6vw, 24px);
  --cols: 4;
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}
@media (min-width: 640px)  { :root { --cols: 8; } }
@media (min-width: 1024px) { :root { --cols: 12; } }

/* 2 — Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.menu-open { overflow: hidden; }
/* Fine grain behind the content (photocopy texture from the posters). Sits under all content. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.site-header, main, .site-footer { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: 0.005em;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: var(--margin); top: -100px; z-index: 200;
  background: var(--accent); color: var(--bg); padding: var(--s3) var(--s6); font-weight: 600;
}
.skip-link:focus { top: var(--s4); }

/* 3 — Layout ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1680px; margin-inline: auto; padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 160px); }

/* 4 — Components ------------------------------------------------------------ */
/* Header */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg); border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.wordmark { font-family: var(--font-display); font-size: 1.875rem; line-height: 1; text-transform: uppercase; letter-spacing: 0.03em; }
.nav { display: none; align-items: center; gap: var(--s8); }
.nav a:not(.btn) { position: relative; padding-block: var(--s2); font-size: var(--fs-small); font-weight: 500; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.menu-btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s4); margin-right: calc(var(--s4) * -1);
  background: none; border: 0; color: var(--text); font: 500 var(--fs-small)/1 var(--font-body); cursor: pointer;
}
.menu-btn:hover { color: var(--accent); }
@media (min-width: 900px) { .nav { display: flex; } .menu-btn { display: none; } }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 55; background: var(--bg);
  padding: var(--s12) var(--margin); display: flex; flex-direction: column; gap: var(--s8); overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { font-family: var(--font-display); font-size: clamp(3.5rem, 16vw, 5.5rem); line-height: 1; text-transform: uppercase; }
.mobile-menu a:not(.btn):hover { color: var(--accent); }
.mobile-menu .btn { align-self: flex-start; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--s8);
  border: 1px solid var(--accent); background: var(--accent); color: var(--bg);
  font: 600 1rem/1 var(--font-body); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.1s;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-color: var(--text); }
.btn--sm { min-height: 44px; padding: 0 var(--s6); font-size: var(--fs-small); }

.link {
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px; font-weight: 500; transition: background-size 0.2s, color 0.2s;
}
.link:hover { background-size: 100% 3px; color: var(--accent); }

/* Posters: rest slightly dimmed where hover exists, wake up on hover / focus */
.poster { position: relative; overflow: hidden; background: var(--bg-2); aspect-ratio: 9 / 16; }
.poster--tall { aspect-ratio: 1080 / 1572; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.35s, transform 0.6s var(--ease); }
@media (hover: hover) {
  .poster--link img { filter: brightness(0.87) saturate(0.95); }
  a:hover > .poster--link img, a:focus-visible > .poster--link img,
  .wall-item:has(.wall-title a:hover) .poster--link img { filter: none; }
  a:hover > .poster--link img { transform: scale(1.025); }
}

/* Project meta (definition lists) */
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s6) var(--gutter); }
.meta dt { color: var(--muted); font-size: var(--fs-small); }
.meta dd { margin-top: var(--s1); font-weight: 500; }

/* Section heading */
.section-head { align-items: end; row-gap: var(--s6); margin-bottom: clamp(48px, 7vw, 104px); }
.section-head h2 { grid-column: 1 / -1; font-size: var(--fs-h2); }
.section-head h1 { grid-column: 1 / -1; font-size: var(--fs-display); }
.section-head p { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-lede); line-height: 1.45; max-width: 32ch; }
@media (min-width: 1024px) { .section-head h2, .section-head h1 { grid-column: 1 / 8; } .section-head p { grid-column: 9 / 13; } }

/* Fit-to-width type: JS sizes each line so a stack of lines shares one width */
.fit { display: block; overflow: hidden; line-height: 0.86; }
.fit-inner { display: inline-block; white-space: nowrap; }

/* 5 — Home ------------------------------------------------------------------ */
.hero { padding-block: clamp(24px, 4vw, 64px) clamp(64px, 9vw, 144px); overflow: clip; }
.hero-grid { row-gap: var(--s12); align-items: center; }
.hero-copy { grid-column: 1 / -1; }
.hero-art { grid-column: 1 / -1; position: relative; aspect-ratio: 1 / 1.3; }
@media (min-width: 640px) { .hero-copy, .hero-art { grid-column: 1 / -1; } .hero-art { max-width: 560px; } }
@media (min-width: 1024px) {
  .hero-copy { grid-column: 1 / 8; }
  .hero-art { grid-column: 8 / 13; max-width: none; }
}
.hero-title { font-size: var(--fs-display); }
.hero-kicker { display: block; margin-bottom: var(--s6); font: 500 var(--fs-small)/1.3 var(--font-body); text-transform: none; letter-spacing: 0.02em; color: var(--muted); }
.hero-title .fit { padding-top: 0.02em; }
.hero-title .fit-inner { animation: rise 0.85s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
.hero-title .fit-inner { font-size: inherit; }
.hero-lede { margin-top: var(--s8); max-width: 36ch; font-size: var(--fs-lede); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s8); margin-top: var(--s8); }
.hero-art .poster { position: absolute; animation: fade 1s var(--ease) both; }
.hero-art .poster--a { top: 0; right: 0; width: 64%; animation-delay: 0.35s; }
.hero-art .poster--b { bottom: 0; left: 0; width: 54%; outline: 6px solid var(--bg); animation-delay: 0.5s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Work: one lead poster per project, hung like a fly-posted wall.
   The uneven drops are deliberate; the full sets live on each case study. */
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s12) var(--gutter); align-items: start; }
.wall-item { display: grid; gap: var(--s3); align-content: start; }
.wall-item:nth-child(even) { margin-top: clamp(40px, 9vw, 80px); }
.wall-item > a { margin-bottom: var(--s2); }
.wall-title { font-size: clamp(2rem, 3.3vw, 3.25rem); overflow-wrap: break-word; hyphens: manual; }
.wall-title a { transition: color 0.2s; }
.wall-title a:hover { color: var(--accent); }
.wall-meta { color: var(--muted); font-size: var(--fs-small); }
.wall-tag { max-width: 30ch; }
/* The last slot on the wall is a link to everything, set like a poster headline */
.wall-all { align-self: stretch; align-content: end; border-top: 1px solid var(--line); padding-top: var(--s4); }
.wall-all-link { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3);
  font-family: var(--font-display); text-transform: uppercase; line-height: 0.9; font-size: clamp(3rem, 5.5vw, 5.5rem); transition: color 0.2s; }
.wall-all-arrow { font-family: var(--font-body); font-size: 0.5em; transition: transform 0.3s var(--ease); }
.wall-all-link:hover, .wall-all-link:focus-visible { color: var(--accent); }
.wall-all-link:hover .wall-all-arrow { transform: translateX(6px); }
@media (min-width: 1024px) {
  .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wall-item:nth-child(2) { margin-top: 112px; }
  .wall-item:nth-child(3) { margin-top: 40px; }
  .wall-item:nth-child(4) { margin-top: 152px; }
}

/* Work page: every project with every piece, one row per project */
.archive-head { padding-bottom: 0; }
.archive { padding-bottom: clamp(72px, 10vw, 160px); }
.archive-item { row-gap: var(--s6); padding-block: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); align-items: start; }
.archive-text { grid-column: 1 / -1; display: grid; gap: var(--s3); align-content: start; }
.archive-text p:not(.wall-meta) { max-width: 40ch; }
.archive-text .link { justify-self: start; margin-top: var(--s2); }
.archive-title { font-size: var(--fs-h3); }
.archive-title a { transition: color 0.2s; }
.archive-title a:hover { color: var(--accent); }
.archive-imgs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 40%), 1fr)); gap: var(--gutter); align-items: start; }
@media (min-width: 1024px) {
  .archive-text { grid-column: 1 / 5; position: sticky; top: calc(var(--header-h) + var(--s6)); }
  .archive-imgs { grid-column: 5 / 13; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Services: an editorial list, not a card grid */
.service { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s3);
  padding-block: clamp(24px, 3vw, 44px); border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
.service h3 { grid-column: 1 / -1; font-size: clamp(2.5rem, 4.6vw, 4.5rem); }
.service p { grid-column: 1 / -1; max-width: 52ch; color: var(--muted); }
@media (min-width: 1024px) { .service h3 { grid-column: 1 / 7; } .service p { grid-column: 8 / 13; align-self: end; } }

/* About */
.about-grid { row-gap: var(--s12); align-items: start; }
.about-img { grid-column: 1 / 4; max-width: 280px; }
.about-copy { grid-column: 1 / -1; display: grid; gap: var(--s6); }
.about-copy h2 { font-size: var(--fs-h2); margin-bottom: var(--s4); }
.about-copy p { max-width: 58ch; }
.about-copy .lede { font-size: var(--fs-lede); line-height: 1.5; }
.about-list { display: grid; gap: var(--s2) var(--gutter); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-top: var(--s6); padding-top: var(--s6); border-top: 1px solid var(--line); color: var(--muted); }
@media (min-width: 640px) { .about-img { grid-column: 1 / 4; max-width: none; } }
@media (min-width: 1024px) { .about-img { grid-column: 1 / 5; } .about-copy { grid-column: 6 / 13; } }

/* Process: a real sequence, so it keeps its numbers; compact, inside About */
.process { margin-top: clamp(64px, 8vw, 112px); }
.process-h { font-size: var(--fs-h3); margin-bottom: var(--s6); }
.steps { display: grid; }
.step { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); column-gap: var(--s3); row-gap: var(--s1); padding-block: var(--s4); border-top: 1px solid var(--line); align-content: start; }
.step-n { grid-row: span 2; font-family: var(--font-display); font-size: 1.75rem; line-height: 1; color: var(--accent); }
.step h4 { margin: 0; font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.75rem; line-height: 1; }
.step p { color: var(--muted); font-size: var(--fs-small); max-width: 34ch; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--gutter); }
  .step { grid-template-columns: 1fr; padding-block: var(--s4) 0; }
  .step-n { grid-row: auto; }
}

/* Testimonials (only rendered when real quotes are provided) */
.quote { padding-block: var(--s12); border-top: 1px solid var(--line); }
.quote blockquote { margin: 0; font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1; text-transform: uppercase; max-width: 22ch; }
.quote figcaption { margin-top: var(--s6); color: var(--muted); }

/* Contact */
.contact-grid { row-gap: var(--s16); align-items: start; }
.contact-copy { grid-column: 1 / -1; display: grid; gap: var(--s6); }
.contact-copy h2 { font-size: var(--fs-h1); }
.contact-copy p { max-width: 34ch; font-size: var(--fs-lede); line-height: 1.5; }
.contact-copy .email { justify-self: start; font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.3; overflow-wrap: anywhere; }
.form { grid-column: 1 / -1; display: grid; gap: var(--s6); }
.field { display: grid; gap: var(--s2); }
.field label { color: var(--muted); font-size: var(--fs-small); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: var(--s3) 0; border: 0; border-bottom: 1px solid var(--field); border-radius: 0;
  background: transparent; color: var(--text); font: 400 1.125rem/1.5 var(--font-body); transition: border-color 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover { border-bottom-color: var(--text); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.form-note { color: var(--muted); font-size: var(--fs-small); }
.form-note[data-state="error"] { color: var(--accent); }
.form .btn { justify-self: start; display: inline-flex; align-items: center; gap: var(--s3); }
.form .btn[aria-busy="true"] { opacity: 0.7; cursor: wait; }
.field--trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 1024px) { .contact-copy { grid-column: 1 / 7; } .form { grid-column: 8 / 13; } }

/* Footer */
.site-footer { padding-block: clamp(56px, 8vw, 112px) var(--s8); border-top: 1px solid var(--line); }
.footer-grid { row-gap: var(--s12); }
.footer-block { grid-column: 1 / -1; display: grid; gap: var(--s2); align-content: start; }
.footer-block h2 { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); margin-bottom: var(--s2); line-height: 1.4; }
.footer-block a { justify-self: start; padding-block: var(--s1); }
.footer-block a:hover { color: var(--accent); }
@media (min-width: 640px) { .footer-block { grid-column: span 4; } }
@media (min-width: 1024px) { .footer-block { grid-column: span 3; } .footer-block:first-child { grid-column: 1 / 7; } }
.footer-mark { margin-top: clamp(48px, 8vw, 128px); font-size: 20vw; color: var(--text); }
.footer-mark .fit { line-height: 0.8; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); margin-top: var(--s8); padding-top: var(--s6); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); }

/* 6 — Case study ------------------------------------------------------------ */
.case-intro { padding-block: clamp(32px, 5vw, 72px) clamp(56px, 8vw, 112px); }
.case-intro .grid { row-gap: var(--s12); align-items: end; }
.case-titleblock { grid-column: 1 / -1; display: grid; gap: var(--s8); }
.case-titleblock h1 { font-size: var(--fs-h1); overflow-wrap: anywhere; }
.case-titleblock .lede { max-width: 40ch; font-size: var(--fs-lede); line-height: 1.5; }
.case-titleblock .meta { padding-top: var(--s6); border-top: 1px solid var(--line); }
.case-cover { grid-column: 1 / -1; max-width: 480px; }
@media (min-width: 640px) { .case-cover { grid-column: 1 / 6; } }
@media (min-width: 1024px) { .case-titleblock { grid-column: 1 / 9; } .case-cover { grid-column: 9 / 13; max-width: none; } }

.case-block { padding-block: clamp(40px, 6vw, 96px); border-top: 1px solid var(--line); row-gap: var(--s6); }
.case-block > h2 { grid-column: 1 / -1; font-size: var(--fs-h3); }
.case-body { grid-column: 1 / -1; display: grid; gap: var(--s8); }
.case-body p { max-width: 62ch; font-size: 1.1875rem; line-height: 1.7; }
@media (min-width: 1024px) { .case-block > h2 { grid-column: 1 / 5; } .case-body { grid-column: 5 / 12; } }

.system { display: grid; gap: var(--s12); }
.system h3 { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); line-height: 1.4; margin-bottom: var(--s3); }
.swatches { display: flex; flex-wrap: wrap; gap: var(--s6) var(--s4); }
.swatch { width: 96px; }
.swatch-chip { display: block; width: 96px; height: 96px; border: 1px solid var(--line); }
.swatch-name { display: block; margin-top: var(--s2); font-size: var(--fs-small); font-weight: 500; line-height: 1.3; }
.swatch-hex { display: block; color: var(--muted); font-size: 0.8125rem; }

.gallery-wrap { padding-block: clamp(40px, 6vw, 96px); border-top: 1px solid var(--line); }
.gallery-wrap > h2 { font-size: var(--fs-h3); margin-bottom: var(--s12); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--s12) var(--gutter); }
.gallery figcaption { margin-top: var(--s3); color: var(--muted); font-size: var(--fs-small); }

.results { color: var(--muted); }

.next { display: block; background: var(--bg-2); border-top: 1px solid var(--line); }
.next-grid { padding-block: clamp(48px, 7vw, 112px); row-gap: var(--s8); align-items: center; }
.next-copy { grid-column: 1 / -1; display: grid; gap: var(--s4); }
.next-label { color: var(--muted); font-size: var(--fs-small); }
.next-title { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 0.92; text-transform: uppercase; transition: color 0.2s; overflow-wrap: anywhere; }
.next-img { grid-column: 1 / -1; max-width: 380px; aspect-ratio: 4 / 3; overflow: hidden; }
.next-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 0.6s var(--ease); }
.next:hover .next-title, .next:focus-visible .next-title { color: var(--accent); }
.next:hover .next-img img { transform: scale(1.04); }
@media (min-width: 640px) { .next-copy { grid-column: 1 / 6; } .next-img { grid-column: 6 / 9; max-width: none; } }
@media (min-width: 1024px) { .next-copy { grid-column: 1 / 9; } .next-img { grid-column: 9 / 13; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
