/* ==========================================================================
   Canvased Studio — main stylesheet
   Palette: cream #FFFAEE · rust #B83807 · cobalt #2B4BD8 · ink #3B3A3A · stone #C0BDBD · mist #D9D9D9
   Colour rules:
     1. Rust   = the brand + the Creative discipline (wordmark, headings, buttons, creative work)
     2. Cobalt = the Technology discipline + every interaction (links, hovers, focus, selection)
     Add class="tech" to any element to switch its --accent from rust to cobalt.
   Type:    Inter Tight (swap for Neue Montreal via @font-face if licensed)
   ========================================================================== */

/* Self-hosted Inter Tight (SIL Open Font License) */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-tight-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-tight-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-tight-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/inter-tight-latin-800-normal.woff2") format("woff2"); }

:root {
  --cream: #FFFAEE;
  --rust: #B83807;
  --rust-dark: #8C2A05;
  --rust-soft: rgba(184, 56, 7, .28);
  --cobalt: #2B4BD8;
  --cobalt-dark: #1F37A8;
  --cobalt-soft: rgba(43, 75, 216, .3);
  --muted: #6F6B69; /* readable grey for placeholders and fine print (4.9:1 on cream) */
  --ink: #3B3A3A;
  --stone: #C0BDBD;
  --mist: #D9D9D9;
  --success: #2E7D32;
  --error: #C62828;

  --font: "Inter Tight", "Neue Montreal", "Helvetica Neue", Arial, sans-serif;

  --max: 1440px;
  --gutter: clamp(16px, 4.4vw, 64px);
  --col-gap: clamp(12px, 1.6vw, 24px);
  --section: clamp(88px, 11vw, 160px);
  --radius: 6px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Discipline accent (rust by default, cobalt inside .tech) */
  --accent: var(--rust);
  --accent-dark: var(--rust-dark);
  --accent-soft: var(--rust-soft);
}
.tech {
  --accent: var(--cobalt);
  --accent-dark: var(--cobalt-dark);
  --accent-soft: var(--cobalt-soft);
}
.c-rust { color: var(--rust); }
.c-cobalt { color: var(--cobalt); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--cobalt); color: var(--cream); }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Page frame (thin border like a canvas edge) ---------- */
.frame {
  max-width: var(--max);
  margin: 0 auto;
  border-left: 1px solid var(--rust-soft);
  border-right: 1px solid var(--rust-soft);
  background: var(--cream);
}
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

/* ---------- Arrow glyph ---------- */
.arrow::after {
  content: "";
  display: inline-block;
  width: .68em; height: .68em;
  margin-left: .32em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 10 10 2M3.5 2H10v6.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 10 10 2M3.5 2H10v6.5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .35s var(--ease);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px;
  border: 1.5px solid var(--rust);
  border-radius: var(--radius);
  background: transparent;
  color: var(--rust);
  font-size: 14px; font-weight: 600; line-height: 1;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--cobalt); border-color: var(--cobalt); color: var(--cream); }
