/**
 * OSHIDA — design tokens.
 *
 * Every value here was measured with `get_design_context` against a node in
 * `tools/figma/node-map.json`. The node id that a value came from is written next
 * to it. Nothing in this file is a guess; where the design is internally
 * inconsistent the conflict is noted and the chosen value is marked LOCKED.
 *
 * The site is DARK ONLY. There is no light theme and no theme switch.
 *
 * Owner: work package A1. Nobody else edits this file.
 * Full prose record: docs/ai/design-tokens.md
 *
 * ---------------------------------------------------------------------------
 * Tokens that existed in the earlier draft of design-tokens.md and are GONE.
 * If you were reaching for one of these, use the replacement:
 *
 *   --o-surface-1 .. --o-surface-5  ->  --o-veil-card / --o-veil-panel /
 *                                       --o-veil-well / --o-veil-footer
 *       Measurement shows the design has no opaque surface ladder. Every card,
 *       chip and panel in the section is a translucent wash over --o-bg.
 *       The only opaque fills are --o-surface-nav and --o-surface-knob.
 *   --o-gold-light                  ->  --o-gold (the ramp has two stops, not three)
 *   --o-text-dim                    ->  --o-text-muted (the design has one muted
 *                                       level, opacity 0.4, not two)
 *   --o-fs-display                  ->  nothing. The page word-marks are vector
 *                                       art (@figma 1486:564), not live text.
 *   --o-radius-lg was 28px          ->  --o-radius-lg is 30px (@figma 2014:2632)
 *   --o-radius-md was 20px          ->  unchanged, now measured (@figma 1601:2092)
 *   --o-radius-sm was 12px          ->  --o-radius-xs 10px / --o-radius-sm 17px
 * ---------------------------------------------------------------------------
 */

