/* =====================================================================
   TEMAI 7 | tokens.css  (owner: code-foundation)
   Names mirror the Figma collection "TEMAI 7": color/bg/base is --color-bg-base, space/16 is --space-16,
   radius/md is --radius-md. Night is the site (:root). Paper is any element with data-mode="paper".
   Breakpoints (documented, used as media queries in every file):
     phone  : up to 759px      tablet : 760px to 1099px      desktop : 1100px and up
   Type: the text styles of Figma (Phone/ and Desktop/) become --fs-*, --lh-*, --fw-* tokens and .t-* classes.
   Phone values below 760px, Desktop values from 1100px, linear (clamp) in between.
   ===================================================================== */

/* ---------- 1. colour: Night (default) ---------- */
:root,
[data-mode="night"] {
  --color-bg-base: #08090a;
  --color-bg-raised: #0e1012;
  --color-surface-1: #131619;
  --color-surface-2: #1a1e22;
  --color-surface-3: #242a31;
  --color-line-hair: rgba(255, 255, 255, 0.08);
  --color-line-strong: rgba(255, 255, 255, 0.18);
  --color-text-primary: #f4f2ee;
  --color-text-secondary: #a9afb6;
  --color-text-muted: #7f868e;
  --color-text-on-red: #ffffff;
  --color-brand-red: #e6323b;
  --color-brand-red-fill: #d92b34;
  --color-brand-red-press: #b8222a;
  --color-brand-red-soft: rgba(230, 50, 59, 0.12);
  --color-brand-graphite: #313538;
  --color-metal-steel: #c9ced4;
  --color-state-ok: #3ecf8e;
  --color-state-warn: #f2b544;
  --color-state-danger: #ff5c5c;
  --color-state-info: #6cb6ff;
  --color-channel-whatsapp: #25d366;
  /* derived (not Figma variables): soft status tints = status colour at 14% */
  --color-state-ok-soft: rgba(62, 207, 142, 0.14);
  --color-state-warn-soft: rgba(242, 181, 68, 0.14);
  --color-state-danger-soft: rgba(255, 92, 92, 0.14);
  --color-state-info-soft: rgba(108, 182, 255, 0.14);
  --color-steel-soft: rgba(201, 206, 212, 0.14);
  --color-glass-fill: rgba(255, 255, 255, 0.06);       /* Blur/Glass fill */
  --color-scrim: rgba(4, 5, 6, 0.72);                  /* dim layer behind the booking window */
  --color-selection: rgba(230, 50, 59, 0.45);
  --focus-ring: 2px solid var(--color-text-primary);   /* 2px ring, 2px (buttons) or 3px (fields) away; per mode so Paper gets a dark ring */
  color-scheme: dark;
}

/* ---------- 2. colour: Paper (ticket, Visit us band, printed documents) ---------- */
[data-mode="paper"] {
  --color-bg-base: #f3f1ec;
  --color-bg-raised: #fbfaf7;
  --color-surface-1: #ffffff;
  --color-surface-2: #f0eee9;
  --color-surface-3: #e5e2db;
  --color-line-hair: rgba(17, 20, 23, 0.1);
  --color-line-strong: rgba(17, 20, 23, 0.22);
  --color-text-primary: #111417;
  --color-text-secondary: #4a5057;
  --color-text-muted: #6b7178;
  --color-text-on-red: #ffffff;
  --color-brand-red: #e6323b;
  --color-brand-red-fill: #d92b34;
  --color-brand-red-press: #b8222a;
  --color-brand-red-soft: rgba(230, 50, 59, 0.1);
  --color-brand-graphite: #313538;
  --color-metal-steel: #5b6168;
  --color-state-ok: #1b8f5a;
  --color-state-warn: #a86a12;
  --color-state-danger: #c93636;
  --color-state-info: #2a66c4;
  --color-channel-whatsapp: #128c4b;
  --color-state-ok-soft: rgba(27, 143, 90, 0.14);
  --color-state-warn-soft: rgba(168, 106, 18, 0.14);
  --color-state-danger-soft: rgba(201, 54, 54, 0.14);
  --color-state-info-soft: rgba(42, 102, 196, 0.14);
  --color-steel-soft: rgba(91, 97, 104, 0.14);
  --color-glass-fill: rgba(17, 20, 23, 0.04);
  --color-scrim: rgba(17, 20, 23, 0.5);
  --color-selection: rgba(230, 50, 59, 0.28);
  --focus-ring: 2px solid var(--color-text-primary);
  color-scheme: light;
}
/* an element that switches mode paints its own ground and text, so it can sit inside a Night page */
[data-mode] { color: var(--color-text-primary); }
[data-mode="paper"] { background-color: var(--color-bg-base); }

