/* ==========================================================================
   CHILLAX DESIGN SYSTEM — SINGLE SOURCE OF TRUTH
   ==========================================================================
   Edit ANY token in `:root` (or `html[lang^="vi"]` for Vietnamese overrides)
   and EVERY matching component across the entire website updates automatically
   (Homepage, Drinks/Foods Menu, Our Space, Services & Events, Gallery, Blog,
   Booking, Contact, Single Posts, Search, 404, and Gutenberg Block Editor).
   ========================================================================== */

:root {
  /* ------------------------------------------------------------------------
     1. BRAND PALETTE TOKENS
     ------------------------------------------------------------------------ */
  --cl-forest: #2F5F46;
  --cl-forest-light: #3a7a5c;
  --cl-forest-dark: #1a3d2e;
  --cl-deep-green: #173322;
  --cl-gold: #DCA322;
  --cl-gold-light: #f0c94d;
  --cl-gold-dark: #b8891a;
  --cl-cream: #FDFCF7;
  --cl-light: #F8F8F8;
  --cl-dark: #3D3D3D;
  --cl-text: #475569;
  --cl-heading: #1E293B;
  --cl-white: #FFFFFF;
  --cl-sage: #EBF8F1;
  --cl-border: #E2E8F0;

  /* ------------------------------------------------------------------------
     2. FONT FAMILY TOKENS (Hoiana Resort System — 100% Open-Licensed)
        EN: Montserrat + Boska + Raleway
        VI: Montserrat + Noto Serif Display + Raleway (auto-switched below)
     ------------------------------------------------------------------------ */
  --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Boska', 'Noto Serif Display', Georgia, serif;
  --font-accent: 'Raleway', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Legacy aliases kept in sync automatically */
  --font-heading: var(--font-primary);
  --font-body: var(--font-primary);
  --font-new-primary: var(--font-primary);
  --font-new-secondary: var(--font-primary);

  /* ------------------------------------------------------------------------
     3. SEMANTIC TYPOGRAPHY ROLES (Change ONCE -> Applies EVERYWHERE)
     ------------------------------------------------------------------------ */

  /* Role 1 — Display & Section Titles
     Applies to: Video Hero H1, Section Titles, Page Banner H1, Gallery Hero H1,
     Booking Title, Gold Section Subheadings, Blog Hero/CTA Titles, Error Hero */
  --type-display-font: var(--font-primary);
  --type-display-weight: 700;
  --type-display-style: normal;
  --type-display-transform: uppercase;
  --type-display-tracking: 0.02em;
  --type-display-leading: 1.15;

  /* Role 2 — Photo Overlay Feature Titles (Dark photographic cards)
     Applies to: Highlights Bento Cards, Our Space Cinema Slider, Hero Subheading,
     Blog/Gallery Hero Eyebrows */
  --type-overlay-font: var(--font-secondary);
  --type-overlay-weight: 500;
  --type-overlay-style: italic;
  --type-overlay-transform: none;
  --type-overlay-tracking: 0.01em;
  --type-overlay-leading: 1.2;

  /* Role 3 — Surface & Catalog Card Titles (Menu Drinks/Foods, Services, Space, Blog)
     Applies to: Dish/Drink Cards, Single Dish Title, Services & Events Cards,
     Our Space Page Cards, Blog Archive Cards, Search Cards, Generic Cards, Widgets */
  --type-card-font: var(--font-primary);
  --type-card-weight: 500;
  --type-card-style: normal;
  --type-card-transform: none;
  --type-card-tracking: 0.025em;
  --type-card-leading: 1.32;
  --type-card-color: var(--cl-deep-green);

  /* Role 4 — Editorial Lead / Section Intros
     Applies to: Section Intros, Highlights/Space/Services/Blog/Gallery Sub-intros */
  --type-lead-font: var(--font-accent);
  --type-lead-weight: 400;
  --type-lead-leading: 1.72;

  /* Role 5 — Body Copy
     Applies to: Body text, paragraphs, descriptions, form fields */
  --type-body-font: var(--font-primary);
  --type-body-weight: 400;
  --type-body-size: 16px;
  --type-body-leading: 1.65;

  /* Role 6 — UI Navigation, Buttons, Tabs & Labels */
  --type-ui-font: var(--font-primary);
  --type-ui-weight: 600;
  --type-ui-tracking: 0.09em;

  /* ------------------------------------------------------------------------
     4. SHAPE, SPACING & ELEVATION TOKENS
     ------------------------------------------------------------------------ */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 120px;

  --container-max: 1200px;
  --container-padding: 24px;
  --header-height: 104px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-pill: 6px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  --transition-slow: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);

  --shadow-sm: 0 1px 3px rgba(15, 28, 20, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 28, 20, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 28, 20, 0.12);
  --shadow-gold: 0 2px 8px rgba(15, 28, 20, 0.14);
  --shadow-green: 0 2px 8px rgba(15, 28, 20, 0.14);
}