.btn:active { background: var(--cobalt-dark); border-color: var(--cobalt-dark); color: var(--cream); }
.btn:disabled, .btn.is-disabled { background: var(--mist); border-color: var(--mist); color: #fff; cursor: not-allowed; }
.btn--solid { background: var(--rust); color: var(--cream); }
.btn--solid:hover { background: var(--cobalt); border-color: var(--cobalt); }
.btn--wide { min-width: 220px; }
.btn:hover.arrow::after { transform: translate(2px, -2px); }

.link {
  display: inline-flex; align-items: center;
  color: var(--cobalt); font-size: 14px; font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  padding-bottom: 2px;
  transition: background-size .35s var(--ease);
}
.link:hover { background-size: 100% 1.5px; }
.link:hover.arrow::after { transform: translate(2px, -2px); }

.label {
  color: var(--rust);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -.01em;
}
.caption { font-size: 12px; color: var(--accent); }
.eyebrow { font-size: 12px; color: var(--accent); letter-spacing: .02em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  transition: transform .45s var(--ease), box-shadow .3s;
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--rust-soft); }
.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 84px;
}
.logo {
  font-weight: 800; font-size: 18px; letter-spacing: .02em; color: var(--rust);
}
.dot { color: var(--cobalt); }
.nav { display: flex; gap: clamp(28px, 3.4vw, 56px); }
.nav a {
  font-size: 14px; color: var(--rust);
  transition: color .25s, background-size .35s var(--ease);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
}
.nav a:hover, .nav a[aria-current="page"] { background-size: 100% 1px; color: var(--cobalt); }
.site-header .btn { justify-self: end; }
.menu-toggle {
  display: none; justify-self: end;
  background: none; border: 0; padding: 8px 0;
  color: var(--rust); font-size: 14px; font-weight: 500; cursor: pointer;
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--cream);
  display: flex; flex-direction: column;
  padding: 0 var(--gutter) 32px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease);
  visibility: hidden;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.mobile-menu__top { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.mobile-menu nav { margin-top: 48px; display: grid; gap: 8px; }
.mobile-menu nav a {
  font-size: clamp(44px, 13vw, 72px); font-weight: 700; letter-spacing: -.03em;
  color: var(--rust); line-height: 1.05;
}
.mobile-menu nav a:hover { color: var(--cobalt); }
.mobile-menu nav a span { color: var(--cobalt); font-size: 14px; font-weight: 400; vertical-align: top; margin-right: 8px; letter-spacing: 0; }
.mobile-menu__foot { margin-top: auto; display: grid; gap: 20px; font-size: 14px; }
.mobile-menu__foot .btn { width: 100%; padding: 16px; }

/* ---------- Wordmark (fit-to-width) ---------- */
.wordmark {
  display: block;
  color: var(--rust);
  font-weight: 700;
  line-height: .78;
  letter-spacing: -.035em;
  white-space: nowrap;
  font-size: 17.4vw; /* JS refines this to fit exactly */
  text-align: center;
}
.wordmark .ch { display: inline-block; }
.wordmark .ch:last-child { letter-spacing: 0; }
.wordmark[data-animate] .ch {
  transform: translateY(105%);
  animation: rise 1.1s var(--ease) forwards;
}
.wordmark-clip { overflow: hidden; padding-bottom: .02em; }
@keyframes rise { to { transform: translateY(0); } }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(16px, 2.4vw, 32px); padding-bottom: var(--section); }
.hero__kicker {
  text-align: center;
  color: var(--rust);
  font-size: clamp(16px, 2vw, 28px);
  font-weight: 400;
  letter-spacing: -.01em;
  margin-bottom: clamp(4px, .6vw, 10px);
}
.hero__gallery {
  margin-top: clamp(20px, 2.6vw, 40px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: var(--col-gap);
  transition: grid-template-columns .8s var(--ease);
}
.hero-shot { display: block; min-width: 0; }
.hero-shot:nth-of-type(3) { grid-column: 4; grid-row: 1; }
.hero-shot__img { height: clamp(260px, 25vw, 380px); overflow: hidden; }
.hero-shot__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hero-shot:hover img { transform: scale(1.04); }
.hero-shot figcaption { margin-top: 10px; font-size: 12px; color: var(--accent); white-space: nowrap; overflow: hidden; }
.hero-shot figcaption span {
  display: inline-block; opacity: 0; transform: translateX(-6px);
  transition: opacity .4s, transform .5s var(--ease);
}
.hero-shot:hover figcaption span, .hero-shot:focus-visible figcaption span { opacity: 1; transform: none; }
.hero__intro {
  grid-column: 3; grid-row: 1;
  align-self: end;
  display: grid; gap: 18px; justify-items: start;
  padding-bottom: 28px;
  min-width: 0;
}
.hero__intro p { font-size: 14px; line-height: 1.45; max-width: 30ch; }
.hero__dots { display: none; }

/* ---------- Hero stage (desktop, JS-driven) ----------
   main.js adds .is-ready and positions the title, the three shots and the intro
   absolutely, then moves them between states:
     default   title on top, four-column row below
     big-left  shot 1 or 2 expands left, title shrinks into the right column
     big-right shot 3 expands right, title shrinks into the left column
   Positions change via left/top/width/height so object-fit keeps images crisp. */
.hero__stage { position: relative; }
.hero__stage.is-ready .hero__title {
  position: absolute; left: 0; top: 0; width: 100%;
  transform-origin: 0 0;
  transition: transform .95s var(--ease);
  z-index: 1;
}
.hero__stage.is-ready .hero__gallery { display: contents; }
.hero__stage.is-ready .hero-shot {
  position: absolute; left: 0; top: 0; z-index: 2;
  will-change: left, top, width, height, transform;
  transition: left .95s var(--ease), top .95s var(--ease), width .95s var(--ease), height .95s var(--ease),
              transform .95s var(--ease), opacity .6s ease;
}
.hero__stage.is-ready .hero-shot figure,
.hero__stage.is-ready .hero-shot__img { width: 100%; height: 100%; }
.hero__stage.is-ready .hero-shot figcaption {
  position: absolute; left: 0; top: 100%; margin-top: 10px;
  transition: opacity .5s ease;
}
.hero__stage.is-ready .hero-shot:hover img { transform: none; }
.hero__stage.is-ready .hero-shot figcaption span { transition-delay: 0s; }
.hero__stage.is-ready .hero-shot.is-big figcaption span { opacity: 1; transform: none; transition-delay: .45s; }
.hero__stage.is-ready .hero__intro {
  position: absolute; left: 0; top: 0; padding: 0;
  transition: left .95s var(--ease), top .95s var(--ease), opacity .6s ease;
}
.hero__stage.is-intro .hero-shot figcaption { opacity: 0; }
.hero__stage.is-intro .hero-shot { box-shadow: 0 18px 40px -18px rgba(59, 58, 58, .45); }
.hero__stage.no-anim, .hero__stage.no-anim * { transition: none !important; }
.js .hero__stage:not(.is-ready) .hero-shot,
.js .hero__stage:not(.is-ready) .hero__intro { visibility: hidden; animation: heroFallback 0s 3s forwards; }
@keyframes heroFallback { to { visibility: visible; } }

/* ---------- Section heads ---------- */
.section { padding-bottom: var(--section); }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* ---------- Stats (case study results) ---------- */
.stat { color: var(--rust); }
.stat strong {
  display: block;
  font-size: clamp(30px, 3vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1;
}
.stat > span { display: block; margin-top: 6px; font-size: 14px; color: var(--ink); }
.stat small { display: block; font-size: 10px; color: var(--ink); opacity: .7; }

/* ---------- About ---------- */
.about__head { align-items: start; margin-bottom: clamp(48px, 6vw, 96px); }
.about__head .label { grid-column: 1 / 4; padding-top: .35em; }
.about__lead {
  grid-column: 4 / 13;
  max-width: 26ch;
  font-size: clamp(28px, 3.3vw, 50px); font-weight: 500;
  line-height: 1.08; letter-spacing: -.028em;
  color: var(--ink);
}
.about__body { align-items: start; row-gap: 40px; }
.about__img1, .about__img2 { margin: 0; }
.about__img1 { grid-column: 1 / 5; }
.about__img1 img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__copy { grid-column: 6 / 9; align-self: end; display: grid; gap: 28px; justify-items: start; }
.about__copy p { font-size: 16px; line-height: 1.55; max-width: 40ch; }
.principles { width: 100%; }
.principles li {
  display: grid; grid-template-columns: 32px 1fr; gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--accent-soft);
  font-size: 14px; line-height: 1.4;
}
.principles li:last-child { border-bottom: 1px solid var(--accent-soft); }
.principles li span { color: var(--accent); font-size: 12px; font-weight: 600; padding-top: 1px; }
.about__img2 { grid-column: 10 / 13; margin-top: clamp(96px, 14vw, 220px); }
.about__img2 img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.about__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px var(--col-gap);
  margin-top: clamp(64px, 8vw, 128px);
}
.about-stat { border-top: 1.5px solid var(--accent); padding-top: 18px; color: var(--accent); }
.about-stat__num {
  display: block;
  font-size: clamp(48px, 5.6vw, 88px); font-weight: 700;
  letter-spacing: -.04em; line-height: .92;
}
.about-stat__label { display: block; margin-top: 14px; font-size: 14px; line-height: 1.4; color: var(--ink); max-width: 22ch; }
.about-stat__sub { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: 5fr 1fr 6fr; align-items: start; }
.service { display: contents; }
.service-group {
  grid-column: 1;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  padding: 26px 0 4px;
}
.service-group::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.service-group:first-child { padding-top: 0; }
.service__btn {
  grid-column: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%;
  padding: 14px 0 8px;
  background: none; border: 0;
  border-bottom: 1px solid var(--accent-soft);
  color: var(--accent);
  font-size: 14px; letter-spacing: .02em; text-transform: uppercase; text-align: left;
  cursor: pointer;
  transition: border-color .3s, padding .4s var(--ease);
}
.service__btn:hover { border-color: var(--accent); padding-left: 6px; }
.service__btn .arrow::after { width: 12px; height: 12px; }
.service.is-active .service__btn { border-bottom-color: var(--accent); border-bottom-width: 2px; font-weight: 600; }
.service.is-active .service__btn .arrow::after { transform: rotate(90deg); }
.service__btn .num { margin-right: 6px; }
.service__panel {
  grid-column: 3; grid-row: 1 / span 12;
  display: none;
}
.service.is-active .service__panel { display: grid; animation: fadeUp .6s var(--ease); }
.service__panel { grid-template-columns: 1fr 1fr; gap: 24px var(--col-gap); }
.service__panel p { grid-column: 1 / -1; max-width: 52ch; font-size: 15px; }
.service__panel ul { grid-column: 1 / -1; display: grid; gap: 2px; }
.service__panel li { position: relative; padding-left: 16px; font-size: 14px; }
.service__panel li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.service__panel figure { position: relative; }
.service__tag { position: absolute; left: 10px; top: 10px; padding: 4px 9px; background: var(--accent); color: var(--cream); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.service__panel .service__foot { grid-column: 1; align-self: end; }
.service__panel figure { grid-column: 2; margin: 0; }
.service__panel figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Journal ---------- */
.journal__grid { align-items: start; }
.post { display: block; }
.post__img { overflow: hidden; }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post:hover .post__img img { transform: scale(1.04); }
.post__meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--ink); }
.post__meta span { color: var(--accent); font-weight: 600; }
.post__title { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--accent); line-height: 1.3; max-width: 34ch; }
.post--a { grid-column: 1 / 4; }
.post--a .post__img { aspect-ratio: 4 / 5; }
.post--b { grid-column: 4 / 7; }
.post--b .post__img { aspect-ratio: 1; }
.post--c { grid-column: 7 / 13; }
.post--c .post__img { aspect-ratio: 7 / 5; }

