/* ==========================================================================
   Yamala Bali — design tokens
   Source: Brand Guideline Yamala (2026), 32 pages
   Colour, typeface and colour ratio = from guideline (locked)
   Type scale, radius, spacing, motion = proposed by us, NOT in the guideline
   ========================================================================== */

/* Fonts — both by Indian Type Foundry, free via Fontshare. Loaded with a <link> in each page's
   <head> (not @import, which blocks rendering until this file has been fetched):
   https://api.fontshare.com/v2/css?f[]=rowan@300,400,500&f[]=ranade@300,400,500&display=swap */

:root {
  /* ── Foundation (40%) — deep tones ────────────────────────── */
  --charcoal:  #181918;   /* Pantone Black 7 C */
  --navy:      #222D52;   /* Pantone 2767 C */

  /* ── Neutrals (50%) — natural ground ──────────────────────── */
  --sand:      #D9CBB8;   /* Pantone 4685 C — "Warm Sand" */
  --titanium:  #E3E3E4;   /* Pantone Cool Gray 1 C — "Titanium White" */
  --white:     #FFFFFF;   /* not in guideline — page ground since 2026-10-02 (user direction), confirm with client */
  --sand-tint: #F6F2ED;   /* derived — 25% Warm Sand on white, light warm bands (user direction 2026-10-02), confirm with client */
  --titanium-tint: #F8F8F8;   /* derived — 25% Titanium on white, light grey for the search fields and their pop-ups (user 2026-10-07), confirm with client */

  /* ── Accent (10%) ─────────────────────────────────────────── */
  --gold:      #AF9774;   /* Pantone 4665 C — "Yamala Gold" */

  /* Contrast reality (WCAG):
     gold on titanium 2.2 · on sand 1.8 · on white 2.8 · on sand tint 2.5  → NEVER text on light grounds
     gold on charcoal 6.3 · on navy 4.8                 → OK as text on dark
     charcoal / navy on any light ground ≥ 8.4          → body text */

  /* ── Semantic roles ───────────────────────────────────────── */
  /* Light grounds lifted towards white (user direction 2026-10-02): titanium → white, sand → sand tint.
     Titanium and Sand stay in use for text/buttons on dark grounds. */
  --bg:           var(--white);
  --bg-warm:      var(--sand-tint);
  --bg-deep:      var(--navy);       /* navy leads the foundation (user direction 2026-10-01) */
  --bg-deep-alt:  var(--charcoal);
  --text:         var(--charcoal);
  --text-muted:   #4A4A47;          /* derived — 8.9:1 on white, 8.0:1 on sand tint. Confirm with client */
  --text-on-deep: var(--titanium);
  --accent:       var(--gold);       /* rules, icons, logo, small caps on dark */
  --hairline:     rgba(24, 25, 24, .12);
  /* derived — PROPOSED, confirm with client */
  --text-faint:        rgba(24, 25, 24, .38);    /* disabled / decorative only, never content */
  --hairline-on-deep:  rgba(227, 227, 228, .16);
  --focus-ring:        var(--charcoal);          /* gold only inside dark grounds, see style.css */

  /* ── Functional states — OUTSIDE the brand palette ───────────
     Needed for errors and paid/confirmed states. Client approval pending. */
  --danger:     #B42318;   /* 5.1:1 on titanium */
  --danger-bg:  #F3DEDB;
  --success:    #1F5F3A;   /* 5.9:1 on titanium */
  --success-bg: #DDE8DF;

  /* ── Type — families ──────────────────────────────────────── */
  --font-display: "Rowan", Georgia, serif;          /* headlines, key statements */
  --font-sans:    "Ranade", system-ui, sans-serif;  /* body, nav, captions, UI */

  /* ── Type — scale follows BelArosa (belarosa-chalet.ch, measured 2026-10-02 at 1440 / 1024 / 768 / 390).
     User direction 2026-10-02: "treatment ukuran font ngikutin ky belarosa" (replaces the Miramare scale tried the same day).
     Their faces are NOT used: Rowan takes ITC Giovanni's roles, Ranade takes Avenir's. ─ */
  --size-12: 12px;  --size-13: 13px;  --size-14: 14px;  --size-15: 15px;  --size-16: 16px;  --size-18: 18px;  --size-20: 20px;
  --size-24: 24px;  --size-28: 28px;  --size-32: 32px;  --size-36: 36px;  --size-40: 40px;  --size-44: 44px;  --size-48: 48px;  --size-64: 64px;
  --size-80: 80px;  --size-88: 88px;  --size-96: 96px;

  /* ── Type — ROLE SCALE, three tiers: desktop (≥1025) · tablet (641–1024) · phone (≤640) ──────────
     One token per role; every component points at a role, never at a raw size, so the hierarchy holds
     on each device (user direction 2026-10-08). Steps between neighbouring roles stay ≥1.15 on every tier.
                                     desktop  tablet  phone                                            */
  --fs-display: 177.6px;   /* big index numbers ("01")     177.6    120      86 */
  --fs-hero:    88px;      /* hero headline, suite hero      88      64      44 */
  --fs-h1:      64px;      /* section headline               64      48      36 */
  --fs-h2:      48px;      /* statement, option title,       48      36      28
                              page title in the funnel */
  --fs-title:   36px;      /* section title on the suite     36      32      26
                              page (About, Amenities…) */
  --fs-name:    32px;      /* suite name in a list / card    32      28      24 */
  --fs-h3:      28px;      /* panel title, FAQ question      28      24      22 */
  --fs-h4:      24px;      /* small card title (account)     24      22      20 */
  --fs-lead:    28px;      /* lead paragraph                 28      24      20 */
  --fs-price-lg: 32px;     /* booking-card price             32      28      28 */
  --fs-price:   24px;      /* price in a list                24      22      18 */
  --fs-menu:    36px;      /* mobile menu links              36      32      28 */
  --fs-body:    16px;      /* body, subheads, form labels    16      14      13 */
  --fs-small:   14px;      /* small text, meta, inputs       14      12      12 */
  --fs-label:   12px;      /* labels, buttons, links, caps   12      10      10
                              (body / small / label tiers: user direction 2026-10-08) */

  --weight-light: 300; --weight-regular: 400; --weight-medium: 500;
  --weight-display: var(--weight-light);   /* every Rowan headline is Light (user direction 2026-10-01) */

  --lh-display: 1;     /* BelArosa big word */
  --lh-statement: 1.2; /* BelArosa 48 / 64 names */
  --lh-tight: 1.1; --lh-title: 1.2; --lh-body: 1.5; --lh-ui: 1.4;   /* headline 64/70.4, body 16/24 */

  --tracking-display: -0.03em;    /* -3% — every Rowan text (user direction 2026-10-02, was -1.5%) */
  --word-spacing-display: 0.12em; /* extra space between words in Rowan (user direction 2026-10-02) */
  --tracking-caps:    0.24em;   /* guideline headers are wide-tracked uppercase */
  --tracking-eyebrow: 0.4em;    /* eyebrows only (Figma 2026-10-02: 40%) */
  --tracking-prose:   normal;

  /* ── Shape & motion — PROPOSED ────────────────────────────── */
  /* Buttons are pills (BelArosa reference, user direction 2026-10-01). Outlined boxes (fields, search bar,
     popovers, options) are rounded, never sharp (user direction 2026-10-06); small chips use the pill radius.
     Photos stay square. */
  --radius: 12px;
  --radius-media: 0;
  --radius-pill: 999px;

  --duration: 600ms;          /* reveals, images, panels */
  --duration-quick: 240ms;    /* hover / press / popover feedback — PROPOSED */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration: 0ms; --duration-quick: 0ms; }
}

