/* ============================================================
   Tess Brumwell-Gaze — portfolio, version 2
   Set in Ronzino by Collletttivo (SIL Open Font License, see Ronzino-LICENSE.txt)
   ============================================================ */

@font-face { font-family: "Ronzino"; src: url("Ronzino-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("Ronzino-Oblique.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("Ronzino-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("Ronzino-MediumOblique.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Ronzino"; src: url("Ronzino-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ===== COLOURS — change these and the whole site follows ===== */
:root {
  --ground: #e9e9e6;     /* page background, cool pale grey */
  --sheet: #f8f8f6;      /* the scrolling column */
  --ink: #000000;        /* text */
  --muted: #5d5d58;      /* secondary text */
  --rule: #d2d2cc;       /* thin lines */
  --sky: #9cbbe0;        /* poster blue: the one big colour */
  --sky-deep: #2f5f94;   /* deeper blue for links and focus */
  --lime: #e8edb4;       /* small category tags */
  --frame: #dbe6f4;      /* pale blue behind every case study picture */
  --mustard: #f2c94c;    /* panel band */
  --tomato: #e4572e;     /* panel band */

  --radius: 14px;
  --gap: 10px;           /* space around the panels */
  --bar: 52px;           /* height of the top bar */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ground); color: var(--ink);
  font-family: "Ronzino", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; } /* anything marked hidden really disappears */
:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }
.hidden { display: none; }

/* ===== TOP BAR ===== */
.bar {
  position: sticky; top: var(--gap); z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--bar); margin: var(--gap) var(--gap) 0; padding: 0 20px;
  background: var(--sheet); border-radius: var(--radius);
  box-shadow: 0 calc(var(--gap) * -1) 0 var(--gap) var(--ground); /* hides content scrolling behind the gap */
}
.bar-name { font-size: 22px; font-weight: 700; text-decoration: none; letter-spacing: -.035em; }
.bar nav { display: flex; gap: 28px; }
.bar nav a { text-decoration: none; color: var(--muted); }
.bar nav a:hover { color: var(--ink); }

/* ===== THE SPLIT ===== */
.split {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--gap); padding: var(--gap);
}

/* LEFT: the poster panel */
.poster {
  position: sticky; top: calc(var(--bar) + var(--gap) * 2);
  height: calc(100vh - var(--bar) - var(--gap) * 3);
  background: var(--panel, var(--sky)); border-radius: var(--radius);
  overflow: hidden; transition: background-color .45s ease;
}
.poster-type {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  transition: opacity .35s ease;
}
.poster-type span {
  display: block; font-weight: 700; color: var(--ink);
  font-size: min(52vh, 32vw); line-height: .74; letter-spacing: -.07em;
  margin: 0 0 -.04em -.06em; white-space: nowrap;
  animation: rise 1.1s cubic-bezier(.2, .7, .1, 1) both;
}
@keyframes rise { from { transform: translateY(18%); } to { transform: none; } }
.poster-foot { position: absolute; top: 18px; left: 22px; font-weight: 500; z-index: 1; }

/* The illustration: it rises in once, then each piece bobs gently */
.poster-art { position: absolute; inset: 0; display: grid; place-items: center; padding: 8% 7%; transition: opacity .35s ease; }

.notfound { max-width: 720px; margin: 0 auto; padding: 18vh 24px; }
.notfound h1 { font-size: clamp(40px, 6vw, 80px); letter-spacing: -.04em; line-height: 1; margin-bottom: 18px; }