/* ---------- Work ---------- */
.work__list { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: clamp(40px, 5vw, 72px); }
.project { display: grid; gap: 10px var(--col-gap); align-items: start; cursor: none; }
.project__img { overflow: hidden; }
.project__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.project:hover .project__img img { transform: scale(1.035); }
.project__meta { font-size: 11px; color: var(--ink); line-height: 1.35; }
.project__name { display: block; font-size: 15px; color: var(--accent); font-weight: 500; letter-spacing: .02em; margin-bottom: 2px; }
.project:hover .project__name { text-decoration: underline; text-underline-offset: 3px; }
.project--1 { grid-column: 1 / 9; grid-row: 1; grid-template-columns: 5fr 1.4fr; }
.project--1 .project__img { aspect-ratio: 16 / 11; }
.project--2 { grid-column: 9 / 13; grid-row: 1; align-self: end; grid-template-columns: 1fr 2.2fr; }
.project--2 .project__img { aspect-ratio: 9 / 7; }
.project--3 { grid-column: 1 / 6; grid-row: 2; align-self: end; grid-template-columns: 1fr 2.4fr; }
.project--3 .project__meta { text-align: right; }
.project--3 .project__img { aspect-ratio: 9 / 7; }
.project--4 { grid-column: 6 / 13; grid-row: 2; grid-template-columns: 1fr 4.2fr; }
.project--4 .project__img { aspect-ratio: 7 / 5; }
.work__all { grid-column: 1 / 5; grid-row: 3; }