/* Vietnamese Locale Token Overrides (1 place controls ALL VI typography) */
html[lang^="vi"] {
  --font-secondary: 'Noto Serif Display', Georgia, serif;
  --type-overlay-weight: 400;
}

/* ==========================================================================
   SEMANTIC ROLE BINDINGS (Single Authoritative Cascade Layer)
   ========================================================================== */

/* Base Body */
body {
  font-family: var(--type-body-font);
  font-weight: var(--type-body-weight);
  font-size: var(--type-body-size);
  line-height: var(--type-body-leading);
}

/* Base Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--type-display-font);
  font-weight: var(--type-display-weight);
  font-style: var(--type-display-style);
  letter-spacing: var(--type-display-tracking);
  line-height: var(--type-display-leading);
}

h4, h5, h6 {
  font-weight: var(--type-card-weight);
  line-height: var(--type-card-leading);
}

/* Role 1 — Display & Section Titles */
.section__title,
.page-banner__title,
.video-hero__heading,
.gallery-hero__title,
.booking-info__title,
.cl-gold-heading,
.cl-blog-hero__title,
.cl-blog-cta__title,
.cl-events-hero__title,
.cl-error-hero__title,
.cl-error-hero__code,
.space-cinema__section-title,
.section__subtitle {
  font-family: var(--type-display-font);
  font-weight: var(--type-display-weight);
  font-style: var(--type-display-style);
  text-transform: var(--type-display-transform);
  letter-spacing: var(--type-display-tracking);
  line-height: var(--type-display-leading);
}

.video-hero__heading {
  letter-spacing: 0.14em;
}

/* Role 2 — Photo Overlay Feature Titles */
.cl-highlight-card__title,
.space-cinema__title,
.space-showcase__title,
.video-hero__subheading,
.cl-blog-hero__eyebrow,
.gallery-hero__eyebrow,
.cl-events-hero__eyebrow,
.cl-event-card--featured .cl-event-card__title {
  font-family: var(--type-overlay-font);
  font-weight: var(--type-overlay-weight);
  font-style: var(--type-overlay-style);
  text-transform: var(--type-overlay-transform);
  letter-spacing: var(--type-overlay-tracking);
  line-height: var(--type-overlay-leading);
}

.cl-highlight-card__title {
  font-size: clamp(1.36rem, 2.05vw, 1.82rem);
}

/* Role 3 — Surface & Catalog Card Titles (Menu Drinks & Foods, Services, Space, Blog) */
.dish-card__title,
.cl-dish-single__title,
.cl-service-card__title,
.cl-evcat-card__title,
.cl-venue-card__title,
.cl-pillar-card__title,
.cl-event-card__title,
.cl-evsingle-album__title,
.space-card__title,
.cl-bcard__title,
.blog-card__title,
.card__title,
.single-post__title,
.widget-title,
.space-lightbox__title {
  font-family: var(--type-card-font);
  font-weight: var(--type-card-weight);
  font-style: var(--type-card-style);
  text-transform: var(--type-card-transform);
  letter-spacing: var(--type-card-tracking);
  line-height: var(--type-card-leading);
}

/* Unified Food & Drink Card Typography + Consistent Alignment */
.dish-card__body {
  text-align: left;
}

.dish-card__title {
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  color: var(--type-card-color);
  text-align: left;
  margin-bottom: 6px;
}

.dish-card__title:last-child {
  margin-bottom: 0;
  text-align: left;
}

.dish-card__price {
  font-family: var(--type-ui-font);
  font-variant-numeric: tabular-nums;
}

.cl-dish-single__title {
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  color: var(--type-card-color);
}

.cl-service-card__title {
  font-size: clamp(1.18rem, 1.55vw, 1.35rem);
  color: var(--type-card-color);
}

.space-card__title {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  color: var(--cl-gold-dark);
}

