/* Context Foundry — design tokens from Figma "Web Build R2" (1440 desktop / 402 mobile).
   Typeface @font-face rules are generated per page from the typefaces table (Catalog::fontFaces). */

/* Inter (Google Fonts subsets, self-hosted). Each file is the variable font, so one rule covers 400–800. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; /* cyrillic-ext */
  src: url("/assets/fonts/inter-1.woff2") format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; /* cyrillic */
  src: url("/assets/fonts/inter-2.woff2") format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; /* greek-ext */
  src: url("/assets/fonts/inter-3.woff2") format('woff2'); unicode-range: U+1F00-1FFF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; /* greek */
  src: url("/assets/fonts/inter-4.woff2") format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; /* vietnamese */
  src: url("/assets/fonts/inter-5.woff2") format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; /* latin-ext */
  src: url("/assets/fonts/inter-6.woff2") format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; /* latin */
  src: url("/assets/fonts/inter-7.woff2") format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #231F20;
  --paper: #FFFFFF;
  --orange: #E76300;
  --pink: #FFC9EB;
  --blue: #172FFF;
  --grey: #F3F3F3;
  --pill: #D9D9D9;
  --gutter: 26px;                                 /* page-level left/right gutter */
  --panel-gutter: clamp(26px, 8.9vw, 128px);      /* expanded typeface panel */
  --h1: clamp(60px, 8.9vw, 128px);
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--ink); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; height: 108px; padding: 0 var(--gutter); }
.site-header__logo { display: flex; color: var(--ink); }
.site-header__logo svg { width: 58px; height: auto; }
.site-header__actions { display: flex; align-items: center; gap: 30px; }
.icon-btn { background: none; border: 0; padding: 0; cursor: pointer; display: flex; color: var(--ink); text-decoration: none; }
.icon-btn svg { width: 38px; height: auto; }
.menu-btn { flex-direction: column; justify-content: center; gap: 8px; width: 34px; }
.menu-btn span { display: block; height: 3px; background: currentColor; border-radius: 3px; }
.site-header__menu { display: none; justify-content: flex-end; padding: 14px var(--gutter) 40px; border-top: 1px solid var(--ink); }
.site-header__menu[data-open] { display: flex; }
.site-header__menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; }
.site-header__menu a { display: inline-block; font-weight: 700; font-size: 26px; line-height: 53px; padding: 0 24px; text-decoration: none; border-radius: 20px; }
.site-header__menu a[aria-current] { background: var(--pill); }
@media (max-width: 640px) {
  .site-header__bar { height: 110px; }
  .site-header__logo svg { width: 78px; }
  .site-header__actions { gap: 24px; }
}

/* ---------- Cart (drawer from the right; site.js fills it from the Storefront API) ---------- */
.cart-btn { position: relative; }
.cart-btn__count { position: absolute; top: -8px; right: -10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--orange); color: var(--paper); font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.cart-btn__count[hidden] { display: none; }
html.cart-open { overflow: hidden; }
.cart { position: fixed; inset: 0; z-index: 100; }
.cart[hidden] { display: none; }
.cart__backdrop { position: absolute; inset: 0; background: rgba(35, 31, 32, .4); }
.cart__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); border-left: 1px solid var(--ink); padding: 0 var(--gutter) var(--gutter); overflow-y: auto; outline: none; }
.cart__head { display: flex; align-items: center; justify-content: space-between; min-height: 108px; border-bottom: 1px solid var(--ink); margin: 0 0 8px; }
.cart__head h2 { margin: 0; font-size: 26px; font-weight: 700; }
.cart__close { background: none; border: 0; cursor: pointer; font-size: 40px; line-height: 1; padding: 0; }
.cart__status { margin: 12px 0; font-size: 15px; color: var(--orange); font-weight: 600; }
.cart__lines { list-style: none; margin: 0; padding: 0; }
.cart__line { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px; padding: 18px 0; border-bottom: 1px solid var(--pill); }
.cart__name { font-size: 40px; line-height: 1.1; overflow-wrap: anywhere; }
.cart__price { font-weight: 700; }
.cart__remove { grid-column: 1; justify-self: start; background: none; border: 0; padding: 0; font-size: 14px; text-decoration: underline; cursor: pointer; opacity: .7; }
.cart__remove:hover { opacity: 1; }
.cart__empty { margin: 24px 0; font-size: 17px; }
.cart__empty[hidden], .cart__foot[hidden], .cart__status[hidden] { display: none; }
.cart__foot { margin-top: auto; padding-top: 24px; }
.cart__subtotal { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.cart__note { font-size: 14px; margin: 0 0 20px; opacity: .8; }
.cart__checkout { max-width: none; width: 100%; }
.btn[aria-busy] { opacity: .7; cursor: progress; }
@media (max-width: 640px) { .cart__head { min-height: 110px; } .cart__name { font-size: 32px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); padding: 54px 0 0; }
.site-footer__cols { display: grid; grid-template-columns: 273px 255px 564px 1fr; padding: 0 var(--gutter) 0 55px; align-items: start; }
.site-footer__logo svg { width: 130px; height: auto; color: var(--ink); }
.site-footer h3 { margin: 0 0 12px; font-size: 22px; font-weight: 700; line-height: 27px; }
.site-footer__nav { list-style: none; margin: 0; padding: 0; font-size: 17px; line-height: 37px; }
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; }
.newsletter { display: flex; flex-direction: column; gap: 8px; }
.newsletter__form { display: flex; gap: 8px; max-width: 100%; }
.newsletter input { flex: 0 1 295px; min-width: 0; width: 295px; height: 37px; border: 0; background: var(--grey); padding: 0 12px; font: inherit; font-size: 15px; }
.newsletter button { height: 37px; padding: 0 16px; border: 0; background: var(--ink); color: var(--paper); font-weight: 700; cursor: pointer; white-space: nowrap; }
.newsletter__note { font-size: 14px; margin: 0; }
.social { display: flex; gap: 14px; align-items: center; }
.social a { display: flex; color: var(--ink); }
.site-footer__legal { margin-top: 44px; border-top: 1px solid var(--ink); padding: 16px var(--gutter) 22px; text-align: center; font-size: 17px; line-height: 21px; }
.mobile-only { display: none; }
@media (max-width: 1200px) { .site-footer__cols { grid-template-columns: 1fr 1fr 1fr; padding: 0 var(--gutter); gap: 24px; } .site-footer__logo { grid-column: 1 / -1; } }
@media (max-width: 900px) {
  .site-footer__cols { grid-template-columns: 1fr; gap: 28px; padding: 0 var(--gutter); }
  .site-footer__logo svg { width: 94px; }
  .site-footer h3 { font-size: 25px; }
  .site-footer__nav { font-size: 20px; line-height: 43px; }
  .mobile-only { display: inline; }
  .desktop-only { display: none; }
  .site-footer__legal { font-size: 16px; }
  .newsletter input { flex: 1 1 auto; width: auto; }
}