/* Cursor bubble for projects */
.cursor-bubble {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%;
  background: var(--accent); color: var(--cream);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  pointer-events: none;
  transform: scale(0);
  transition: transform .35s var(--ease), background .3s;
}
.cursor-bubble.is-on { transform: scale(1); }

/* ---------- Contact ---------- */
.contact__grid { align-items: start; }
.contact__intro { grid-column: 1 / 4; display: grid; gap: 24px; }
.contact__intro p { font-size: 14px; }
.contact__form { grid-column: 5 / 13; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px var(--col-gap); }
.field { position: relative; }
.field--full { grid-column: 1 / -1; }
.field input {
  width: 100%;
  padding: 6px 0 8px;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rust-soft);
  font-size: 14px; color: var(--ink);
  border-radius: 0;
  transition: border-color .25s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:hover { border-color: var(--rust); }
.field input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 1px 0 var(--cobalt); }
.field textarea {
  width: 100%; min-height: 160px; resize: vertical;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--rust-soft); border-radius: 2px;
  font-size: 14px;
  transition: border-color .25s;
}
.field textarea:hover { border-color: var(--rust); }
.field textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt); }
.field.is-error input { border-color: var(--error); }
.field.is-valid input { border-color: var(--success); }
.field__msg { position: absolute; left: 0; top: 100%; margin-top: 4px; font-size: 11px; color: var(--error); }
.field__legend { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.chips__group { display: flex; flex-wrap: wrap; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.chip span:hover { background: var(--accent-soft); }
.chip input:checked + span { background: var(--accent); color: var(--cream); }
.chip input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.form__actions { grid-column: 1 / -1; display: grid; gap: 10px; justify-items: start; }
.consent { font-size: 10px; color: var(--muted); max-width: 60ch; }
.consent a:hover { color: var(--cobalt); }
.consent a { text-decoration: underline; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(59, 58, 58, .35);
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
  padding: 16px;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  background: var(--cream);
  border: 1px solid var(--rust-soft);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  color: var(--rust);
  border-top: 4px solid var(--cobalt);
  width: min(460px, 100%);
  transform: translateY(16px);
  transition: transform .5s var(--ease);
}
.modal.is-open .modal__box { transform: none; }
.modal__box h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 400; line-height: 1.25; margin-bottom: 28px; }
.modal__box .btn { min-width: 200px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--rust); color: var(--cream); overflow: hidden; }
.footer__top { padding-top: clamp(48px, 5vw, 72px); row-gap: 40px; }
.footer__contact { grid-column: 1 / 5; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.5; display: grid; gap: 14px; align-content: start; }
.footer__nav { grid-column: 5 / 7; }
.footer__social { grid-column: 7 / 9; }
.footer__nav, .footer__social { display: grid; gap: 4px; align-content: start; font-size: 13px; }
.footer__nav a:hover, .footer__social a:hover, .footer__contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__news { grid-column: 9 / 13; }
.footer__news h4 { font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.news-form { display: flex; align-items: end; gap: 12px; border-bottom: 1px solid rgba(255, 250, 238, .7); }
.news-form input { flex: 1; background: none; border: 0; padding: 6px 0 8px; font-size: 13px; color: var(--cream); }
.news-form input::placeholder { color: rgba(255, 250, 238, .7); }
.news-form input:focus { outline: none; }
.news-form button { background: none; border: 0; color: var(--cream); font-size: 13px; font-weight: 600; padding: 6px 0 8px; cursor: pointer; }
.footer__news .consent { color: rgba(255, 250, 238, .65); margin-top: 10px; }
.footer__news .is-done { font-size: 13px; margin-top: 10px; }
.footer__mark { margin-top: clamp(40px, 6vw, 88px); }
.footer__mark .wordmark { color: var(--cream); line-height: .74; transform: translateY(6%); }
.footer__bar {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 14px; padding-bottom: 16px;
  border-top: 1px solid rgba(255, 250, 238, .35);
  font-size: 11px;
}
.footer__bar a:hover { text-decoration: underline; }

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

/* ==========================================================================
   Case study page
   ========================================================================== */
.crumbs { display: flex; gap: 8px; font-size: 11px; color: var(--ink); padding: 4px 0 24px; }
.crumbs a:hover { color: var(--cobalt); }
.crumbs [aria-current] { color: var(--rust); }
.crumbs span[aria-hidden] { opacity: .6; }
.cs-head { align-items: start; padding-bottom: clamp(56px, 7vw, 96px); }
.cs-thumbs { grid-column: 1 / 5; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 320px; }
.cs-thumbs img { aspect-ratio: 5 / 4; width: 100%; object-fit: cover; }
.cs-facts { grid-column: 7 / 13; display: grid; gap: 2px; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.2; letter-spacing: -.01em; }
.cs-facts dt { display: inline; color: var(--ink); }
.cs-facts dd { display: inline; margin: 0; color: var(--rust); }
.cs-facts dd .tech { color: var(--cobalt); }
.cs-facts div { margin: 0; }
.cs-row { align-items: start; padding-bottom: clamp(40px, 5vw, 64px); }
.cs-row .label, .cs-side { grid-column: 1 / 5; }
.cs-side .label { display: block; }
.cs-row .cs-body { grid-column: 7 / 13; font-size: 15px; max-width: 54ch; }
.cs-wide { padding-bottom: clamp(56px, 6vw, 88px); }
.cs-wide img { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; }
.cs-gallery { grid-column: 7 / 13; display: grid; grid-template-columns: 3fr 1fr; gap: 12px; margin-top: 24px; }
.cs-gallery img { width: 100%; height: 100%; object-fit: cover; }
.cs-gallery .stack { display: grid; gap: 12px; }
.cs-gallery .stack img { aspect-ratio: 1; }
.cs-strategy-img { grid-column: 5 / 7; }
.cs-strategy-img img { width: 100%; aspect-ratio: 8 / 9; object-fit: cover; }
.cs-row .cs-body--list { grid-column: 7 / 13; }
.bullets { display: grid; gap: 6px; }
.bullets li { position: relative; padding-left: 18px; font-size: 15px; }
.bullets li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.results .stat { color: var(--accent); }
.results { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px var(--col-gap); }
.results .stat strong { font-size: clamp(36px, 4vw, 60px); }
.cs-next {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  border-top: 1px solid var(--rust-soft);
  padding-top: 24px;
  margin-bottom: var(--section);
}
.cs-next__title { font-size: clamp(40px, 7vw, 104px); font-weight: 700; letter-spacing: -.035em; color: var(--accent); line-height: .9; transition: letter-spacing .6s var(--ease); }
.cs-next:hover .cs-next__title { letter-spacing: -.02em; }
.disc-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.disc-legend span { padding: 4px 10px; border: 1px solid var(--accent); color: var(--accent); font-size: 12px; }
.cta-title { grid-column: 1 / 6; color: var(--rust); font-size: clamp(24px, 2.6vw, 38px); font-weight: 700; line-height: 1.15; letter-spacing: -.015em; }
.cta-form { grid-column: 7 / 13; }


/* ==========================================================================
   Listing pages: work.html + journal.html
   ========================================================================== */
[hidden] { display: none !important; }

.page-hero { padding-bottom: clamp(40px, 5vw, 72px); }
.page-hero__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; }
.page-hero__kicker { grid-column: 1 / -1; color: var(--rust); font-size: clamp(16px, 1.6vw, 22px); margin-bottom: 6px; }
.page-title {
  grid-column: 1 / -1;
  overflow: hidden; padding-bottom: .03em;
  color: var(--rust);
  font-size: clamp(72px, 13.5vw, 204px); font-weight: 700;
  letter-spacing: -.05em; line-height: .8;
}
.page-title__inner { display: inline-block; transform: translateY(102%); animation: rise 1.1s var(--ease) .1s forwards; }
.page-title .dot { color: var(--cobalt); }
.page-title__count {
  display: inline-block; vertical-align: top; margin: .2em 0 0 .25em;
  font-size: max(14px, .1em); font-weight: 500; letter-spacing: 0; color: var(--ink);
}
.page-hero__intro { grid-column: 8 / 13; margin-top: clamp(20px, 2.4vw, 36px); font-size: 16px; line-height: 1.5; max-width: 38ch; }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 18px 0;
  border-top: 1px solid var(--rust-soft); border-bottom: 1px solid var(--rust-soft);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.filters__label { font-size: 12px; color: var(--muted); margin-right: 8px; }