/* ---------- 3. type families ---------- */
:root {
  --font-display: "Alexandria", "Readex Pro", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-text: "Readex Pro", "Alexandria", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-code: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ls-latin-display: -0.015em;        /* Latin display, heading and numeric text only (never Arabic) */
  --ls-code: 0.08em;
}

/* ---------- 4. type scale: --fs-<style>, --lh-<style>, --fw-<style> (phone to desktop, fluid) ---------- */
:root {
  --fs-display-hero: clamp(44px, calc(44px + 60 * (100vw - 760px) / 340), 104px);
  --lh-display-hero: clamp(54px, calc(54px + 66 * (100vw - 760px) / 340), 120px);
  --fw-display-hero: 800;
  --fs-display-l: clamp(34px, calc(34px + 38 * (100vw - 760px) / 340), 72px);
  --lh-display-l: clamp(44px, calc(44px + 42 * (100vw - 760px) / 340), 86px);
  --fw-display-l: 800;
  --fs-display-m: clamp(28px, calc(28px + 20 * (100vw - 760px) / 340), 48px);
  --lh-display-m: clamp(38px, calc(38px + 22 * (100vw - 760px) / 340), 60px);
  --fw-display-m: 700;
  --fs-heading-l: clamp(24px, calc(24px + 8 * (100vw - 760px) / 340), 32px);
  --lh-heading-l: clamp(34px, calc(34px + 10 * (100vw - 760px) / 340), 44px);
  --fw-heading-l: 700;
  --fs-heading-m: clamp(20px, calc(20px + 4 * (100vw - 760px) / 340), 24px);
  --lh-heading-m: clamp(30px, calc(30px + 4 * (100vw - 760px) / 340), 34px);
  --fw-heading-m: 600;
  --fs-heading-s: clamp(17px, calc(17px + 1 * (100vw - 760px) / 340), 18px);
  --lh-heading-s: clamp(26px, calc(26px + 2 * (100vw - 760px) / 340), 28px);
  --fw-heading-s: 600;
  --fs-body-l: clamp(17px, calc(17px + 3 * (100vw - 760px) / 340), 20px);
  --lh-body-l: clamp(30px, calc(30px + 4 * (100vw - 760px) / 340), 34px);
  --fw-body-l: 400;
  --fs-body-m: clamp(15px, calc(15px + 1 * (100vw - 760px) / 340), 16px);
  --lh-body-m: clamp(26px, calc(26px + 2 * (100vw - 760px) / 340), 28px);
  --fw-body-m: 400;
  --fs-body-s: clamp(13px, calc(13px + 1 * (100vw - 760px) / 340), 14px);
  --lh-body-s: clamp(22px, calc(22px + 2 * (100vw - 760px) / 340), 24px);
  --fw-body-s: 400;
  --fs-label-l: 16px;
  --lh-label-l: 20px;
  --fw-label-l: 600;
  --fs-label-m: 14px;
  --lh-label-m: 18px;
  --fw-label-m: 500;
  --fs-label-s: 12px;
  --lh-label-s: 16px;
  --fw-label-s: 500;
  --fs-code-m: clamp(12px, calc(12px + 1 * (100vw - 760px) / 340), 13px);
  --lh-code-m: 16px;
  --fw-code-m: 500;
  --fs-code-s: 11px;
  --lh-code-s: 14px;
  --fw-code-s: 500;
  --fs-numeric-xl: clamp(44px, calc(44px + 28 * (100vw - 760px) / 340), 72px);
  --lh-numeric-xl: clamp(44px, calc(44px + 28 * (100vw - 760px) / 340), 72px);
  --fw-numeric-xl: 800;
  --fs-numeric-l: clamp(32px, calc(32px + 8 * (100vw - 760px) / 340), 40px);
  --lh-numeric-l: clamp(36px, calc(36px + 8 * (100vw - 760px) / 340), 44px);
  --fw-numeric-l: 800;
  --fs-numeric-m: clamp(22px, calc(22px + 2 * (100vw - 760px) / 340), 24px);
  --lh-numeric-m: clamp(26px, calc(26px + 2 * (100vw - 760px) / 340), 28px);
  --fw-numeric-m: 700;
  --fs-outline-model: clamp(96px, calc(96px + 124 * (100vw - 760px) / 340), 220px);
  --lh-outline-model: clamp(96px, calc(96px + 124 * (100vw - 760px) / 340), 220px);
  --fw-outline-model: 800;
}

