/* Z Studio — sprint shopfront. Tokens are verbatim Paper & Ink
   (docs/identity/DESIGN.md, ratified 2026-08-06). Accent is rationed to two
   roles on this page: the one primary action, and LIVE marks. */

:root {
  --paper: #f1ece3;
  --canvas: #e9e3d8;
  --surface: #faf7f1;
  --raised: #fffdf9;
  --rule: #dcd4c6;
  --rule-2: #e8e1d5;
  --ink: #1b1815;
  --ink-2: #453e36;
  --ink-3: #6e655b;
  --ink-4: #998f82;
  --accent: #df5830;
  --accent-press: #c4451f;
  --accent-wash: #f8e4da;
  --red-ink: #b0402c;

  --r-chip: 5px;
  --r-btn: 9px;
  --r-plate: 13px;
  --r-panel: 18px;

  --sh-1: 0 1px 2px rgba(51, 36, 22, 0.08);
  --sh-2: 0 2px 8px rgba(51, 36, 22, 0.1);
  --sh-3: 0 12px 32px rgba(51, 36, 22, 0.14);

  --serif: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, Georgia, serif;
  --sans: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  --fast: 120ms;
  --move: 200ms;
  --slow: 320ms;
  --ease: cubic-bezier(0.2, 0.72, 0.18, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Arabic needs air. */
html[lang='ar'] body { line-height: 1.75; }
html[lang='ar'] { --serif: 'IBM Plex Sans Arabic', var(--sans); }

/* Language switching: both languages live in the DOM; the root lang decides. */
html[lang='en'] .ar { display: none; }
html[lang='ar'] .en { display: none; }

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  unicode-bidi: isolate;
  direction: ltr;
}

.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
html[lang='ar'] .label { letter-spacing: 0.04em; }

.mono { font-family: var(--mono); font-size: 13px; }

.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 32px);
}

/* ---- top bar ------------------------------------------------------------ */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--rule);
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 16px;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark i { font-style: normal; color: var(--accent); }

.langbtn {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 40px;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease);
}
.langbtn:hover { border-color: var(--ink-4); }

/* ---- hero --------------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--canvas);
  background-image: radial-gradient(var(--rule) 1px, transparent 1px);
  background-size: 22px 22px;
  border-block-end: 1px solid var(--rule);
  overflow: hidden;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero .wrap {
  position: relative;
  padding-block: clamp(64px, 12vh, 128px) clamp(48px, 8vh, 88px);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 6.2vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 18px 0 0;
  max-width: 17ch;
}
html[lang='ar'] .hero h1 { line-height: 1.45; letter-spacing: 0; }

.hero .sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-2);
  max-width: 56ch;
  margin: 22px 0 0;
}

.cta {
  display: inline-block;
  margin-block-start: 34px;
  background: var(--accent);
  color: #fffdf9;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 23px);
  text-decoration: none;
  border-radius: 999px;
  padding: 16px 34px;
  box-shadow: var(--sh-2);
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.cta:hover { background: var(--accent-press); }
.cta:active { transform: translateY(1px); }

.channels {
  margin-block-start: 16px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.channels a { color: inherit; }

.motionbtn {
  position: absolute;
  inset-block-end: 14px;
  inset-inline-end: 16px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
}
.motionbtn:hover { color: var(--ink-2); }

/* ---- sections ----------------------------------------------------------- */

section { padding-block: clamp(56px, 9vh, 96px); }
section + section { border-block-start: 1px solid var(--rule); }

.sechead {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-block-end: 8px;
}

/* Spec-sheet ornament, light touch: a dimension line after the header. */
.sechead::after {
  content: '';
  flex: 1;
  border-block-start: 1px solid var(--rule);
  transform: translateY(-4px);
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.2;
  margin: 0;
}

.lede { color: var(--ink-2); max-width: 62ch; margin: 14px 0 0; }

/* ---- steps -------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
  margin-block-start: 36px;
}

.step { border-block-start: 2px solid var(--ink); padding-block-start: 16px; }

.step .no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--red-ink);
  letter-spacing: 0.08em;
}

.step h3 {
  font-family: var(--serif);
  font-size: 20px;
  margin: 8px 0 8px;
}

.step p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---- proof strips -------------------------------------------------------- */