.filter {
  padding: 7px 14px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  font-size: 13px; cursor: pointer;
  transition: background .25s, color .25s;
}
.filter:hover { background: var(--accent-soft); }
.filter.is-active { background: var(--accent); color: var(--cream); }
.filter sup { font-size: 9px; margin-left: 3px; opacity: .8; }
.filter--all { --accent: var(--ink); --accent-soft: rgba(59, 58, 58, .12); }
.view-toggle { margin-left: auto; display: flex; gap: 18px; font-size: 13px; }
.view-toggle button { background: none; border: 0; padding: 4px 0; color: var(--muted); cursor: pointer; border-bottom: 1.5px solid transparent; transition: color .25s, border-color .25s; }
.view-toggle button:hover { color: var(--cobalt); }
.view-toggle button[aria-pressed="true"] { color: var(--cobalt); border-color: var(--cobalt); }
.empty-state { padding: 48px 0; color: var(--muted); font-size: 15px; }

/* Work grid */
.work-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(56px, 7vw, 104px) var(--col-gap); }
.work-card { display: block; }
.work-card__img { overflow: hidden; }
.work-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.work-card:hover .work-card__img img { transform: scale(1.035); }
.work-card__meta { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 14px; }
.work-card__name { font-size: 18px; font-weight: 600; letter-spacing: .02em; color: var(--accent); }
.work-card:hover .work-card__name { text-decoration: underline; text-underline-offset: 4px; }
.work-card__year { font-size: 12px; color: var(--muted); padding-top: 4px; }
.work-card__services { grid-column: 1 / -1; font-size: 13px; color: var(--ink); }
.work-card__client { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.work-card.p-a { grid-column: 1 / 9; }
.work-card.p-a .work-card__img { aspect-ratio: 16 / 11; }
.work-card.p-b { grid-column: 9 / 13; align-self: end; }
.work-card.p-b .work-card__img { aspect-ratio: 4 / 5; }
.work-card.p-c { grid-column: 1 / 6; }
.work-card.p-c .work-card__img { aspect-ratio: 4 / 5; }
.work-card.p-d { grid-column: 7 / 13; align-self: end; }
.work-card.p-d .work-card__img { aspect-ratio: 4 / 3; }
.is-anim > :not([hidden]) { animation: fadeUp .7s var(--ease) both; }
.is-anim > :nth-child(2) { animation-delay: .05s; }
.is-anim > :nth-child(3) { animation-delay: .1s; }
.is-anim > :nth-child(4) { animation-delay: .15s; }

/* Work index (list view) */
.work-index { display: none; }
[data-view-mode="index"] .work-grid { display: none; }
[data-view-mode="index"] .work-index { display: block; }
.index-head, .index-row {
  display: grid; grid-template-columns: 56px 2.2fr 3fr 1.4fr 64px 20px;
  gap: var(--col-gap); align-items: baseline;
}
.index-head { padding-bottom: 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rust-soft); }
.index-row {
  padding: 22px 0;
  border-bottom: 1px solid var(--rust-soft);
  font-size: 14px;
  transition: padding .45s var(--ease), background .3s;
}
.index-row:hover { padding-left: 12px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); }
.index-row__no { font-size: 12px; color: var(--accent); }
.index-row__name { font-size: clamp(22px, 2.4vw, 36px); font-weight: 700; letter-spacing: -.02em; color: var(--accent); line-height: 1; }
.index-row__year { color: var(--muted); font-size: 13px; }
.index-row .arrow { color: var(--accent); }
.index-preview {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: 260px; aspect-ratio: 4 / 5; overflow: hidden;
  pointer-events: none;
  opacity: 0; scale: .9;
  transition: opacity .3s, scale .4s var(--ease);
  border: 4px solid var(--cream);
  box-shadow: 0 20px 40px -20px rgba(59, 58, 58, .5);
}
.index-preview.is-on { opacity: 1; scale: 1; }
.index-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Big CTA band */
.cta-band {
  display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--rust-soft);
  padding-top: 32px; margin-top: var(--section);
  margin-bottom: var(--section);
}
.cta-band__title { font-size: clamp(36px, 5.6vw, 84px); font-weight: 700; letter-spacing: -.035em; line-height: .95; color: var(--rust); }
.cta-band__title span { color: var(--cobalt); }