/* ---------- 5. space, radius, shadow, blur, motion ---------- */
:root {
  --space-4: 4px;  --space-8: 8px;  --space-12: 12px;  --space-16: 16px;  --space-20: 20px;  --space-24: 24px;
  --space-32: 32px;  --space-40: 40px;  --space-56: 56px;  --space-72: 72px;  --space-96: 96px;  --space-128: 128px;  --space-160: 160px;

  --radius-xs: 4px;      /* tags */
  --radius-sm: 8px;      /* inputs inside tight rows */
  --radius-md: 12px;     /* buttons, inputs */
  --radius-lg: 20px;     /* cards, panels */
  --radius-xl: 28px;     /* booking window, ticket */
  --radius-pill: 999px;  /* chips */

  --shadow-float: 0 32px 80px -16px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  --glow-red: 0 0 56px 0 rgba(230, 50, 59, 0.35);
  --blur-glass: 24px;

  --dur-fast: 160ms;
  --dur-base: 320ms;
  --dur-slow: 640ms;
  --dur-cinema: 1100ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --stagger: 70ms;

  --tap-min: 44px;                                      /* smallest touch target */
}
[data-mode="paper"] {
  --shadow-float: 0 32px 80px -24px rgba(17, 20, 23, 0.35);
  --shadow-card: 0 12px 32px -16px rgba(17, 20, 23, 0.25);
}

/* ---------- 6. layout tokens: page margin and grid (Figma: desktop 1440, 12 columns, margin 96, gutter 24; phone 390, 4 columns, margin 20, gutter 12) ---------- */
:root {
  --page-margin: 20px;
  --grid-cols: 4;
  --grid-gutter: 12px;
  --content-max: 1248px;
  --section-gap: 96px;           /* distance between two sections: phone 96, desktop 160 */
  --nav-h: 64px;                 /* phone nav 64, desktop nav 88 */
}
@media (min-width: 760px) {
  :root { --page-margin: 40px; --grid-cols: 8; --grid-gutter: 20px; --section-gap: 128px; --nav-h: 76px; }
}
@media (min-width: 1100px) {
  :root {
    --page-margin: clamp(64px, calc(64px + 32 * (100vw - 1100px) / 340), 96px);
    --grid-cols: 12; --grid-gutter: 24px; --section-gap: 160px; --nav-h: 88px;
  }
}

/* ---------- 7. text classes (one per Figma text style) ---------- */
.t-display-hero {
  font-family: var(--font-display);
  font-size: var(--fs-display-hero);
  line-height: var(--lh-display-hero);
  font-weight: var(--fw-display-hero);
}

.t-display-l {
  font-family: var(--font-display);
  font-size: var(--fs-display-l);
  line-height: var(--lh-display-l);
  font-weight: var(--fw-display-l);
}

.t-display-m {
  font-family: var(--font-display);
  font-size: var(--fs-display-m);
  line-height: var(--lh-display-m);
  font-weight: var(--fw-display-m);
}

.t-heading-l {
  font-family: var(--font-display);
  font-size: var(--fs-heading-l);
  line-height: var(--lh-heading-l);
  font-weight: var(--fw-heading-l);
}