:root {
	color-scheme: dark;

	/* ==================================================================
	 * 1. Colour — neutrals
	 *
	 * The design is built almost entirely from translucent veils stacked over
	 * one very dark page ground, not from opaque surface colours. Every card,
	 * chip and panel measured in phase 1 is an rgba() wash.
	 * ================================================================== */

	/* Page ground. Carried over from the render sampling recorded in
	 * docs/ai/design-tokens.md; no phase-1 node exposes the frame fill
	 * directly because every measured node is a veil painted on top of it. */
	--o-bg: #0c0c0c;
	--o-bg-deep: #080808;

	/* Opaque surfaces — the only two measured in phase 1, both on the nav. */
	--o-surface-nav: #2c2c2c; /* @figma 1571:801 — nav pill fill */
	--o-surface-knob: #3f3f3f; /* @figma 1571:802 — nav trailing knob */

	/* Translucent veils. These are the real surface system. */
	--o-veil-card: rgba(74, 74, 74, 0.2); /* @figma 1601:2092, 1579:1067, 1559:890 */
	--o-veil-panel: rgba(0, 0, 0, 0.32); /* @figma 2014:2632 — accordion panel */
	--o-veil-well: rgba(0, 0, 0, 0.2); /* @figma 1559:919 — footer statement well */
	--o-veil-footer: rgba(32, 32, 32, 0.2); /* @figma 1558:844 — footer card */
	--o-veil-notch: rgba(36, 36, 36, 0.2); /* @figma 1621:1265 — notched panel fill #242424 @ 20% */

	/* Lines */
	--o-line: #454545; /* @figma 1364:1267 — 1px solid border on the CTA pill */
	--o-line-width: 1px; /* @figma 1364:1267 */
	--o-line-soft: rgba(255, 255, 255, 0.08); /* hairline dividers — decision, no measured value */

	/* ==================================================================
	 * 2. Colour — accents
	 * ================================================================== */

	--o-gold: #d2b998; /* @figma 1364:1268 — rgb(210,185,152) */
	--o-gold-deep: #aa926f; /* @figma 1364:1268 — rgb(170,146,111) */
	--o-gold-gradient: linear-gradient(-89.37deg, var(--o-gold) 114.95%, var(--o-gold-deep) 108.15%); /* @figma 1364:1268 */

	/* CTA shell gradient. Figma reports `bg-gradient-to-l from-[#1f1f1f] 2.207%
	 * to-[#373737] 98.037%`; "to-l" in a RTL frame runs toward the inline end. */
	--o-cta-from: #1f1f1f; /* @figma 1364:1267 */
	--o-cta-to: #373737; /* @figma 1364:1267 */
	--o-cta-gradient: linear-gradient(to left, var(--o-cta-from) 2.207%, var(--o-cta-to) 98.037%); /* @figma 1364:1267 */

	/* Secondary accent. Carried from render sampling; no node measured in this
	 * pass produces it. Measure 1559:896 ("شروع یک گفتگوی استراتژیک") before
	 * shipping anything that depends on it. */
	--o-mint: #94d2c1;

	/* ==================================================================
	 * 3. Colour — text
	 * ================================================================== */

	--o-text: #ffffff; /* @figma 1571:804, 1601:2093, 1579:1069 — every text node measured is pure white */
	--o-text-muted: rgba(255, 255, 255, 0.4); /* @figma 1559:862 — the only muting in the design is opacity: 0.4 */
	--o-text-on-gold: #0c0c0c;
	--o-muted-opacity: 0.4; /* @figma 1559:862, 1558:830 */

	/* ==================================================================
	 * 4. Typography
	 *
	 * Family: Estedad (SIL OFL). Figma names it "Estedad-FD"; FD is Estedad with
	 * the `ss20` "Latin to Farsi Digits" feature on — one font, not two.
	 * See assets/css/base/typography.css.
	 * ================================================================== */

	--o-font: "Estedad", "Estedad Fallback", Tahoma, system-ui, sans-serif;

	/* Weights actually in use. @figma 1601:2093 (Black), 1559:920 (SemiBold),
	 * 1364:1269 (Regular), 1571:804 (Light), 2014:2634 (ExtraLight). */
	--o-fw-extralight: 200;
	--o-fw-light: 300;
	--o-fw-regular: 400;
	--o-fw-semibold: 600;
	--o-fw-black: 900;

	/* Type scale — every distinct size measured in phase 1, largest first.
	 * Fluid between the lg and xl breakpoints; the max is the 1440px design value. */
	--o-fs-h1: clamp(26px, 2.5vw, 36px); /* @figma 1601:2100 — section heading, 36px/900 */
	--o-fs-h2: clamp(24px, 2.22vw, 32px); /* @figma 1579:1069 — service card title, 32px/900 */
	--o-fs-h3: clamp(21px, 1.81vw, 26px); /* @figma 1559:920 — footer statement, 26px/600 */
	--o-fs-h4: clamp(20px, 1.67vw, 24px); /* @figma 2014:2633 — accordion head, 24px/900 */
	--o-fs-lg: clamp(19px, 1.53vw, 22px); /* @figma 1601:2093 (22/900), 1579:1074 (22/200), 1364:1269 (22/400) */
	--o-fs-body: clamp(17px, 1.32vw, 19px); /* @figma 2014:2634 — accordion body, 19px/200 */
	--o-fs-md: clamp(16px, 1.25vw, 18px); /* @figma 1571:804 (nav 18/300), 1601:2093 (card body 18/200) */
	--o-fs-sm: 17px; /* @figma 1559:862 — footer legal line */
	--o-fs-xs: 15px; /* @figma 1558:812, 1559:868 — footer meta and chip labels */

	/* The page word-marks (درباره ما / خدمات ما / OSHIDA) are vector art, not
	 * live text — @figma 1486:564 is a 1235x177.099 SVG. There is no display
	 * font size to tokenise; export the SVG. */

	/* Line heights */
	--o-lh-tight: 1.069; /* @figma 1571:804 — nav item, 106.945% */
	--o-lh-heading: 1.324; /* @figma 2014:2633, 1364:1269 */
	--o-lh-snug: 1.354; /* @figma 1579:1074 — service card body */
	--o-lh-body: 1.944; /* @figma 1601:2093 — 35px leading on 18px copy */
	--o-lh-loose: 2.3; /* @figma 2014:2634 — accordion body */
	--o-leading-card: 35px; /* @figma 1601:2093 — fixed leading shared by the card's 22px title and 18px body */

	/* Letter spacing. The design is inconsistent here — see docs/ai/design-tokens.md. */
	--o-track-tight: -0.03em; /* @figma 1579:1069 (32px/-0.96), 1559:920 (26px/-0.78), 1601:2093 (18px/-0.54) */
	--o-track-snug: -0.02em; /* @figma 1601:2100 — 36px/-0.72 */
	--o-track-micro: -0.01em; /* @figma 2014:2633 (24px/-0.24), 2014:2634 (19px/-0.19) */
	--o-track-nav: 0.01em; /* @figma 1571:804 — 18px/+0.18 */
	--o-track-cta: 0.02em; /* @figma 1364:1269 — 22px/+0.44 */

	/* ==================================================================
	 * 5. Radii
	 * ================================================================== */

	--o-radius-xs: 10px; /* @figma 1559:890 — footer nav chips */
	--o-radius-sm: 17px; /* @figma 1559:919 — footer statement well */
	--o-radius-md: 20px; /* @figma 1601:2092 — why-partner cards */
	--o-radius-lg: 30px; /* @figma 2014:2632 — accordion panel */
	--o-radius-xl: 50px; /* @figma 1579:1067, 1558:844, 1598:1950, 1621:1265 */
	--o-radius-pill: 999px; /* @figma 1571:801 (75px on h=62.258), 1364:1267 (38.694px on h=77.388), 1364:1268 (80px on h=58.53) — all half-height */

	/* ------------------------------------------------------------------
	 * The "asymmetric" card corner — measured, and it is NOT a squared corner.
	 *
	 * @figma 1621:1265 ships as an SVG rect, 1167.18 x 871.111. Decoding the
	 * path: all FOUR corners carry the same 50px radius. What makes the shape
	 * asymmetric is a NOTCH cut out of the block-start edge — the top edge sits
	 * 83.136px lower on the inline-end side, joined to the raised shelf by a
	 * rounded diagonal 103.74px wide.
	 *
	 * In the RTL frame the raised shelf is on the inline-START (physical right)
	 * side, under the section heading; the notch removes the block-start /
	 * inline-END corner. No corner is squared.
	 *
	 * Recipe (physical, because clip-path has no logical form; the layout is
	 * RTL-only so this is stable):
	 *
	 *   .o-panel--notched {
	 *     border-radius: var(--o-radius-xl);
	 *     clip-path: var(--o-notch-clip);
	 *   }
	 *
	 * clip-path removes the border-radius it crosses, so for pixel-exact
	 * corners use the exported SVG from 1621:1265 as a mask instead.
	 * ------------------------------------------------------------------ */
	--o-notch-step: 83.14px; /* @figma 1621:1265 — block-size of the step */
	--o-notch-run: 103.74px; /* @figma 1621:1265 — inline run of the diagonal */
	--o-notch-inset: 29.81%; /* @figma 1621:1265 — 347.926 / 1167.18, where the low shelf starts */
	--o-notch-shelf: 38.7%; /* @figma 1621:1265 — 451.665 / 1167.18, where the raised shelf starts */
	--o-notch-clip: polygon(
		0 100%,
		0 var(--o-notch-step),
		var(--o-notch-inset) var(--o-notch-step),
		var(--o-notch-shelf) 0,
		100% 0,
		100% 100%
	);

	/* ==================================================================
	 * 6. Spacing
	 *
	 * Derived from the padding and gap values actually measured. The design has
	 * no single modular scale; these are the real stops.
	 * ================================================================== */

	--o-space-3xs: 10px; /* @figma 1559:890 — chip radius/edge rhythm */
	--o-space-2xs: 15px; /* @figma 1559:890 — chip block padding */
	--o-space-xs: 20px;
	--o-space-sm: 25px; /* @figma 1601:2092 — card column gap */
	--o-space-md: 30px; /* @figma 1598:1950 (grid gap), 1601:2092 (card inline padding) */
	--o-space-lg: 40px; /* @figma 1579:1067 — service card inline padding */
	--o-space-xl: 50px;
	--o-space-2xl: 63px; /* @figma 1598:1950 — grid block padding */
	--o-space-3xl: 70px; /* @figma 1579:1067 — service card block padding */

	/* Exact composite paddings, so components do not have to reassemble them. */
	--o-pad-card: 37px 30px; /* @figma 1601:2092 */
	--o-pad-card-lg: 70px 40px; /* @figma 1579:1067 */
	--o-pad-grid: 63px 58px; /* @figma 1598:1950 */
	--o-pad-chip: 15px 38px; /* @figma 1559:890 */
	--o-pad-well: 41px 26px; /* @figma 1559:919 */

	/* ==================================================================
	 * 7. Layout
	 * ================================================================== */

	--o-canvas: 1440px; /* design frame width — tools/figma/node-map.json */
	--o-container: 1235px; /* @figma 1486:564 — footer wordmark; 1558:844 measures 1234px */
	--o-container-panel: 1168px; /* @figma 2014:2632; 1621:1265 measures 1167.238px */
	--o-gutter: clamp(20px, 7.12vw, 102.5px); /* (1440 - 1235) / 2 = 102.5 @figma 1486:564 */
	--o-gutter-panel: clamp(20px, 9.44vw, 136px); /* @figma 2014:2632 — panel inset from the frame edge */

	/* Section rhythm — measured as the vertical gap between adjacent sections
	 * on the home frame. */
	--o-section-gap: 72px; /* @figma 1621:1265 ends y=2938.62 -> 1364:1265 starts y=3010.83 */
	--o-section-gap-lg: 90px; /* @figma 1558:830 y=7991.71 -> 1558:844 y=8082.12 */
	--o-card-pitch: 401px; /* @figma 1579:1067 y=1414.68 -> 1579:1096 y=1815.31 */
	--o-card-offset: 166px; /* @figma 1579:1084 y=1580.47 - 1579:1067 y=1414.68 — the staggered-column offset */

	/* Breakpoints, for reference in @media (custom media is not shipped). */
	--o-bp-sm: 599px;
	--o-bp-md: 600px;
	--o-bp-lg: 900px;
	--o-bp-xl: 1200px;

	/* ==================================================================
	 * 8. Effects
	 * ================================================================== */

	--o-shadow-card: -10px 18px 113.2px 0 rgba(0, 0, 0, 0.19); /* @figma 1601:2092 */
	--o-shadow-panel: -10px 18px 113.2px -2px rgba(0, 0, 0, 0.19); /* @figma 1579:1067, 1558:844 */

	/* Backdrop blur. No phase-1 node reports a backdrop blur — every veil is a
	 * flat rgba() fill. The single measured blur in the file is on the nav
	 * variant 2082:3590, which is outside the phase-1 section. Kept so the
	 * glass treatment has a token, but nothing in scope uses it yet. */
	--o-blur-veil: 11.5px; /* @figma 2082:3590 (out of phase-1 scope) */

	/* ==================================================================
	 * 9. Z-index scale — code decision, nothing to measure.
	 * ================================================================== */

	--o-z-base: 0;
	--o-z-raised: 10;
	--o-z-sticky: 100;
	--o-z-nav: 200;
	--o-z-overlay: 300;
	--o-z-modal: 400;
	--o-z-skip: 500;

	/* ==================================================================
	 * 10. Motion — code decision. Figma carries no motion for these nodes.
	 * Every consumer must gate its use behind
	 * `@media (prefers-reduced-motion: no-preference)`.
	 * ================================================================== */

	--o-dur-instant: 90ms;
	--o-dur-fast: 160ms;
	--o-dur-base: 240ms;
	--o-dur-slow: 420ms;
	--o-ease-standard: cubic-bezier(0.2, 0, 0, 1);
	--o-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--o-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}