/* ── Text styles ─────────────────────────────────────────────── */
/* Roles (sizes per device in the ROLE SCALE above: desktop · tablet · phone):
   .t-display  big index numbers ("01")             --fs-display  177.6 · 120 · 86
   .t-hero     hero headline                        --fs-hero      88 · 64 · 44
   .t-h1       section headline                     --fs-h1        64 · 48 · 36
   .t-h2       statement, option titles             --fs-h2        48 · 36 · 28
   .t-name     suite name in a list / card          --fs-name      32 · 28 · 24
   .t-h3       FAQ question, small titles, panel titles --fs-h3    28 · 24 · 22
   .t-h4       card titles                          --fs-h4        24 · 22 · 20
   .t-eyebrow  line over a headline                   12   (Figma 2026-10-02: Ranade Regular caps, LH 180%, LS 40%)
   .t-label    small caps label, footer heads         12   (BelArosa 12 / tracking 2px)
   .t-body-lg  section subhead / intro                16 / 1.5
   .t-body                                            16 / 1.5
   .t-button                                          12 caps, tracking 2px, pill padding 16 / 24 (user direction 2026-10-02)
   .t-nav / .link                                     12 caps, tracking 2px                         */
.t-display, .t-hero, .t-h1, .t-h2, .t-h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  word-spacing: var(--word-spacing-display);
}
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); }
.t-hero    { font-size: var(--fs-hero); line-height: 1.05; }   /* 88 desktop: user direction 2026-10-07 */
.t-h1      { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.t-h2      { font-size: var(--fs-h2); line-height: var(--lh-statement); }
.t-h3      { font-size: var(--fs-h3); line-height: 1.4; }
.t-h4      { font-family: var(--font-display); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); word-spacing: var(--word-spacing-display);
             font-size: var(--fs-h4); line-height: var(--lh-title); }