.cl-bcard--featured .cl-bcard__title {
  font-weight: 500;
}

.cl-bcard--grid .cl-bcard__title {
  font-weight: 500;
}

/* Role 4 — Editorial Lead / Section Intros */
.section__intro,
.cl-highlights__intro,
.space-cinema__intro-sub,
.cl-services-parallax__intro,
.cl-blog-hero__sub,
.gallery-hero__sub,
.cl-events-hero__sub,
.cl-events-head__intro,
.cl-pillars-head__sub,
.cl-evsingle-hero__tagline,
.booking-info__text {
  font-family: var(--type-lead-font);
  font-weight: var(--type-lead-weight);
  line-height: var(--type-lead-leading);
}

/* Role 6 — Navigation & Core UI Chrome */
.header-nav__link,
.header-nav__list--wp > li > a {
  font-family: var(--type-ui-font);
  font-weight: var(--type-ui-weight);
  letter-spacing: var(--type-ui-tracking);
}

.footer-col__title,
.footer-btn,
.btn,
.header-cta,
.menu-tab,
.cl-gallery-tab,
.cl-events-filter {
  font-family: var(--type-ui-font);
}

/* Role 7 — Self-Hosted Hospitality & Restaurant Icon Font (`Phosphor-Light`) */
.cl-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15em;
  line-height: 1;
  flex-shrink: 0;
  vertical-align: middle;
}

.btn,
.header-cta,
.footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.header-cta .cl-ico,
.btn .cl-ico,
.footer-btn .cl-ico {
  font-size: 1.18em;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-col__title .cl-ico {
  color: var(--cl-gold-light);
  font-size: 1.15em;
}

.footer-socials a i.ph-light {
  font-size: 18px;
  line-height: 1;
}

.menu-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-tab .cl-ico {
  font-size: 1.18em;
}

.cl-contact-list__label,
.menu-overlay__info-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cl-contact-list__label .cl-ico,
.menu-overlay__info-label .cl-ico {
  color: var(--cl-gold-dark);
  font-size: 1.22em;
}

.menu-overlay__info-label .cl-ico {
  color: var(--cl-gold-light);
}

.checklist__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--cl-forest);
  line-height: 1;
  flex-shrink: 0;
}

.scroll-top i.ph-light {
  font-size: 18px;
  line-height: 1;
}

.space-cinema__arrow i.ph-light,
.cl-highlights__arrow i.ph-light,
.cl-services-arrow i.ph-light {
  font-size: 19px;
  line-height: 1;
}

.video-hero__mute i.ph-light {
  font-size: 22px;
  line-height: 1;
}

.header-nav__caret.ph-light {
  width: auto;
  height: auto;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.cl-blog-search__icon.ph-light {
  font-size: 18px;
  line-height: 1;
}

.cl-bcard__icon.ph-light,
.cl-bcard__arrow.ph-light {
  font-size: 16px;
  line-height: 1;
}

.cl-blog-crumb-sep.ph-light {
  font-size: 13px;
  line-height: 1;
}

.cl-evsingle-card__tel {
  gap: 8px;
}

.cl-event-card__venue-line .cl-ico {
  color: var(--cl-gold-dark);
  font-size: 15px;
}

.cl-event-card__album-pill .cl-ico,
.cl-evsingle-mosaic__pill .cl-ico {
  font-size: 15px;
}

.cl-evlookbook__arrow i.ph-light {
  font-size: 16px;
  line-height: 1;
}

/* ==========================================================================
   TABLET & IPAD DESIGN TOKENS (768px – 1180px) — 84px Header Sync
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1180px) {
  :root {
    --header-height: 84px;
    --container-padding: 24px;
    --type-body-size: 15px;
    --type-body-leading: 1.62;
  }
}

/* ==========================================================================
   MOBILE DESIGN TOKENS (<= 767.98px) — Exact 76px Header Sync & Compact Rhythm
   ========================================================================== */
@media (max-width: 767.98px) {
  :root {
    --header-height: 76px;
    --container-padding: 16px;
    --type-body-size: 14.5px;
    --type-body-leading: 1.58;
  }

  .dish-card__title {
    font-size: 0.92rem;
    line-height: 1.32;
  }

  .cl-service-card__title {
    font-size: 1.08rem;
  }

  .space-card__title {
    font-size: 1.08rem;
  }
}
