/* ==========================================================================
   +one — Brand Guidelines
   Built on the +one design language: TCCC Unity, Ink #141414, Color Wave.
   ========================================================================== */

/* --- TCCC Unity ----------------------------------------------------------
   Licensed to The Coca-Cola Company. Served here for accurate on-screen
   specimens only. See the licensing note in the Typography section.
   ------------------------------------------------------------------------ */
@font-face { font-family: "TCCC Unity Headline"; src: url("../fonts/TCCC-UnityHeadline-Light.woff2")   format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Headline"; src: url("../fonts/TCCC-UnityHeadline-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Headline"; src: url("../fonts/TCCC-UnityHeadline-Medium.woff2")  format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Headline"; src: url("../fonts/TCCC-UnityHeadline-Bold.woff2")    format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Headline"; src: url("../fonts/TCCC-UnityHeadline-Black.woff2")   format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

@font-face { font-family: "TCCC Unity Text"; src: url("../fonts/TCCC-UnityText-Light.woff2")   format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Text"; src: url("../fonts/TCCC-UnityText-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Text"; src: url("../fonts/TCCC-UnityText-Medium.woff2")  format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Text"; src: url("../fonts/TCCC-UnityText-Bold.woff2")    format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "TCCC Unity Text"; src: url("../fonts/TCCC-UnityText-Black.woff2")   format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

/* --- Tokens -------------------------------------------------------------- */
:root {
  /* +one neutral palette */
  --white:       #ffffff;
  --off-white:   #fafafa;
  --light-grey:  #f2f2f2;
  --pale-grey:   #ebebeb;
  --silver:      #c6c6c6;
  --medium-grey: #999999;
  --stone:       #6e6e6e;
  --graphite:    #3f3f3f;
  --asphalt:     #353535;
  --ink:         #141414;
  --black:       #000000;

  /* Color Wave */
  --wave-cyan:   #00c9d3;
  --wave-orange: #f59826;
  --wave-red:    #f0191a;
  --color-wave:  linear-gradient(90deg, var(--wave-cyan) 0%, var(--wave-orange) 50%, var(--wave-red) 100%);
  /* The Brand button runs the spectrum the other way — measured from the
     component library, not assumed. Orientation is per-application. */
  --wave-button: linear-gradient(90deg, var(--wave-red) 0%, var(--wave-orange) 50%, var(--wave-cyan) 100%);

  /* +one logo conic ("o" ring) */
  --ring-conic: conic-gradient(from 90deg,
      #4fa4ab 0deg, #ee0000 50.625deg, #f9ac07 168.75deg,
      #23c84c 202.5deg, #27cfd8 346.875deg, #4fa4ab 360deg);

  /* Shape */
  --r-sm: 8px;  --r-md: 16px;  --r-lg: 20px;  --r-xl: 44px;  --r-full: 5000px;
  --bw-sm: 1px; --bw-md: 2px;  --bw-lg: 4px;
  --shadow-md: 0 5px 15px rgba(20, 20, 20, .10);

  /* Page semantics — light */
  --bg:        var(--off-white);
  --surface:   var(--white);
  --surface-2: var(--light-grey);
  --fg:        var(--ink);
  --fg-muted:  var(--graphite);
  --fg-faint:  var(--stone);
  --line:      rgba(20, 20, 20, .12);
  --line-firm: rgba(20, 20, 20, .28);
  --checker:   rgba(20, 20, 20, .055);

  /* Layout */
  --maxw: 1120px;
  --gut: 32px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg:        var(--black);
  --surface:   var(--ink);
  --surface-2: var(--asphalt);
  --fg:        var(--off-white);
  --fg-muted:  var(--silver);
  --fg-faint:  var(--medium-grey);
  --line:      rgba(255, 255, 255, .16);
  --line-firm: rgba(255, 255, 255, .38);
  --checker:   rgba(255, 255, 255, .07);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "TCCC Unity Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

img { max-width: 100%; }
a { color: inherit; }

/* --- Type styles (the +one ramp, applied to this page) ------------------- */
.t-large   { font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: clamp(2.5rem, 7vw, 4.75rem); line-height: 1.02; letter-spacing: -.02em; margin: 0; }
.t-title1  { font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.12; letter-spacing: -.01em; margin: 0; }
.t-title2  { font-family: "TCCC Unity Headline", sans-serif; font-weight: 400; font-size: 1.5rem;  line-height: 1.33; margin: 0; }
.t-title3  { font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: 1.125rem; line-height: 1.33; margin: 0; }
.t-body    { font-family: "TCCC Unity Text", sans-serif; font-weight: 500; font-size: 1rem; line-height: 1.5; }
.t-callout { font-family: "TCCC Unity Text", sans-serif; font-weight: 400; font-size: 1rem; line-height: 1.75; }
.t-subhead { font-family: "TCCC Unity Text", sans-serif; font-weight: 700; font-size: .75rem; line-height: 1.33; letter-spacing: 1.5px; text-transform: uppercase; }
.t-cap1    { font-family: "TCCC Unity Text", sans-serif; font-weight: 500; font-size: .75rem; line-height: 1.67; }
.t-cap2    { font-family: "TCCC Unity Text", sans-serif; font-weight: 400; font-size: .625rem; line-height: 1.6; }

.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.mono  { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-variant-ligatures: none; }

.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;
}

/* --- Access gate ---------------------------------------------------------
   A presentation gate, in the app's own language. It hides the page; it does
   not protect the asset URLs — put real auth in front of the deployment.
   ------------------------------------------------------------------------ */
:root.is-locked body { overflow: hidden; }
:root.is-locked .topbar,
:root.is-locked .hero,
:root.is-locked main,
:root.is-locked .footer { display: none !important; }

/* Unlocked: the gate is gone instantly (a returning visitor never sees it).
   While leaving, it stays painted on top so it can fade over the revealed page. */
:root:not(.is-locked) .gate { display: none; }
:root:not(.is-locked) .gate.is-leaving { display: grid; }
.gate.is-gone { display: none !important; }

.gate {
  position: fixed; inset: 0; z-index: 200; overflow: hidden;
  display: grid; place-items: center; padding: 32px;
  background: var(--ink); color: var(--off-white);
  transition: opacity .45s ease, transform .55s cubic-bezier(.22, .61, .36, 1);
}
.gate__in { transition: opacity .3s ease, transform .45s cubic-bezier(.22, .61, .36, 1); }

.gate.is-leaving { opacity: 0; transform: scale(1.04); pointer-events: none; }
.gate.is-leaving .gate__in { opacity: 0; transform: translateY(-14px); }

/* The page arrives underneath, slightly staggered. */
@keyframes gateFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gateRiseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

:root.is-entering .topbar { animation: gateFadeIn .5s ease both; }
:root.is-entering .hero   { animation: gateRiseIn .6s cubic-bezier(.22, .61, .36, 1) .05s both; }
:root.is-entering main    { animation: gateRiseIn .6s cubic-bezier(.22, .61, .36, 1) .12s both; }
:root.is-entering .footer { animation: gateFadeIn .6s ease .12s both; }

@media (prefers-reduced-motion: reduce) {
  .gate, .gate__in { transition: none; }
  :root.is-entering .topbar,
  :root.is-entering .hero,
  :root.is-entering main,
  :root.is-entering .footer { animation: none; }
}
.gate__glow {
  position: absolute; top: 50%; left: 50%; width: 900px; height: 900px;
  transform: translate(-50%, -50%); pointer-events: none;
  background: var(--ring-conic); filter: blur(130px); opacity: .26;
}
.gate__in { position: relative; width: 100%; max-width: 420px; text-align: center; }
.gate__mark { width: min(300px, 82%); height: auto; display: block; margin: 0 auto 44px; }

.gate__title {
  font-family: "TCCC Unity Headline", sans-serif; font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 2.25rem); line-height: 1.1; letter-spacing: -.01em;
  margin: 0 0 12px;
}
.gate__lede { margin: 0 0 32px; color: rgba(250, 250, 250, .72); }

.gate__form { display: grid; gap: 12px; }
.gate__field { display: block; }
.gate__field input {
  width: 100%; height: 56px; padding: 0 24px; border-radius: var(--r-xl);
  background: transparent; color: var(--off-white);
  border: var(--bw-md) solid rgba(250, 250, 250, .38);
  font-family: "TCCC Unity Text", sans-serif; font-size: 1rem; font-weight: 500;
  text-align: center; outline: none;
  transition: border-color .16s ease, background-color .16s ease;
}
.gate__field input::placeholder { color: rgba(250, 250, 250, .45); font-weight: 400; }
.gate__field input:hover { border-color: rgba(250, 250, 250, .6); }
.gate__field input:focus { border-color: var(--off-white); background: rgba(250, 250, 250, .06); }
.gate__form .btn { width: 100%; min-width: 0; }

.gate.is-wrong .gate__field input { border-color: var(--wave-red); }
.gate.is-wrong .gate__in { animation: nudge .32s ease; }
@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}
@media (prefers-reduced-motion: reduce) { .gate.is-wrong .gate__in { animation: none; } }

.gate__msg {
  margin: 18px 0 0; color: #ff8b8b; font-family: "TCCC Unity Text", sans-serif;
  font-size: .8125rem; font-weight: 500;
}
.gate__foot { margin: 44px 0 0; color: rgba(250, 250, 250, .4); }

@media (max-width: 480px) {
  .gate__mark { margin-bottom: 32px; }
  .gate__foot { margin-top: 32px; }
}

/* --- Header -------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gut);
  display: flex; align-items: center; gap: 24px;
}
.topbar__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.topbar__logo img { height: 22px; width: auto; display: block; }

/* Theme-aware logo pair — no JS, no swap flash. */
.logo-swap .on-dark { display: none; }
:root[data-theme="dark"] .logo-swap .on-light { display: none; }
:root[data-theme="dark"] .logo-swap .on-dark { display: block; }
.topbar__nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topbar__nav a {
  text-decoration: none; color: var(--fg-muted); padding: 6px 11px; border-radius: var(--r-full);
  font-family: "TCCC Unity Text", sans-serif; font-weight: 500; font-size: .8125rem;
  transition: background-color .18s ease, color .18s ease; white-space: nowrap;
}
.topbar__nav a:hover { background: var(--surface-2); color: var(--fg); }
.topbar__nav a.is-active { background: var(--fg); color: var(--bg); }

.themetoggle {
  flex: none; width: 40px; height: 40px; border-radius: var(--r-full);
  border: var(--bw-sm) solid var(--line-firm); background: transparent; color: var(--fg);
  display: grid; place-items: center; cursor: pointer; transition: background-color .18s ease;
}
.themetoggle:hover { background: var(--surface-2); }
.themetoggle svg { width: 20px; height: 20px; }
:root:not([data-theme="dark"]) .themetoggle .i-moon { display: none; }
:root[data-theme="dark"] .themetoggle .i-sun { display: none; }

/* --- Layout -------------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
section[id] { padding: 88px 0 8px; }
.sec-head { margin-bottom: 40px; max-width: 62ch; }
.sec-head .eyebrow { color: var(--fg-faint); display: block; margin-bottom: 14px; }
.sec-head p { margin: 16px 0 0; color: var(--fg-muted); }
.sub-head { margin: 56px 0 20px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sub-head h3 { margin: 0; }
.sub-head p { margin: 0; color: var(--fg-muted); font-size: .875rem; }

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

/* --- Accordion (native <details>) ---------------------------------------
   Reads as a disclosure list continuing the .sub-head rhythm; deliberately
   borderless so the cards inside don't nest inside a second frame.
   ---------------------------------------------------------------------- */
.acc { border-top: var(--bw-sm) solid var(--line); }
.acc:first-of-type { margin-top: 56px; }
/* No bottom border on the last one — every section's closing <hr class="rule">
   already sits below it, and two rules together read as a mistake. */

.acc > summary {
  position: relative;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding: 26px 56px 26px 4px; cursor: pointer; list-style: none;
  transition: color .16s ease;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::marker { content: ""; }
.acc > summary:hover { color: var(--fg); }
.acc > summary:hover .acc__note { color: var(--fg); }

.acc__note { color: var(--fg-muted); font-size: .875rem; }
/* Absolutely placed so it stays centred even when the note wraps. */
.acc__chev {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  flex: none; width: 34px; height: 34px;
  border: var(--bw-sm) solid var(--line-firm); border-radius: var(--r-full);
  display: grid; place-items: center; color: var(--fg-muted);
  transition: transform .22s ease, background-color .16s ease, color .16s ease;
}
.acc > summary:hover .acc__chev { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.acc[open] > summary .acc__chev { transform: translateY(-50%) rotate(180deg); }
.acc__chev svg { width: 15px; height: 15px; }
.acc__body { padding: 0 0 40px; }
@media (prefers-reduced-motion: reduce) { .acc__chev { transition: none; } }

/* --- Hero ---------------------------------------------------------------- */
.hero { background: var(--ink); color: var(--off-white); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--color-wave);
}
.hero__glow {
  position: absolute; inset: -30% -10% auto auto; width: 780px; height: 780px; pointer-events: none;
  background: var(--ring-conic); filter: blur(120px); opacity: .30;
}
.hero__in { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 96px var(--gut) 104px; }
.hero__mark { width: min(420px, 78%); margin-bottom: 48px; }
.hero__mark img { display: block; width: 100%; height: auto; }
.hero h1 { max-width: 20ch; }
.hero .lede { max-width: 56ch; margin: 24px 0 0; color: rgba(250, 250, 250, .74); }
.hero__meta { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 56px; }
.hero__meta div { min-width: 132px; }
.hero__meta dt { color: rgba(250, 250, 250, .55); margin-bottom: 4px; }
.hero__meta dd { margin: 0; font-weight: 500; }

/* --- Notice -------------------------------------------------------------- */
.notice {
  border: var(--bw-sm) solid var(--line); border-left: var(--bw-lg) solid var(--wave-orange);
  border-radius: 0 var(--r-md) var(--r-md) 0; padding: 20px 24px; background: var(--surface);
  margin: 0;
}
.notice--legal { border-left-color: var(--wave-red); }
.notice h4 { margin: 0 0 8px; font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: 1rem; }
.notice p { margin: 0; color: var(--fg-muted); font-size: .9375rem; line-height: 1.65; }
.notice p + p { margin-top: 10px; }

/* Lead callout — carries a section heading rather than a small note title. */
.notice--lead { padding: 32px 36px; max-width: 780px; }
.notice--lead h2 {
  margin: 0 0 14px;
  font-family: "TCCC Unity Headline", sans-serif; font-weight: 700;
  font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.2; letter-spacing: -.01em;
}
.notice--lead p { font-size: 1rem; line-height: 1.7; }
@media (max-width: 620px) { .notice--lead { padding: 26px 24px; } }

/* --- Cards & grids ------------------------------------------------------- */
.card {
  background: var(--surface); border: var(--bw-sm) solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* --- Logo lockups --------------------------------------------------------
   Logo stages are deliberately NOT theme-aware. Each variant is shown on the
   background it is specified for, so an Ink wordmark always sits on a light
   plate and a white one always sits on Ink — whichever appearance the reader
   has the page set to.
   ------------------------------------------------------------------------ */
.lockup__stage {
  padding: 40px 32px; display: grid; place-items: center; min-height: 168px;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, rgba(20,20,20,.055) 25%, transparent 25%, transparent 75%, rgba(20,20,20,.055) 75%),
    linear-gradient(45deg, rgba(20,20,20,.055) 25%, transparent 25%, transparent 75%, rgba(20,20,20,.055) 75%);
  background-size: 18px 18px; background-position: 0 0, 9px 9px;
}
.lockup__stage--dark { background-color: #141414; }
.lockup__stage--dark.is-checker {
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%),
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%);
}
.lockup__stage img { width: 100%; max-width: 260px; height: auto; display: block; }
/* One labelled row of finishes per lockup. */
.finishes__label {
  margin: 0 0 14px; font-family: "TCCC Unity Text", sans-serif;
  font-weight: 700; font-size: .6875rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--fg-faint);
}
.finishes .grid + .finishes__label { margin-top: 36px; }