.strip { margin-block-start: 44px; }

.striphead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  border-block-end: 1px solid var(--rule);
  padding-block-end: 8px;
  margin-block-end: 18px;
}

.striphead h3 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0;
}

.striphead .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

.frames {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
}
.frames.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }

.frame { text-decoration: none; color: inherit; display: block; min-width: 0; }

.frame .plate {
  position: relative;
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-plate);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: box-shadow var(--move) var(--ease), transform var(--move) var(--ease);
}
a.frame:hover .plate { box-shadow: var(--sh-3); transform: translateY(-2px); }

.frame img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; }

.live {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  background: var(--accent);
  color: #fffdf9;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  border-radius: var(--r-chip);
  padding: 3px 7px;
}

.frame figcaption {
  margin-block-start: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* ---- pricing (spec sheet, not card grid) --------------------------------- */

.sheet {
  margin-block-start: 36px;
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 10px 20px;
  padding: 22px clamp(16px, 3vw, 28px);
  align-items: baseline;
}
.row + .row { border-block-start: 1px dotted var(--rule); }

.row h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 4px; }
.row .tag { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

.price {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(19px, 2.6vw, 24px);
  white-space: nowrap;
}
.price small { display: block; font-family: var(--sans); font-weight: 400; font-size: 12.5px; color: var(--ink-3); white-space: normal; }

.row .what { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.paynote { margin-block-start: 14px; color: var(--ink-3); font-size: 13.5px; max-width: 74ch; }

/* ---- about + closing ----------------------------------------------------- */

.about p { color: var(--ink-2); max-width: 62ch; margin: 14px 0 0; font-size: 16.5px; }

.closing { text-align: center; background: var(--canvas); border-block-start: 1px solid var(--rule); }
.closing h2 { font-size: clamp(28px, 4.6vw, 44px); max-width: 20ch; margin-inline: auto; }
.closing .channels { justify-content: center; }

/* ---- footer -------------------------------------------------------------- */

footer {
  border-block-start: 1px solid var(--rule);
  padding-block: 28px 40px;
  color: var(--ink-3);
  font-size: 13px;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer a { color: var(--ink-2); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- legal documents ------------------------------------------------------ */

.doc { padding-block: clamp(40px, 8vh, 72px); }
.doc h1 { font-family: var(--serif); font-size: clamp(28px, 4.5vw, 40px); margin: 6px 0 4px; }
.doc h2 { font-size: 20px; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--ink-2); max-width: 68ch; }
.doc .updated { font-family: var(--mono); font-size: 12px; color: var(--ink-4); }

/* ---- entrance motion (triggered, own clock, reduced-motion honored) ------- */

/* Hidden entrance states exist ONLY while the script is alive (html.anim):
   with no JS — or a crashed script — every section renders visible. A page
   that is blank below the fold without JavaScript is a failed page. */
html.anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
html.anim .reveal.in { opacity: 1; transform: none; }

.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; }
html.anim .hero h1 .line > span { transform: translateY(110%); transition: transform 560ms var(--ease); }
html.anim .hero.in h1 .line > span { transform: none; }
html.anim .hero h1 .line:nth-child(2) > span { transition-delay: 70ms; }
html.anim .hero h1 .line:nth-child(3) > span { transition-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero h1 .line > span { opacity: 1; transform: none; transition: none; }
  .hero canvas, .motionbtn { display: none; }
}

/* ---- phone (390 is the gate) ---------------------------------------------- */

@media (max-width: 760px) {
  /* 44px tap floor on the quiet links the audit flagged. */
  .wordmark { display: inline-block; padding-block: 10px; }
  .channels a, footer a { display: inline-block; padding: 10px 8px; }
  .motionbtn { padding: 14px 12px; }
  .steps { grid-template-columns: 1fr; }
  .frames, .frames.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .price { margin-block-start: 2px; }
  footer .wrap { flex-direction: column; }
}

@media (max-width: 420px) {
  .frames, .frames.two { grid-template-columns: 1fr; }
}