/* suite name in a list or card (rooms cards, Other suites, availability results, booking summary): 24 → 32.
   One role instead of five sizes (typeset audit 2026-10-08); the room page hero and the home slider keep their own. */
.t-name    { font-family: var(--font-display); font-weight: var(--weight-display); letter-spacing: var(--tracking-display); word-spacing: var(--word-spacing-display);
             font-size: var(--fs-name); line-height: var(--lh-title); }

/* prices: Ranade, never Rowan (user direction 2026-10-02) */
.t-price    { font-family: var(--font-sans); font-weight: var(--weight-regular); font-size: var(--fs-price); line-height: var(--lh-title); font-variant-numeric: tabular-nums; }
.t-price--lg { font-size: var(--fs-price-lg); }
/* words in a price slot ("Rates coming soon", client 2026-10-16): list size and a tighter fit; the --lg size is set for figures */
.t-price--note, .t-price--lg.t-price--note { font-size: var(--fs-price); letter-spacing: -0.01em; font-variant-numeric: normal; }

.t-lead, .t-body, .t-body-sm, .t-caption {
  font-family: var(--font-sans);
  font-weight: var(--weight-light);
}
.t-lead    { font-size: var(--fs-lead); line-height: 1.4; }
.t-body-lg { font-family: var(--font-sans); font-weight: var(--weight-light);
             font-size: var(--fs-body); line-height: var(--lh-body); }   /* section subheads: 16 (user direction 2026-10-02) */
.t-body    { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-body-sm { font-size: var(--fs-small); line-height: var(--lh-body); }
.t-caption { font-size: var(--fs-label); line-height: var(--lh-body); }

.t-eyebrow, .t-label, .t-button, .t-nav {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
}
.t-eyebrow {                       /* Figma spec 2026-10-02: Ranade Regular, line height 180%, tracking 40%; 12px (user direction 2026-10-02) */
  font-size: var(--fs-label); line-height: 1.8; letter-spacing: var(--tracking-eyebrow);
  margin-right: calc(var(--tracking-eyebrow) * -1);   /* cancel the trailing tracking so centred eyebrows sit centred */
}
.t-label   { font-size: var(--fs-label); line-height: var(--lh-ui); letter-spacing: .1667em; }   /* 2px at 12 */
.t-button  { font-size: var(--fs-label); font-weight: var(--weight-medium); letter-spacing: .1667em; }   /* 2px at 12 (user direction 2026-10-02) */
.t-nav     { font-size: var(--fs-label); font-weight: var(--weight-medium); letter-spacing: .1667em; }

/* ── Smaller screens (BelArosa drops headlines to 36 below ~1000px, names to 48 then 32) ── */
/* the two lower tiers of the role scale */
@media (max-width: 1024px) {
  :root { --fs-display: 120px; --fs-hero: 64px; --fs-h1: 48px; --fs-h2: 36px; --fs-title: 32px; --fs-name: 28px;
          --fs-h3: 24px; --fs-h4: 22px; --fs-lead: 24px; --fs-price-lg: 28px; --fs-price: 22px; --fs-menu: 32px;
          --fs-body: 14px; --fs-small: 12px; --fs-label: 10px; }
}
@media (max-width: 640px) {
  :root { --fs-display: 86px; --fs-hero: 44px; --fs-h1: 36px; --fs-h2: 28px; --fs-title: 26px; --fs-name: 24px;
          --fs-h3: 22px; --fs-h4: 20px; --fs-lead: 20px; --fs-price-lg: 28px; --fs-price: 18px; --fs-menu: 28px;
          --fs-body: 13px; --fs-small: 12px; --fs-label: 10px; }
}
/* T5: small body text on phones goes one weight up: Ranade Light at 14px read too thin on a phone (typeset audit 2026-10-08) */
@media (max-width: 640px) {
  .t-body-sm, .t-caption { font-weight: var(--weight-regular); }
}