/* Locked case study: overview stays public, the write-up opens with a password */
.lock-card { background: var(--lime); border-radius: var(--radius); padding: clamp(26px, 3.4vw, 44px); }
.cs-body .lock-card + * { margin-top: 0; }
.lock-title { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.1; font-weight: 500; letter-spacing: -.025em; margin: 0 0 12px; max-width: 16ch; }
.lock-card p { max-width: 42ch; }
.unlock { margin-top: 22px; }
.unlock label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.unlock-row { display: flex; gap: 8px; max-width: 420px; }
.unlock input { flex: 1; min-width: 0; font: inherit; padding: 11px 14px; border: 1px solid var(--ink); border-radius: 10px; background: #fff; }
.unlock button { font: inherit; font-weight: 500; padding: 11px 20px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; cursor: pointer; }
.unlock button:hover { background: var(--sky-deep); }
.unlock-error { margin-top: 10px; font-size: 15px; }
.lock-ask { display: inline-block; margin-top: 20px; font-weight: 500; }
.locked.opening { opacity: .5; }

/* Typed headline that gets scribbled out and rewritten */
.rewrite { position: relative; width: 100%; max-width: 620px; }
.rewrite p { margin: 0; }
.draft { font-size: clamp(28px, 3.4vw, 50px); line-height: 1.12; font-weight: 500; letter-spacing: -.025em; max-width: 15ch; transition: opacity .6s ease; min-height: 3.36em; } /* room for three lines, so nothing jumps while typing */
.draft.struck { opacity: .55; }
.final { font-size: clamp(64px, 8.4vw, 136px); line-height: .95; font-weight: 700; letter-spacing: -.05em; margin-top: .22em !important; min-height: .95em; }
.caret { display: inline-block; width: .06em; min-width: 2px; height: .9em; margin-left: .04em; background: currentColor; vertical-align: -.08em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.rewrite .scribble { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; pointer-events: none; animation: none; }
.scribble path { fill: none; stroke: var(--tomato); stroke-linecap: round; stroke-linejoin: round; }
.poster-art svg { width: 100%; max-width: 640px; height: auto; overflow: visible; animation: rise 1.1s cubic-bezier(.2, .7, .1, 1) both; }
@keyframes rise { from { transform: translateY(6%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(.6deg); } }
.bob { animation: bob 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* Hovering a project swaps in its picture */
.poster-preview {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 8% 9% 64px;
  opacity: 0; transition: opacity .35s ease;
}
.poster-preview img { max-height: calc(100vh - var(--bar) - var(--gap) * 3 - 170px); max-width: 100%; width: auto; border-radius: 8px; }
.poster-preview .device { display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.poster-preview video {
  max-height: calc(100vh - var(--bar) - var(--gap) * 3 - 170px); max-width: 100%; width: auto;
  border-radius: 26px; border: 6px solid #000; background: #000; box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}
/* Desktop screen: a simple screen frame, for work shown on a computer */
.poster-preview .device.desktop { width: 100%; }
.poster-preview .device.desktop video {
  width: 100%; height: auto; max-height: none; aspect-ratio: 16 / 10;
  border: 12px solid #151515; border-radius: 14px; background: #fff;
}
.poster-preview figcaption { position: absolute; left: 22px; bottom: 18px; right: 22px; font-weight: 500; }
.poster.previewing .poster-preview { opacity: 1; }
.poster.previewing .poster-type { opacity: 0; }
.poster.previewing .poster-art { opacity: 0; } /* the project picture sits on plain blue */

/* RIGHT: the scrolling column */
.column { background: var(--sheet); border-radius: var(--radius); padding: 0 clamp(22px, 3.4vw, 52px); min-width: 0; }
.block { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--rule); }
.block:first-child { border-top: 0; }
.block { scroll-margin-top: 20px; }
@media (max-width: 900px) { .block { scroll-margin-top: 84px; } } /* keeps headings clear of the top bar when jumping to them */

.label { font-size: 15px; font-weight: 500; letter-spacing: 0; margin-bottom: 22px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.count { color: var(--muted); font-size: 15px; }

.lede-xl { font-size: clamp(50px, 6.4vw, 104px); line-height: .98; font-weight: 500; letter-spacing: -.04em; max-width: 11ch; }
.lede { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.4; max-width: 34ch; margin-top: 22px; }
.intro .lede { color: var(--muted); }
.about-text { margin: 18px 0 30px; }

/* Work list: title and skill tag, no pictures */
.work-list { list-style: none; border-top: 1px solid var(--ink); }
.work-list li + li { border-top: 1px solid var(--rule); }
.work-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px 28px;
  padding: 26px 0; text-decoration: none; transition: padding-left .25s ease;
}
.work-row:hover, .work-row:focus-visible { padding-left: 10px; }
.work-title { font-size: clamp(23px, 2vw, 30px); line-height: 1.15; font-weight: 500; letter-spacing: -.025em; max-width: 21ch; }
.tags, .cs-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-row .tags { flex: none; flex-direction: column; align-items: flex-end; transform: translateY(-3px); }

/* Skill tags: all lime. (Each tag still carries its group class, tag-lead / tag-innov / tag-grow / tag-craft, if colours are wanted again.) */
.work-name { display: grid; gap: 6px; }
.work-client { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* About: photo strip that drifts sideways on its own, looping forever. Hover to pause. */
.carousel { overflow: hidden; margin-right: calc(clamp(22px, 3.4vw, 52px) * -1); padding-bottom: 6px; }
.carousel-track { list-style: none; display: flex; width: max-content; animation: drift var(--dur, 60s) linear infinite; }
.carousel:hover .carousel-track { animation-play-state: paused; }
.carousel li { flex: none; padding-right: 14px; }
.carousel img { height: clamp(300px, 46vh, 460px); width: auto; border-radius: 10px; display: block; }
@keyframes drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .carousel { overflow-x: auto; scrollbar-width: none; }
  .carousel-track { animation: none; }
}

/* Logo row under the intro */
.clients { margin-top: 44px; }
.clients .label { margin-bottom: 18px; color: var(--muted); }
.logo-row { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 22px 34px; }
.logo-row img { height: var(--h, 28px); width: auto; display: block; }
.tag { display: inline-block; background: var(--lime); color: var(--ink); font-size: 13px; font-weight: 500; padding: 2px 9px 3px; border-radius: 999px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.plain { list-style: none; }
.plain li { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.plain li:first-child { border-top: 1px solid var(--ink); }

/* Contact */
.big-link { font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -.02em; display: inline-block; margin: 26px 0 34px; }
.big-link:hover { color: var(--sky-deep); }
form { display: grid; gap: 14px; max-width: 560px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
form input, form textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--rule); border-radius: 10px; padding: 11px 13px;
}
form input:focus, form textarea:focus { border-color: var(--sky-deep); outline: none; box-shadow: 0 0 0 3px rgba(156, 187, 224, .55); }
form button {
  justify-self: start; font: inherit; font-weight: 500; cursor: pointer;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px;
}
form button:hover { background: var(--sky-deep); }

.colophon {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 0 26px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px;
}
.colophon a { text-decoration: none; }
.colophon a:hover { color: var(--ink); }

/* ===== CASE STUDY PAGES ===== */
.poster-cs { display: flex; flex-direction: column; padding: 22px 26px 26px; overflow-y: auto; }
.back { font-weight: 500; text-decoration: none; }
.back::before { content: "← "; }
.back:hover { text-decoration: underline; }
.cs-head { margin-top: auto; padding-top: 48px; }
.cs-head p { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; font-weight: 500; }
.cs-head h1 { font-size: clamp(36px, 4.4vw, 66px); line-height: 1; font-weight: 700; letter-spacing: -.045em; max-width: 14ch; }
.facts { margin-top: 36px; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid rgba(0, 0, 0, .22); font-size: 15px; line-height: 1.45; }
.facts dt { font-weight: 500; }

.cs-body > * + * { margin-top: 18px; }
.cs-body { max-width: 66ch; }
.cs-h2 { font-size: clamp(25px, 2.2vw, 32px); line-height: 1.15; font-weight: 500; letter-spacing: -.025em; padding-top: 30px; }
.cs-body > .cs-h2:first-child { padding-top: 0; }
.cs-h3 { font-size: 17px; font-weight: 500; padding-top: 8px; }
.cs-body ul, .cs-body ol { padding-left: 1.2em; }
.cs-body li + li { margin-top: 8px; }
.cs-body li::marker { color: var(--muted); }
.note { color: var(--muted); font-style: italic; }

.impact { background: var(--panel, var(--sky)); border-radius: var(--radius); padding: 24px 26px; }
.impact h3 { font-size: 15px; font-weight: 500; margin-bottom: 12px; }
.impact ul { list-style: none; padding: 0 !important; }
.impact li { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.3; font-weight: 500; letter-spacing: -.015em; padding: 10px 0; border-top: 1px solid rgba(0, 0, 0, .22); margin: 0 !important; }

blockquote { border-left: 3px solid var(--sky); padding-left: 22px; }
blockquote p { font-size: clamp(20px, 1.7vw, 25px); line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
blockquote p + p { margin-top: 16px; }

.cs-fig { margin-top: 34px !important; margin-bottom: 16px; }
.cs-fig .frame { background: var(--ground); border-radius: var(--radius); padding: clamp(14px, 3vw, 34px); display: grid; place-items: center; }
.cs-fig .frame.pair { grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); align-items: center; }
.cs-fig img { border-radius: 6px; max-height: 640px; width: auto; }
.cs-video { max-height: 720px; width: auto; max-width: 100%; border-radius: 26px; border: 6px solid #000; background: #000; }
.cs-fig figcaption { color: var(--muted); font-size: 15px; margin-top: 10px; }

.next { display: grid; gap: 8px; }
.next .label { margin: 0; color: var(--muted); }
.next a { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; font-weight: 500; letter-spacing: -.03em; text-decoration: none; }
.next a:hover { color: var(--sky-deep); }

/* ===== SMALLER SCREENS ===== */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .poster { position: relative; top: 0; height: 36vh; min-height: 240px; }
  .poster-art { padding: 52px 9% 14px; }
  .draft { font-size: 7vw; } .final { font-size: 15vw; }
  .poster-type span { font-size: 46vw; }
  .poster-preview { display: none; }
  .poster-cs { height: auto; min-height: 0; }
  .bar nav { gap: 16px; }
  .bar nav a:last-child { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar-name { font-size: 15px; }
  .bar nav a { font-size: 15px; }
  .two-col, .field-row { grid-template-columns: 1fr; }
  .work-row { flex-direction: column; align-items: flex-start; padding: 22px 0; }
  .work-row .tags { flex-direction: row; align-items: flex-start; transform: none; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .cs-fig .frame.pair { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poster-type span, .poster-art svg, .bob, .caret { animation: none; }
  .poster, .poster-type, .poster-art, .poster-preview, .work-row { transition: none; }
}

/* ===== DESKTOP: only the right-hand column scrolls; the bar and blue panel stay still ===== */
@media (min-width: 901px) {
  html, body { height: 100%; overflow: hidden; }
  body { display: flex; flex-direction: column; }
  .bar { position: relative; top: 0; flex: none; box-shadow: none; }
  .split { flex: 1; min-height: 0; }
  .poster { position: relative; top: 0; height: 100%; }
  .column { height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: thin; }
}
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .column { scroll-behavior: auto; }
}