/* ---------- Page scaffolding ---------- */
.page { padding: 66px var(--gutter) clamp(80px, 10vw, 145px); }
.page--orange { background: var(--orange); }
.page--pink { background: var(--pink); }
.page--ink { background: var(--ink); color: var(--paper); }
.page h1 { margin: 0 0 clamp(20px, 2vw, 30px); font-size: var(--h1); font-weight: 700; line-height: 1.21; }

/* ---------- Home bands ---------- */
/* Without JS: one scrolling text strip (.band__track). With JS (site.js buildBelt): the
   strip is replaced by a belt of individually animated words, each small enough for
   Firefox to pre-render fully, so the scroll stays on the compositor. */
.band { display: flex; align-items: center; overflow: hidden; height: clamp(130px, 30.5vw, 440px); cursor: pointer; text-decoration: none;
  contain: paint; background: var(--band-bg); color: var(--band-fg); transition: background-color .6s ease, color .6s ease; }
.band:hover, .band:focus-visible { background: var(--band-fg); color: var(--band-bg); }
.band__tracks { position: relative; white-space: nowrap; width: 100%; height: 1em;
  font-size: calc(clamp(64px, 13.9vw, 200px) * var(--scale, 1)); line-height: 1; }
.band__track { white-space: nowrap; will-change: transform; backface-visibility: hidden; position: absolute; left: 0; top: 0;
  animation: marquee var(--dur, 40s) linear infinite; animation-direction: var(--dir, normal); }
.band[data-belt] .band__track { display: none; }
.band__belt { position: absolute; inset: 0; white-space: pre; }
.band__belt--probe { visibility: hidden; }
.band__word { position: absolute; left: 0; top: 0; will-change: transform; backface-visibility: hidden;
  transform: translate3d(var(--from), 0, 0);
  animation: belt linear infinite; }
.band__belt--probe .band__word { position: static; animation: none; transform: none; }
.band[data-held] .band__track, .band[data-held] .band__word { animation-play-state: paused; }
@keyframes marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
/* Each word crosses one belt length per cycle (--from/--to set per word by site.js). */
@keyframes belt { from { transform: translate3d(var(--from), 0, 0); } to { transform: translate3d(var(--to), 0, 0); } }
@media (prefers-reduced-motion: reduce) { .band__track, .band__word { animation: none; } }