/* Journal */
.post-feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; margin-bottom: clamp(72px, 8vw, 128px); }
.post-feature__img { grid-column: 1 / 8; overflow: hidden; aspect-ratio: 7 / 5; }
.post-feature__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post-feature:hover .post-feature__img img { transform: scale(1.03); }
.post-feature__body { grid-column: 9 / 13; display: grid; gap: 16px; justify-items: start; }
.post-feature__tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.post-feature__title { font-size: clamp(26px, 2.7vw, 42px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; color: var(--accent); }
.post-feature__body p { font-size: 15px; max-width: 42ch; }
.post-meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.post-meta .cat { color: var(--accent); font-weight: 600; }
.journal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(56px, 6vw, 88px) var(--col-gap); align-items: start; }
.journal-card { display: grid; gap: 12px; align-content: start; }
.journal-card[data-col="1"] { margin-top: clamp(40px, 7vw, 112px); }
.journal-card__img { overflow: hidden; aspect-ratio: 4 / 5; }
.journal-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.journal-card:hover .journal-card__img img { transform: scale(1.04); }
.journal-card__title { font-size: clamp(17px, 1.5vw, 21px); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: var(--accent); }
.journal-card:hover .journal-card__title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.journal-card p { font-size: 14px; color: var(--ink); }
.load-more { display: flex; justify-content: center; margin-top: clamp(56px, 6vw, 88px); }