.t-heading-m {
  font-family: var(--font-display);
  font-size: var(--fs-heading-m);
  line-height: var(--lh-heading-m);
  font-weight: var(--fw-heading-m);
}

.t-heading-s {
  font-family: var(--font-display);
  font-size: var(--fs-heading-s);
  line-height: var(--lh-heading-s);
  font-weight: var(--fw-heading-s);
}

.t-body-l {
  font-family: var(--font-text);
  font-size: var(--fs-body-l);
  line-height: var(--lh-body-l);
  font-weight: var(--fw-body-l);
}

.t-body-m {
  font-family: var(--font-text);
  font-size: var(--fs-body-m);
  line-height: var(--lh-body-m);
  font-weight: var(--fw-body-m);
}

.t-body-s {
  font-family: var(--font-text);
  font-size: var(--fs-body-s);
  line-height: var(--lh-body-s);
  font-weight: var(--fw-body-s);
}

.t-label-l {
  font-family: var(--font-text);
  font-size: var(--fs-label-l);
  line-height: var(--lh-label-l);
  font-weight: var(--fw-label-l);
}

.t-label-m {
  font-family: var(--font-text);
  font-size: var(--fs-label-m);
  line-height: var(--lh-label-m);
  font-weight: var(--fw-label-m);
}

.t-label-s {
  font-family: var(--font-text);
  font-size: var(--fs-label-s);
  line-height: var(--lh-label-s);
  font-weight: var(--fw-label-s);
}

.t-code-m {
  font-family: var(--font-code);
  font-size: var(--fs-code-m);
  line-height: var(--lh-code-m);
  font-weight: var(--fw-code-m);
  letter-spacing: var(--ls-code);
  text-transform: uppercase;
  direction: ltr;
  unicode-bidi: isolate;
}

.t-code-s {
  font-family: var(--font-code);
  font-size: var(--fs-code-s);
  line-height: var(--lh-code-s);
  font-weight: var(--fw-code-s);
  letter-spacing: var(--ls-code);
  text-transform: uppercase;
  direction: ltr;
  unicode-bidi: isolate;
}

.t-numeric-xl {
  font-family: var(--font-display);
  font-size: var(--fs-numeric-xl);
  line-height: var(--lh-numeric-xl);
  font-weight: var(--fw-numeric-xl);
  font-variant-numeric: tabular-nums;
}

.t-numeric-l {
  font-family: var(--font-display);
  font-size: var(--fs-numeric-l);
  line-height: var(--lh-numeric-l);
  font-weight: var(--fw-numeric-l);
  font-variant-numeric: tabular-nums;
}

.t-numeric-m {
  font-family: var(--font-display);
  font-size: var(--fs-numeric-m);
  line-height: var(--lh-numeric-m);
  font-weight: var(--fw-numeric-m);
  font-variant-numeric: tabular-nums;
}

.t-outline-model {
  font-family: var(--font-display);
  font-size: var(--fs-outline-model);
  line-height: var(--lh-outline-model);
  font-weight: var(--fw-outline-model);
  color: transparent;
  -webkit-text-stroke: 1px var(--color-metal-steel);
  opacity: 0.22;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  user-select: none;
}

/* Latin display tracking: only English pages or runs marked .ltr, never Arabic */
:lang(en) .t-display-hero,
:lang(en) .t-display-l,
:lang(en) .t-display-m,
:lang(en) .t-heading-l,
:lang(en) .t-heading-m,
:lang(en) .t-heading-s,
:lang(en) .t-numeric-xl,
:lang(en) .t-numeric-l,
:lang(en) .t-numeric-m,
.t-display-hero.ltr,
.t-display-l.ltr,
.t-display-m.ltr,
.t-heading-l.ltr,
.t-heading-m.ltr,
.t-heading-s.ltr,
.t-numeric-xl.ltr,
.t-numeric-l.ltr,
.t-numeric-m.ltr {
  letter-spacing: var(--ls-latin-display);
}
.ltr { direction: ltr; unicode-bidi: isolate; }