/* ---------- Typeface panel (expanded band / product page) ---------- */
.panel { padding: clamp(40px, 9vw, 135px) var(--panel-gutter) clamp(60px, 11vw, 170px); }
.panel[hidden] { display: none; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel__name { margin: 0 0 clamp(36px, 7vw, 106px); font-weight: 400; font-size: clamp(52px, 13.9vw, 200px); line-height: 1; overflow-wrap: anywhere; }
.panel__close { background: none; border: 0; cursor: pointer; font-size: 40px; line-height: 1; padding: 0; opacity: .8; }
.panel__close:hover { opacity: 1; }
.btn-row { display: flex; gap: clamp(16px, 4vw, 57px); }
.btn { flex: 1 1 0; max-width: 567px; display: flex; align-items: center; justify-content: center; text-align: center;
  height: clamp(48px, 5.6vw, 80px); padding: 0 clamp(20px, 3vw, 44px); border-radius: 60px; border: 0;
  font-weight: 700; font-size: clamp(16px, 1.85vw, 26px); line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--accent { background: var(--orange); color: var(--paper); }
.btn--disabled { opacity: .5; cursor: default; pointer-events: none; }
.panel__tagline { margin: 0 0 clamp(24px, 3.75vw, 54px); max-width: 1135px; font-size: clamp(34px, 6.5vw, 94px); line-height: 1.21; outline: none; }
.panel__tagline:focus { box-shadow: 0 0 0 2px currentColor; border-radius: 4px; }
.tester { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 17px; margin: 0 0 24px; }
.tester label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tester input[type=range] { width: 180px; accent-color: currentColor; }
.tester select { font: inherit; font-weight: 500; padding: 6px 12px; border-radius: 8px; border: 1.5px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.tester select option { color: #231F20; background: #FFFFFF; }
.tester__hint { opacity: .6; font-size: 15px; }
.panel__specimen { margin: 0 0 clamp(40px, 7.5vw, 109px); font-size: clamp(22px, 4.6vw, 66px); line-height: 1.4; white-space: pre-line; max-width: 1135px; }
.samples { display: flex; flex-direction: column; gap: clamp(20px, 3.8vw, 55px); }
.sample { position: relative; aspect-ratio: 1184 / 528; max-width: 1184px; border-radius: 0; overflow: hidden; display: flex; align-items: center; padding: clamp(24px, 6vw, 85px); }
.sample img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sample__text { position: relative; font-size: clamp(36px, 7.5vw, 110px); line-height: 1.05; margin: 0; }
.panel .btn-row--bottom { margin-top: clamp(40px, 10.8vw, 156px); }
@media (max-width: 640px) {
  .panel__name { text-align: center; }
  .panel__head { justify-content: center; position: relative; }
  .panel__close { position: absolute; right: 0; top: 0; }
  .btn-row { flex-direction: column; gap: 22px; }
  .btn { flex: none; width: 100%; max-width: none; height: 56px; font-size: 17px; }
  .tester { gap: 14px 20px; font-size: 15px; }
  .tester input[type=range] { width: 140px; }
  .panel__specimen { white-space: normal; word-break: break-all; }
}

/* ---------- Shop ---------- */
.shop-list { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: clamp(24px, 4vw, 60px); row-gap: 0; margin: 0; padding: 0; list-style: none; }
.shop-list a { display: block; color: var(--paper); text-decoration: none; font-size: clamp(62px, 11.25vw, 162px); line-height: 1.4; }
.shop-list a:hover { color: var(--ink); }
@media (max-width: 640px) { .shop-list { flex-direction: column; align-items: flex-start; } .shop-list a { line-height: 1.4; } }

/* ---------- About ---------- */
.about__body { margin: 0 0 clamp(32px, 4vw, 56px); font-size: clamp(30px, 6.66vw, 96px); line-height: 1.21; max-width: 1370px; }
.about__founders { margin: 0; font-size: clamp(30px, 6.66vw, 96px); font-weight: 700; line-height: 1.21; max-width: 1361px; }
.about__founders u { text-decoration-thickness: .06em; text-underline-offset: .08em; }

/* ---------- Licensing ---------- */
.licensing__intro { margin: 0 0 clamp(40px, 6vw, 88px); font-size: clamp(24px, 4.45vw, 64px); line-height: 1.28; max-width: 1316px; }
.licensing__list { margin: 0; max-width: 1316px; font-size: clamp(18px, 2.2vw, 32px); line-height: 1.28; }
.licensing__list dt { font-weight: 700; }
.licensing__list dd { margin: 0 0 clamp(28px, 3.5vw, 50px); }
.licensing__contact { font-weight: 700; font-size: clamp(18px, 2.2vw, 32px); margin: clamp(20px, 3vw, 40px) 0 0; }

/* ---------- Downloads (private page linked from the order confirmation) ---------- */
.downloads__intro { font-size: clamp(20px, 2.5vw, 32px); line-height: 1.3; margin: 0 0 clamp(28px, 4vw, 56px); max-width: 1100px; }
.downloads__list { list-style: none; margin: 0 0 clamp(28px, 4vw, 56px); padding: 0; max-width: 1100px; }
.downloads__item { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--ink); }
.downloads__item:first-child { border-top: 1px solid var(--ink); }
.downloads__name { font-size: clamp(40px, 6.6vw, 96px); line-height: 1.1; overflow-wrap: anywhere; }
.downloads__item .btn { flex: 0 0 auto; width: clamp(180px, 20vw, 280px); }
.downloads__pending { font-size: 15px; max-width: 260px; text-align: right; }
.downloads__note { font-size: 17px; margin: 0; }
@media (max-width: 640px) {
  .downloads__item { flex-direction: column; align-items: stretch; gap: 14px; }
  .downloads__item .btn { width: 100%; }
  .downloads__pending { text-align: left; max-width: none; }
}

/* ---------- 404 ---------- */
.notfound p { font-size: clamp(20px, 2.5vw, 32px); margin: 0 0 24px; }