@media (max-width: 1024px) {
  .page-hero__intro { grid-column: 5 / 13; }
  .work-card.p-a { grid-column: 1 / 13; }
  .work-card.p-b { grid-column: 1 / 7; }
  .work-card.p-c { grid-column: 7 / 13; align-self: end; }
  .work-card.p-d { grid-column: 1 / 13; }
  .post-feature__img { grid-column: 1 / 13; }
  .post-feature__body { grid-column: 1 / 13; margin-top: 24px; }
  .journal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journal-card[data-col="1"] { margin-top: 0; }
  .index-head, .index-row { grid-template-columns: 40px 2fr 2.4fr 56px 20px; }
  .index-head span:nth-child(4), .index-row__industry { display: none; }
}
@media (max-width: 860px) {
  .page-hero__intro { grid-column: 1 / -1; }
  .filters { gap: 6px; }
  .filters__label { width: 100%; }
  .view-toggle { width: 100%; margin: 8px 0 0; }
  .work-grid { gap: 44px 12px; }
  .work-card.p-a, .work-card.p-b, .work-card.p-c, .work-card.p-d { grid-column: 1 / -1; }
  .work-card .work-card__img { aspect-ratio: 4 / 3 !important; }
  .index-head { display: none; }
  .index-row { grid-template-columns: 1fr auto; gap: 6px 12px; padding: 18px 0; }
  .index-row__no, .index-row .arrow { display: none; }
  .index-row__services { grid-column: 1 / -1; grid-row: 2; font-size: 13px; }
  .index-preview { display: none; }
  .journal-grid { grid-template-columns: 1fr; }
  .journal-card__img { aspect-ratio: 4 / 3; }
  .cta-band { align-items: start; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .about__head .label { grid-column: 1 / 3; }
  .about__lead { grid-column: 3 / 9; }
  .about__img1 { grid-column: 1 / 5; }
  .about__img2 { grid-column: 5 / 9; margin-top: 12vw; }
  .about__copy { grid-column: 1 / 7; grid-row: 2; }
  .nav { gap: 28px; }
  .services__grid { grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .service__panel { grid-column: 2; }
  .post--a { grid-column: 1 / 4; }
  .post--b { grid-column: 4 / 9; }
  .post--c { grid-column: 1 / 9; margin-top: 32px; }
  .contact__intro { grid-column: 1 / 4; }
  .contact__form { grid-column: 4 / 9; }
  .footer__contact { grid-column: 1 / 5; }
  .footer__nav { grid-column: 5 / 7; }
  .footer__social { grid-column: 7 / 9; }
  .footer__news { grid-column: 1 / 9; }
  .cs-thumbs { grid-column: 1 / 4; }
  .cs-facts { grid-column: 4 / 9; }
  .cs-row .label, .cs-side { grid-column: 1 / 3; }
  .cs-row .cs-body, .cs-row .cs-body--list, .cs-gallery, .results { grid-column: 4 / 9; }
  .cs-strategy-img { grid-column: 1 / 4; grid-row: 2; margin-top: 16px; }
  .cta-title { grid-column: 1 / 4; }
  .cta-form { grid-column: 4 / 9; }
}

@media (max-width: 860px) {
  .nav, .site-header .btn { display: none; }
  .menu-toggle { display: block; }
  .site-header__inner { grid-template-columns: 1fr auto; height: 64px; }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .about__head { row-gap: 16px; margin-bottom: 32px; }
  .about__head .label, .about__lead { grid-column: 1 / -1; padding: 0; }
  .about__lead { font-size: 28px; }
  .about__body { row-gap: 28px; column-gap: 12px; }
  .about__img1 { grid-column: 1 / 3; }
  .about__img2 { grid-column: 3 / 5; margin-top: 48px; }
  .about__copy { grid-column: 1 / -1; grid-row: 2; }
  .about__stats { grid-template-columns: 1fr 1fr; gap: 28px 12px; margin-top: 48px; }
  .about-stat__num { font-size: 48px; }

  /* Hero becomes a swipeable carousel */
  .hero__gallery {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 12px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
    padding: 0 var(--gutter); scrollbar-width: none;
  }
  .hero__gallery::-webkit-scrollbar { display: none; }
  .js .hero__stage:not(.is-ready) .hero-shot { visibility: visible; }
  .hero-shot { flex: 0 0 100%; scroll-snap-align: center; }
  .hero-shot__img { height: auto; aspect-ratio: 4 / 4.4; }
  .hero-shot figcaption span { opacity: 1; transform: none; }
  .hero__intro { display: none; }
  .hero__dots { display: flex; justify-content: center; gap: 6px; margin: 14px 0 20px; }
  .hero__dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: var(--mist); cursor: pointer; transition: background .3s, transform .3s; }
  .hero__dots button[aria-current="true"] { background: var(--cobalt); transform: scale(1.2); }
  .hero__mobile-intro { display: grid !important; gap: 18px; }
  .hero__mobile-intro p { font-size: 14px; }
  .hero__mobile-actions { display: flex; justify-content: space-between; align-items: center; }


  .services__grid { display: block; }
  .service__panel { padding: 16px 0 24px; grid-template-columns: 1fr; }
  .service__panel figure, .service__panel .service__foot { grid-column: 1; }
  .service__panel figure { order: 3; }
  .service__panel .service__foot { order: 4; }

  .journal__grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; }
  .journal__grid::-webkit-scrollbar { display: none; }
  .post { flex: 0 0 78%; scroll-snap-align: start; margin: 0 !important; }
  .post .post__img { aspect-ratio: 4 / 5 !important; }

  .work__list { grid-template-columns: repeat(4, 1fr); row-gap: 28px; }
  .project, .project--1, .project--2, .project--3, .project--4 {
    grid-row: auto; margin: 0; grid-template-columns: 1fr; align-self: auto; cursor: pointer;
  }
  .project .project__meta { order: 2; text-align: left !important; display: flex; gap: 12px; align-items: baseline; }
  .project .project__name { margin: 0; }
  .project--1, .project--4 { grid-column: 1 / -1; }
  .project--2, .project--3 { grid-column: span 2; }
  .project--2 .project__meta, .project--3 .project__meta { display: block; }
  .project__img { aspect-ratio: 4 / 3 !important; }
  .project--1 { order: 1; } .project--2 { order: 2; } .project--3 { order: 3; } .project--4 { order: 4; }
  .work__all { order: 5; grid-column: 1 / -1; grid-row: auto; }
  .cursor-bubble { display: none; }

  .contact__intro, .contact__form { grid-column: 1 / -1; }
  .contact__intro { margin-bottom: 32px; }
  .form { grid-template-columns: 1fr; gap: 26px; }
  .form__actions .btn { width: 100%; }

  .footer__contact { grid-column: 1 / -1; order: 3; }
  .footer__nav { grid-column: 1 / 3; order: 1; }
  .footer__social { grid-column: 3 / 5; order: 1; text-align: right; }
  .footer__news { grid-column: 1 / -1; order: 2; }

  .cs-side { margin-bottom: 20px; }
  .cs-thumbs, .cs-facts, .cs-side, .cs-row .label, .cs-row .cs-body, .cs-row .cs-body--list, .cs-gallery, .results, .cs-strategy-img, .cta-title, .cta-form { grid-column: 1 / -1; grid-row: auto; }
  .cs-thumbs { max-width: none; margin-bottom: 24px; }
  .cs-row .label { margin-bottom: 16px; }
  .cs-strategy-img { margin: 0 0 20px; }
  .cs-wide img { aspect-ratio: 4 / 3; }
  .cs-strategy-img img { aspect-ratio: 4 / 3; }
  .results .stat { display: block; }
  .results .stat strong { display: block; }
  .results .stat span { display: block; margin-top: 6px; }
  .cta-title { margin-bottom: 32px; }
}

