/* ==========================================================================
   STUDIO SHEZI — main.css
   Three colours. One typeface. Mobile first.
   ========================================================================== */

@font-face {
  font-family: "Inter Tight";
  src: url("../assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand — do not add colours */
  --bone: #EEEBE3;
  --red: #CA0013;   /* SHEZI RED — primary */
  --rule: #C72A09;  /* RULE RED — accent */

  /* Per-section roles (flipped in .section--red) */
  --ground: var(--bone);
  --ink: var(--red);
  --accent: var(--rule);
  --line: var(--rule);

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Type scale — phone → desktop */
  --fs-display: clamp(2.6rem, 8.3vw, 6.75rem);  /* hero H1        ~42 → 108px */
  --fs-title:   clamp(2.25rem, 7.4vw, 4.75rem); /* case titles    ~36 → 76px  */
  --fs-number:  clamp(1.5rem, 3.6vw, 2.5rem);   /* (01)           ~24 → 40px  */
  --fs-stat:    clamp(1.6rem, 2.9vw, 2.125rem); /* stat values    ~26 → 34px  */
  --fs-lead:    clamp(1.25rem, 2.3vw, 1.5rem);  /* leads          20 → 24px   */
  --fs-body:    clamp(1rem, 1.25vw, 1.0625rem); /* body           16 → 17px   */
  --fs-label:   0.75rem;                        /* eyebrow labels 12px        */
  --fs-micro:   0.6875rem;                      /* captions       11px        */

  --gutter: clamp(16px, 5.5vw, 64px);
  --max: 1200px;
  --section-pad: clamp(64px, 11vw, 144px);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

body {
  background: var(--bone);
  color: var(--red);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: var(--bone); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--red); color: var(--bone);
  padding: 8px 12px; font-weight: 600; text-decoration: none; z-index: 10;
}
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.section {
  background: var(--ground);
  color: var(--ink);
  padding-block: var(--section-pad);
}
/* consecutive sections of the same colour share one gap */
.section:not(.section--red) + .section:not(.section--red),
.section--red + .section--red { padding-top: 0; }

.section--red {
  --ground: var(--red);
  --ink: var(--bone);
  --accent: var(--bone);
  --line: var(--bone);
}

/* ---------- Type roles ---------- */
.display {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

.title {
  font-size: var(--fs-title);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Eyebrow / label: semibold small caps (uppercase at a small size, tracked) */
.label {
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.body { max-width: 62ch; text-wrap: pretty; }
.body + .body { margin-top: 1em; }

.strong { font-weight: 700; }

.micro {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Top bar (case-study pages) ---------- */
.topbar { padding-block: 20px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 9vw, 120px); }
.hero .label { color: var(--red); }
.hero .display { margin-top: clamp(24px, 4vw, 48px); text-wrap: wrap; }
.br-wide { display: none; }  /* hero line breaks, tablet and up only */

.hero__intro {
  display: grid;
  gap: 16px;
  margin-top: clamp(20px, 3vw, 32px);
}

.stats {
  display: grid;
  gap: 24px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.stat dt { color: var(--accent); }
.stat dd {
  margin-top: 6px;
  font-size: var(--fs-stat);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* ---------- Case study header ---------- */
.case-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(12px, 2.5vw, 32px);
  row-gap: 10px;
  align-items: baseline;
  padding-bottom: clamp(20px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
}
.case-head__num {
  font-size: var(--fs-number);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}
.case-head .label { grid-column: 2; }

/* ---------- Case study body ---------- */
.case-body {
  display: grid;
  gap: 40px;
  margin-top: clamp(28px, 4vw, 48px);
}

.brief { display: grid; gap: 22px; }
.brief dt { margin-bottom: 4px; }
.brief dd { max-width: 58ch; text-wrap: pretty; }

.takeaway {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: calc(var(--fs-body) * 1.06);
  line-height: 1.4;
  max-width: 58ch;
  text-wrap: pretty;
}

.story { display: grid; gap: 18px; align-content: start; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid currentColor;
  padding-bottom: 4px;
  justify-self: start;
}
.more:hover .more__arrow { transform: translateX(4px); }
.more__arrow { transition: transform 0.2s ease; }

.disclaimer { margin-top: 32px; opacity: 1; }

/* ---------- Media (click-to-play video) ----------
   Every slot works the same way:
     poster  → assets/img/posters/<slot>.webp
     video   → assets/video/<slot>.mp4
   If the poster is missing, the slot shows its name instead.       */
.media { display: grid; gap: 10px; align-content: start; }

.media__frame {
  position: relative;
  aspect-ratio: var(--ar, 16 / 9);
  background: var(--rule);
  overflow: hidden;
}
.section--red .media__frame { background: var(--rule); outline: 1px solid var(--bone); outline-offset: -1px; }

/* Placeholder text, visible only while no poster/video covers it */
.media__frame::before {
  content: "Video to follow";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 16px 16px 14px;
  text-align: center;
  color: var(--bone);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media__frame > a,
.media__frame > video,
.media__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.media__frame img,
.media__frame video { object-fit: cover; }
.media__frame video { background: var(--rule); object-fit: contain; }

/* When previewing locally, show which file the slot expects */
.is-local .media__frame::before { content: "VIDEO SLOT · " attr(data-slot); }

.media__frame img.is-missing { visibility: hidden; }
.media__frame.is-empty .media__icon { display: none; }
.media__frame.is-empty .media__play { cursor: default; }

.media__play { display: block; cursor: pointer; }
.media__icon {
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(56px, 9vw, 76px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--bone);
  transition: transform 0.2s ease;
}
.media__icon::after {
  content: "";
  position: absolute;
  left: 54%; top: 50%;
  translate: -50% -50%;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--red);
}
.media__play:hover .media__icon,
.media__play:focus-visible .media__icon { transform: scale(1.08); }

.media__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent);
}

/* ---------- Gallery (case-study pages) ---------- */
.gallery { display: grid; gap: clamp(28px, 4vw, 48px); margin-top: clamp(28px, 4vw, 48px); }
.gallery__heading { margin-top: clamp(48px, 7vw, 96px); }
.gallery--2 { gap: 20px; }

/* ---------- How I work ---------- */
.principles {
  display: grid;
  gap: 36px;
  margin-top: clamp(32px, 5vw, 56px);
}
.principle h3 {
  font-size: var(--fs-lead);
  font-weight: 800;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.principle p { margin-top: 10px; max-width: 46ch; }

/* ---------- Contact ---------- */
.contact .display { margin-top: clamp(20px, 3vw, 32px); }

.contact-list {
  display: grid;
  gap: 24px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.contact-list dd {
  margin-top: 4px;
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.contact-list a { text-decoration: none; border-bottom: 2px solid currentColor; }
.contact-list a:hover { border-bottom-width: 4px; }

.contact__foot {
  display: grid;
  gap: 8px;
  margin-top: clamp(48px, 7vw, 88px);
}
.contact__foot a { text-underline-offset: 4px; }

.colophon {
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; display: grid; align-content: center; }
.notfound .display { margin-block: 24px 32px; }

/* ==========================================================================
   Tablet and up
   ========================================================================== */
@media (min-width: 720px) {
  .br-wide { display: inline; }  /* 3-line hero, same breaks as the Canva site */
  .hero__intro { grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
  .hero__intro .body { max-width: 46ch; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .principles { grid-template-columns: 1fr 1fr; column-gap: clamp(40px, 7vw, 96px); row-gap: 56px; }
  .contact-list { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .gallery--2 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .case-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 72px); align-items: start; }
  .case-body--wide-media { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .contact-list { grid-template-columns: repeat(4, auto); justify-content: space-between; column-gap: 32px; }
  .case-body .media { position: sticky; top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.nowrap { white-space: nowrap; }