.lockup__foot { padding: 18px 20px; border-top: var(--bw-sm) solid var(--line); }
.lockup__foot h4 { margin: 0 0 2px; font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: .9375rem; }
.lockup__foot p { margin: 0 0 14px; color: var(--fg-muted); font-size: .8125rem; line-height: 1.5; }

/* --- Download chips ------------------------------------------------------ */
.dl { display: flex; flex-wrap: wrap; gap: 6px; }
.dl a {
  display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
  border: var(--bw-sm) solid var(--line-firm); border-radius: var(--r-full);
  padding: 4px 11px 4px 9px; font-family: "TCCC Unity Text", sans-serif;
  font-weight: 700; font-size: .625rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--fg); transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.dl a:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.dl a svg { width: 12px; height: 12px; flex: none; }

/* --- Clear space & minimum size ----------------------------------------- */
.clearspace {
  position: relative; padding: 40px; display: grid; place-items: center;
  background: #f2f2f2; border-radius: var(--r-lg); border: var(--bw-sm) solid var(--line);
}
.clearspace__box { position: relative; padding: var(--x); outline: var(--bw-md) dashed rgba(20,20,20,.34); }
.clearspace__box::before, .clearspace__box::after { color: #6e6e6e; }
.clearspace__box img { display: block; width: 100%; height: auto; }
.clearspace__box::before {
  content: "x"; position: absolute; top: calc(var(--x) / 2); left: 50%; transform: translate(-50%, -50%);
  font-family: ui-monospace, monospace; font-size: 11px; color: var(--fg-faint);
}
.clearspace__box::after {
  content: "x"; position: absolute; left: calc(var(--x) / 2); top: 50%; transform: translate(-50%, -50%);
  font-family: ui-monospace, monospace; font-size: 11px; color: var(--fg-faint);
}
.minsize {
  display: flex; align-items: flex-end; gap: 40px; flex-wrap: wrap; padding: 32px;
  background: #ffffff; color: #141414;
}
.minsize figure { margin: 0; }
.minsize figcaption { margin-top: 14px; color: #3f3f3f; font-size: .75rem; }
.minsize img { display: block; height: auto; }

/* --- Do / Don't ---------------------------------------------------------- */
.dodont__stage {
  height: 132px; display: grid; place-items: center; padding: 20px; overflow: hidden;
  background: #f2f2f2;
}
/* A do/don't stage that is itself meant to be dark must beat the light default. */
.dodont__stage.lockup__stage--dark { background: #141414; }
.dodont__stage img { max-width: 190px; height: auto; display: block; }
.dodont__tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 14px 18px;
  border-top: var(--bw-sm) solid var(--line); font-family: "TCCC Unity Text", sans-serif;
  font-weight: 700; font-size: .6875rem; letter-spacing: 1px; text-transform: uppercase;
}
.dodont__tag svg { width: 14px; height: 14px; flex: none; }
.is-do   .dodont__tag { color: #199453; }
.is-dont .dodont__tag { color: var(--wave-red); }
.is-do   { border-color: rgba(25, 148, 83, .4); }
.is-dont { border-color: rgba(240, 25, 26, .32); }
.dodont__note { padding: 0 18px 16px; margin: 0; color: var(--fg-muted); font-size: .8125rem; line-height: 1.5; }

.x-stretch  { transform: scaleX(1.45); }
.x-squash   { transform: scaleY(.6); }
.x-rotate   { transform: rotate(-11deg); }
.x-shadow   { filter: drop-shadow(5px 7px 3px rgba(0, 0, 0, .7)); }
.x-busy     { background: var(--ring-conic); }

/* Masked fills — the artwork silhouette flooded with a colour it must never be.
   A CSS filter can't tint the black mono lockup (black has no hue to shift), so
   these use the logo as a mask over a flat fill instead. */
.x-maskfill { width: 190px; aspect-ratio: 313 / 76; }
.x-solidfill { background: #6b4bd6; }
/* The mask url() is set inline on the element so it resolves against the
   document, not this stylesheet. */
.x-gradfill { background: var(--color-wave); }

/* --- App icon ------------------------------------------------------------ */
.appicon__hero { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; padding: 40px; }
.appicon__hero img { width: 168px; height: 168px; border-radius: 37px; box-shadow: var(--shadow-md); display: block; }
.iconsizes { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; padding: 32px; }
.iconsizes figure { margin: 0; text-align: center; }
.iconsizes img { display: block; border-radius: 22.3%; margin: 0 auto; box-shadow: var(--shadow-md); }
.iconsizes figcaption { margin-top: 12px; color: var(--fg-muted); font-size: .6875rem; }

.masks { display: flex; gap: 24px; flex-wrap: wrap; padding: 32px; }
.masks figure { margin: 0; text-align: center; }
.masks .m { width: 84px; height: 84px; margin: 0 auto; overflow: hidden; }
.masks .m img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m--square   { border-radius: 0; }
.m--rounded  { border-radius: 14px; }
.m--squircle { border-radius: 26px; }
.m--circle   { border-radius: 50%; }
.m--teardrop { border-radius: 50% 50% 50% 6px; }
.masks figcaption { margin-top: 12px; color: var(--fg-muted); font-size: .6875rem; }

/* --- Color -------------------------------------------------------------- */
.wave {
  height: 120px; border-radius: var(--r-lg); background: var(--wave-button);
  display: flex; align-items: flex-end; justify-content: space-between; padding: 18px 22px;
}
/* The dark appearance resolves the same gradient token to a different ramp. */
.wave--dark { background: linear-gradient(90deg, #7046b4 0%, #c82c39 50%, #de9349 100%); }
.wave--dark span { background: rgba(255, 255, 255, .88); }
.wave span {
  font-family: ui-monospace, monospace; font-size: 12px; color: rgba(0, 0, 0, .7);
  background: rgba(255, 255, 255, .82); padding: 4px 9px; border-radius: var(--r-full);
}
.wave span:nth-child(2) { margin-inline: auto; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
/* Flex column, not block: a <button> vertically centres its anonymous content
   box, so a card stretched to the grid row height would float the chip away
   from the top edge. */
.sw {
  border: var(--bw-sm) solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--surface); text-align: left; padding: 0; cursor: copy;
  font: inherit; color: inherit; width: 100%;
  display: flex; flex-direction: column; align-items: stretch;
  transition: transform .16s ease, box-shadow .16s ease;
}
.sw:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
/* These are spans inside a <button>, so each needs an explicit box. */
.sw__chip { display: block; flex: none; height: 82px; border-bottom: var(--bw-sm) solid var(--line); }
.sw__body { display: block; flex: 1 1 auto; padding: 12px 14px 14px; }
.sw__name { display: block; font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: .875rem; line-height: 1.3; }
.sw__hex  { display: block; font-family: ui-monospace, monospace; font-size: .75rem; color: var(--fg-muted); margin-top: 3px; }
.sw__rgb  { display: block; font-family: ui-monospace, monospace; font-size: .6875rem; color: var(--fg-faint); margin-top: 1px; }
.sw__role { display: block; margin-top: 9px; font-size: .75rem; line-height: 1.45; color: var(--fg-muted); }

.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 720px) { .pairs { grid-template-columns: 1fr; } }
.pair { border-radius: var(--r-lg); border: var(--bw-sm) solid var(--line); overflow: hidden; }
.pair__demo { padding: 28px 26px 32px; }
.pair--light .pair__demo { background: #fafafa; color: #141414; }
.pair--dark  .pair__demo { background: #000000; color: #fafafa; }
.pair__card { border-radius: var(--r-md); padding: 18px 20px; margin-top: 18px; }
.pair--light .pair__card { background: #ffffff; border: 1px solid rgba(20,20,20,.12); }
.pair--dark  .pair__card { background: #141414; border: 1px solid rgba(255,255,255,.16); }
.pair__list { margin: 0; padding: 0; list-style: none; border-top: var(--bw-sm) solid var(--line); }
.pair__list li {
  display: flex; align-items: center; gap: 12px; padding: 9px 20px;
  border-bottom: var(--bw-sm) solid var(--line); font-size: .8125rem;
}
.pair__list li:last-child { border-bottom: 0; }
.pair__list b { font-weight: 500; min-width: 116px; }
.pair__list .mono { margin-left: auto; color: var(--fg-muted); font-size: .75rem; }
.dot { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-firm); flex: none; }

/* --- Screens: phone mockups ---------------------------------------------
   Each phone is a 430 × 932 viewport. The screen artwork scrolls inside it and
   the tab bar is pinned to the bottom, exactly as it behaves in the app.
   ------------------------------------------------------------------------ */
.screengroup + .screengroup { margin-top: 56px; }
.screengroup__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.screengroup__head h3 { margin: 0; }
.screengroup__head p { margin: 0; color: var(--fg-muted); font-size: .875rem; }

/* Two columns is the floor — a light/dark pair side by side is the comparison
   the section exists for, and 16 full-width phones would be an endless scroll. */
.phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }

.phone-fig { margin: 0; }
.phone-fig figcaption { margin-top: 14px; font-size: .75rem; line-height: 1.5; }
.phone-fig figcaption b { display: block; font-weight: 500; color: var(--fg); }
.phone-fig figcaption span { color: var(--fg-faint); }

.phone {
  width: 100%; aspect-ratio: 430 / 932;
  background: #1c1c1e; border-radius: 13.5%/6.2%; padding: 2.2%;
  box-shadow: 0 12px 28px rgba(20, 20, 20, .18), 0 0 0 1px rgba(20, 20, 20, .06);
}
:root[data-theme="dark"] .phone { box-shadow: 0 12px 28px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1); }

.phone__screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 11.5%/5.2%; background: #ffffff;
}
.phone__scroll {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none;
}
.phone__scroll::-webkit-scrollbar { display: none; }
.phone__scroll img { display: block; width: 100%; height: auto; }
/* Percentage padding resolves against the width, so these spacers stay locked
   to the real chrome heights (98 and 104/176 of 430) at any scale. */
.phone__scroll--tabbed { padding-bottom: 22.79%; }
.phone__scroll--headed { padding-top: 24.19%; }
.phone__scroll--headed.phone__scroll--tall-header { padding-top: 40.93%; }

.phone__header,
.phone__tab {
  position: absolute; left: 0; right: 0;
  width: 100%; height: auto; display: block; pointer-events: none;
}
.phone__header { top: 0; }
.phone__tab { bottom: 0; }

/* Sits at the head of the Screens section, above the first group. */
.screens-note { margin-bottom: 40px; }

/* --- Typography --------------------------------------------------------- */
.family { padding: 32px; }
.family__name { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.family__name h3 { margin: 0; }
.family__use { color: var(--fg-muted); font-size: .875rem; margin: 0 0 26px; }
.family__aa { font-size: clamp(3rem, 8vw, 5.5rem); line-height: 1; margin: 0 0 6px; }
.family__glyphs { color: var(--fg-muted); font-size: 1.125rem; margin: 0 0 28px; word-break: break-word; }
.weights { display: grid; gap: 14px; margin: 0; }
.weights div { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.weights .lbl { min-width: 116px; color: var(--fg-faint); font-size: .6875rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.weights .spec { font-size: 1.375rem; line-height: 1.3; }

.f-head { font-family: "TCCC Unity Headline", sans-serif; }
.f-text { font-family: "TCCC Unity Text", sans-serif; }

.scale { width: 100%; border-collapse: collapse; }
.scale th, .scale td { text-align: left; padding: 16px 14px; border-bottom: var(--bw-sm) solid var(--line); vertical-align: baseline; }
.scale th { color: var(--fg-faint); font-family: "TCCC Unity Text", sans-serif; font-weight: 700; font-size: .625rem; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.scale td:first-child { white-space: nowrap; font-weight: 500; }
.scale .specimen { width: 46%; }
.scale .num { font-family: ui-monospace, monospace; font-size: .8125rem; color: var(--fg-muted); white-space: nowrap; }
.scale-wrap { overflow-x: auto; }

/* --- Iconography -------------------------------------------------------- */
.iconbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.search {
  flex: 1 1 260px; max-width: 340px; display: flex; align-items: center; gap: 10px;
  border: var(--bw-sm) solid var(--line-firm); border-radius: var(--r-full); padding: 9px 16px;
  background: var(--surface);
}
.search svg { width: 16px; height: 16px; flex: none; color: var(--fg-faint); }
.search input {
  border: 0; background: transparent; color: var(--fg); font: inherit; font-size: .875rem;
  width: 100%; outline: none;
}
.iconcount { color: var(--fg-faint); font-size: .8125rem; }

.icongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.ic {
  display: flex; flex-direction: column; align-items: center; gap: 9px; text-decoration: none;
  padding: 20px 8px 14px; border-radius: var(--r-md); border: var(--bw-sm) solid var(--line);
  background: var(--surface); color: var(--fg); text-align: center;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.ic:hover { border-color: var(--line-firm); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ic svg { width: 24px; height: 24px; flex: none; }
.ic span { font-size: .6875rem; line-height: 1.35; color: var(--fg-muted); }
.ic__dl { font-size: .5625rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; color: var(--fg-faint); opacity: 0; transition: opacity .16s ease; }
.ic:hover .ic__dl { opacity: 1; }
.icongrid .is-hidden { display: none; }
.noresults { color: var(--fg-muted); padding: 28px 0; }

.safearea { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; padding: 36px; }
.safearea__fig { flex: none; }
.sa {
  width: 184px; height: 184px; display: grid; place-items: center;
  border: var(--bw-md) dashed var(--line-firm); border-radius: var(--r-md); position: relative;
}
.sa__inner {
  width: 96px; height: 96px; display: grid; place-items: center;
  border: var(--bw-md) dashed var(--wave-orange); border-radius: 10px;
}
.sa__inner svg { width: 50px; height: 50px; }
.sa__tag {
  position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%);
  background: var(--surface); padding: 0 8px; font-family: ui-monospace, monospace; font-size: 10px; color: var(--fg-faint);
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  --btn-h: 56px;
  height: var(--btn-h); min-width: 200px; padding: 0 32px; border-radius: var(--r-xl);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "TCCC Unity Text", sans-serif; font-weight: 700; font-size: .75rem;
  letter-spacing: 1.5px; text-transform: uppercase; line-height: 1;
  border: 0; cursor: pointer; background: transparent; color: var(--ink);
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.btn--md { --btn-h: 40px; min-width: 112px; padding: 0 20px; font-size: .6875rem; letter-spacing: 1px; text-transform: none; }

.btn--brand {
  background: #ffffff; color: var(--ink); position: relative;
  border: var(--bw-lg) solid transparent;
  background-image: linear-gradient(#ffffff, #ffffff), var(--wave-button);
  background-origin: border-box; background-clip: padding-box, border-box;
}
.btn--brand[data-state="pressed"] { background-image: linear-gradient(var(--light-grey), var(--light-grey)), var(--wave-button); }
.btn--brand[disabled] {
  color: var(--silver);
  background-image: linear-gradient(var(--stone), var(--stone)),
                    linear-gradient(90deg, #a06466 0%, #a08a63 50%, #7f9ea1 100%);
  cursor: not-allowed;
}

.btn--primary { background: var(--ink); color: var(--off-white); }
.btn--primary[data-state="pressed"] { background: var(--graphite); }
.btn--primary[disabled] { background: var(--stone); color: var(--silver); cursor: not-allowed; }

.btn--secondary { background: #ffffff; color: var(--ink); border: var(--bw-md) solid var(--ink); }
.btn--secondary[data-state="pressed"] { background: var(--light-grey); }
.btn--secondary[disabled] { background: #ffffff; color: var(--silver); border-color: var(--silver); cursor: not-allowed; }

.btn--tertiary { background: transparent; color: var(--ink); }
.btn--tertiary[data-state="pressed"] { background: var(--light-grey); }
.btn--tertiary[disabled] { color: var(--silver); cursor: not-allowed; }

.btn--shimmer {
  background: linear-gradient(100deg, var(--light-grey) 20%, var(--pale-grey) 40%, var(--light-grey) 60%);
  background-size: 300% 100%; animation: shim 1.4s linear infinite; color: transparent; cursor: progress;
}
@keyframes shim { from { background-position: 150% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .btn--shimmer { animation: none; } }

/* Button matrix always renders on a light plate — these are the app's light-theme specs */
.matrix {
  background: #fafafa; color: #141414; border: var(--bw-sm) solid var(--line);
  border-radius: var(--r-lg); padding: 8px 4px; overflow-x: auto;
}
.matrix table { border-collapse: collapse; width: 100%; min-width: 680px; }
.matrix th, .matrix td { padding: 14px 16px; text-align: left; vertical-align: middle; }
.matrix thead th {
  color: #6e6e6e; font-family: "TCCC Unity Text", sans-serif; font-weight: 700;
  font-size: .625rem; letter-spacing: 1px; text-transform: uppercase;
}
.matrix tbody th {
  font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: .875rem;
  color: #141414; white-space: nowrap;
}
.matrix tbody tr + tr th, .matrix tbody tr + tr td { border-top: 1px solid rgba(20,20,20,.08); }

.iconbtns { display: grid; gap: 8px; }
.iconbtn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; cursor: pointer;
  border-radius: var(--r-md); border: var(--bw-sm) solid var(--ink); background: #ffffff; color: var(--ink);
  transition: background-color .16s ease;
}
.iconbtn svg { width: 24px; height: 24px; }
.iconbtn--round { border-radius: var(--r-full); }
.iconbtn[data-state="pressed"] { background: var(--light-grey); }
.iconbtn[disabled] { background: var(--silver); border-color: var(--medium-grey); color: var(--medium-grey); cursor: not-allowed; }
.iconbtn--inverse { background: var(--ink); color: #ffffff; border-color: var(--ink); }
.iconbtn--inverse[data-state="pressed"] { background: var(--graphite); border-color: var(--graphite); }
.iconbtn--inverse[disabled] { background: var(--stone); border-color: var(--stone); color: var(--silver); }

.spec-list { margin: 0; padding: 0; list-style: none; }
.spec-list li { display: flex; gap: 16px; padding: 11px 0; border-bottom: var(--bw-sm) solid var(--line); font-size: .875rem; }
.spec-list li:last-child { border-bottom: 0; }
.spec-list b { font-weight: 500; min-width: 148px; flex: none; }
.spec-list span { color: var(--fg-muted); }

/* --- Downloads index ----------------------------------------------------- */
.bundle { display: flex; gap: 20px; align-items: center; padding: 22px 24px; flex-wrap: wrap; }
.bundle__ic { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--surface-2); display: grid; place-items: center; flex: none; }
.bundle__ic svg { width: 22px; height: 22px; color: var(--fg-muted); }
.bundle__txt { flex: 1 1 200px; }
.bundle__txt h4 { margin: 0 0 2px; font-family: "TCCC Unity Headline", sans-serif; font-weight: 700; font-size: .9375rem; }
.bundle__txt p { margin: 0; color: var(--fg-muted); font-size: .8125rem; }

/* --- Footer -------------------------------------------------------------- */
.footer { margin-top: 96px; border-top: var(--bw-sm) solid var(--line); background: var(--surface); }
.footer__in { max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gut) 48px; }
.footer__legal { margin: 0; color: var(--fg-faint); font-size: .75rem; line-height: 1.7; max-width: 84ch; }

/* --- Copy toast ---------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--fg); color: var(--bg); padding: 11px 20px; border-radius: var(--r-full);
  font-family: "TCCC Unity Text", sans-serif; font-weight: 700; font-size: .6875rem;
  letter-spacing: 1px; text-transform: uppercase; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; z-index: 90;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 3px solid var(--wave-cyan); outline-offset: 2px; border-radius: 4px; }

/* --- Header ------------------------------------------------------------
   Below ~1000px the seven section links can't share a row with the logo and
   the toggle without wrapping, so the nav drops to its own swipeable strip.
   ---------------------------------------------------------------------- */
@media (max-width: 1000px) {
  html { scroll-padding-top: 136px; }
  .topbar__in { flex-wrap: wrap; gap: 10px 16px; }
  .topbar__nav {
    order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap;
    overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px;
  }
  .topbar__nav::-webkit-scrollbar { display: none; }
  .themetoggle { margin-left: auto; }
}

/* --- Narrow screens ------------------------------------------------------ */
@media (max-width: 820px) {
  :root { --gut: 20px; }
  .topbar__in { padding: 12px var(--gut); }

  .hero__in { padding: 64px var(--gut) 72px; }
  .hero__mark { width: min(300px, 84%); margin-bottom: 32px; }
  .hero__meta { gap: 24px 32px; margin-top: 40px; }
  section[id] { padding: 64px 0 8px; }
  .sub-head { margin: 40px 0 18px; }
  .family, .appicon__hero, .safearea, .minsize, .masks, .iconsizes { padding: 24px; }
  .appicon__hero img { width: 128px; height: 128px; border-radius: 28px; }
  .clearspace { padding: 24px; }
  .footer__in { padding: 40px var(--gut) 48px; }
}

@media (max-width: 480px) {
  /* Scoped to the size demo — the state matrix keeps its own min-width and scrolls. */
  .grid .card > div > .btn { width: 100%; }
  .minsize { gap: 28px; }
}

@media print {
  .topbar, .themetoggle, .toast, .dl, .iconbar { display: none !important; }
  body { background: #fff; color: #000; }
  section[id] { padding: 24px 0; break-inside: avoid; }
}