@media (min-width: 861px) { .hero__mobile-intro { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .wordmark[data-animate] .ch { transform: none; }
}

/* ---------- Backend additions ---------- */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 13px; color: var(--error); min-height: 1em; }
.btn.is-loading { opacity: .6; pointer-events: none; }
.draft-banner { position: sticky; top: 0; z-index: 90; background: var(--cobalt); color: var(--cream); text-align: center; font-size: 13px; padding: 8px 16px; }
.draft-banner a { text-decoration: underline; }
.empty-note { padding: 40px 0; color: var(--muted); font-size: 15px; }
.flash-page { padding: 120px 0; text-align: center; }

/* ---------- Article (post.php) ---------- */
.article__head { max-width: 1040px; padding: 8px 0 clamp(32px, 4vw, 56px); display: grid; gap: 18px; }
.article__title { font-size: clamp(38px, 5.2vw, 80px); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; color: var(--accent); }
.article__lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; max-width: 52ch; color: var(--ink); }
.article__cover { margin: 0 0 clamp(40px, 5vw, 80px); overflow: hidden; aspect-ratio: 16 / 7.5; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.article__layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.article__aside { grid-column: 1 / 4; position: sticky; top: 100px; display: grid; gap: 28px; font-size: 13px; }
.article__by strong { color: var(--rust); font-size: 15px; }
.share { display: grid; gap: 6px; justify-items: start; }
.share span { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 4px; }
.share a, .share button { background: none; border: 0; padding: 0; font-size: 14px; color: var(--cobalt); cursor: pointer; }
.share a:hover, .share button:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose { grid-column: 4 / 11; font-size: 18px; line-height: 1.7; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.02em; color: var(--accent); }
.prose h3 { margin-top: 1.6em; font-size: 22px; line-height: 1.25; color: var(--ink); }
.prose h4 { margin-top: 1.4em; font-size: 18px; }
.prose a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--cobalt); font-size: 24px; line-height: 1.4; color: var(--rust); font-weight: 500; }
.prose figure { margin: 2em 0; }
.prose figure img, .prose p img { width: 100%; height: auto; }
.prose figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.prose code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; background: rgba(184, 56, 7, .08); padding: 2px 5px; }
.prose pre { background: var(--ink); color: var(--cream); padding: 18px 20px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--rust-soft); margin: 2em 0; }
.article__related { margin-top: var(--section); }
@media (max-width: 1024px) {
  .article__aside { grid-column: 1 / -1; position: static; grid-auto-flow: column; justify-content: space-between; margin-bottom: 32px; }
  .share { grid-auto-flow: column; gap: 14px; align-items: baseline; }
  .prose { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .article__layout { grid-template-columns: 1fr; }
  .article__aside { grid-auto-flow: row; }
  .share { grid-auto-flow: row; }
  .article__cover { aspect-ratio: 4 / 3; }
  .prose { font-size: 17px; }
}

/* ---------- Simple pages (privacy, 404) ---------- */
.simple-page { padding: 24px 0 var(--section); max-width: 760px; }
.simple-page h1 { font-size: clamp(44px, 7vw, 96px); font-weight: 700; letter-spacing: -.04em; line-height: .95; color: var(--rust); margin-bottom: 32px; }
.simple-page .prose { font-size: 17px; }
