/* ==========================================================================
   GRANDTOUR (PVT) LTD — MAIN
   Tokens · reset · fonts · typography · layout · utilities
   Palette and voice inherited from grandtour-homepage-preview.html.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONTS — self-hosted, variable, latin + latin-ext
   The `opsz` axis is deliberately omitted: requesting it ships the full
   variable font (67KB) instead of the pinned instance (37KB).
   Cyrillic is not covered by either family and falls back to the system
   sans — relevant only for one reviewer name.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/worksans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/worksans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Brand — unchanged from the reference design */
  --ocean: #0e3b36;
  --ocean-dark: #091f1c;
  --ocean-deep: #061614;          /* footer, deepest band */
  --cinnamon: #c2562d;
  --cinnamon-dark: #9c4220;
  --cinnamon-deep: #7f350f;       /* hover for the cinnamon fill */
  --gold: #e0a94c;
  --gold-dark: #c88f33;           /* gold button hover ONLY — 2.6:1 on cream, never text */
  --sand: #f3e9d7;
  --sand-dark: #e2d1ac;
  --ink: #16231f;
  --cream: #fbf6ec;
  --leaf: #516b53;

  /* Text — all verified against WCAG AA at body size */
  --ink-soft: #3c4c46;            /* 8.4:1 on cream — leads, long copy   */
  --ink-muted: #5f6d66;           /* 5.0:1 on cream, 4.5:1 on sand — meta */
  --on-dark: #e7efe9;             /* body text on ocean-dark              */
  --on-dark-soft: #cfe0d9;        /* leads on ocean-dark                  */
  --on-dark-muted: #a9c0b7;       /* 8.9:1 on ocean-dark — meta           */

  /* Hairlines and fills */
  --line: rgba(22, 35, 31, 0.10);
  --line-strong: rgba(22, 35, 31, 0.18);

  /* WCAG 2.2 SC 1.4.11 asks for 3:1 on the boundary of any control a user
     has to find — an input, a chip, an outlined button. The decorative
     hairlines above are 1.4:1, which is right for a divider and wrong for
     a field edge, so interactive borders get their own colour.
       --field-line       3.76:1 on white, 3.49 on cream, 3.13 on sand
       --field-line-light 4.31:1 on ocean-dark, 3.11 on ocean            */
  --field-line: #788781;
  --field-line-light: rgba(251, 246, 236, 0.46);
  --line-light: rgba(251, 246, 236, 0.16);
  --line-light-strong: rgba(251, 246, 236, 0.30);
  --surface: #ffffff;
  --surface-tint: rgba(251, 246, 236, 0.06);

  /* Type */
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.06rem);
  --step-1: clamp(1.13rem, 1.07rem + 0.28vw, 1.25rem);
  --step-2: clamp(1.32rem, 1.22rem + 0.48vw, 1.56rem);
  --step-3: clamp(1.55rem, 1.38rem + 0.83vw, 1.95rem);
  --step-4: clamp(1.85rem, 1.55rem + 1.45vw, 2.6rem);
  --step-5: clamp(2.2rem, 1.7rem + 2.4vw, 3.4rem);
  --step-6: clamp(2.6rem, 1.8rem + 3.9vw, 4.2rem);

  --lh-tight: 1.1;
  --lh-snug: 1.28;
  --lh-body: 1.68;
  --ls-tight: -0.015em;
  --ls-eyebrow: 0.09em;

  /* Spacing — 8px scale. Replaces the reference file's ad-hoc 22/26/34px. */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.5rem;
  --sp-8: 3rem;
  --sp-9: 4rem;
  --sp-10: 5rem;
  --sp-section: clamp(4rem, 8vw, 8rem);

  /* Shape — tightened from the reference 26/16/10 */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 100px;

  /* Elevation — one level, plus hairlines. No coloured glows. */
  --shadow: 0 16px 40px -24px rgba(9, 31, 28, 0.42);
  --shadow-raised: 0 26px 56px -28px rgba(9, 31, 28, 0.5);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.22s;
  --t-base: 0.35s;
  --t-slow: 0.7s;

  /* Layout */
  --container: 1240px;
  --container-narrow: 820px;
  --container-wide: 1400px;
  --gutter: clamp(1.125rem, 4vw, 1.75rem);
  --header-h: 76px;
  /* Pages with a sticky section nav raise this so anchor jumps clear both bars */
  --subnav-h: 0px;
}

/* --------------------------------------------------------------------------
   3. RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--subnav-h) + var(--sp-4));
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
:target { scroll-margin-top: calc(var(--header-h) + var(--subnav-h) + var(--sp-4)); }

/* Focus — one visible treatment everywhere.

   A single gold ring looks right on the dark bands (8.1:1 on ocean-dark) and
   all but vanishes on cream (1.96:1), which fails WCAG 2.2 SC 2.4.11. So the
   ring is two-tone: a dark edge against the border box, a gold edge outside
   it. Whichever surface the control happens to sit on, one of the two clears
   3:1 — ocean-dark on cream is 15.9:1, gold on ocean-dark is 8.1:1.

   The box-shadow spreads 3px from the border box, which is exactly the gap
   outline-offset opens, so the two rings meet with no seam. Both follow the
   element's own border-radius, so a pill button gets a pill-shaped ring. */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--ocean-dark);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--gold); color: var(--ocean-dark); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.h-display,
.h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--ocean-dark);
  text-wrap: balance;
}

.h-display { font-size: var(--step-6); }
.h1 { font-size: var(--step-5); }
.h2 { font-size: var(--step-4); }
.h3 { font-size: var(--step-2); line-height: var(--lh-snug); letter-spacing: -0.005em; }
.h4 { font-size: var(--step-1); line-height: var(--lh-snug); letter-spacing: 0; font-weight: 600; }

/* The signature: second line of a display heading, gold italic */
.h-accent {
  color: var(--gold);
  font-style: italic;
  font-weight: 500;
}
.on-dark .h-accent,
.h-display .h-accent { color: var(--gold); }

.lead {
  font-size: var(--step-1);
  line-height: var(--lh-body);
  color: var(--ink-soft);
  max-width: 58ch;
  text-wrap: pretty;
}
.prose p { color: var(--ink-soft); margin-bottom: var(--sp-5); max-width: 68ch; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.meta { font-size: var(--step--1); color: var(--ink-muted); }

/* Eyebrow — the small caps line above a section heading */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--cinnamon-dark);
  margin-bottom: var(--sp-4);
}

/* Dark-band variants */
.on-dark { color: var(--on-dark); }
.on-dark .h1,
.on-dark .h2,
.on-dark .h3,
.on-dark .h4,
.on-dark .h-display { color: var(--cream); }
.on-dark .lead,
.on-dark .prose p { color: var(--on-dark-soft); }
.on-dark .meta { color: var(--on-dark-muted); }
.on-dark .eyebrow { color: var(--gold); }

/* --------------------------------------------------------------------------
   5. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }

.section { padding-block: var(--sp-section); }
.section--sand { background: var(--sand); }
.section--ocean { background: var(--ocean-dark); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

/* Hairline divider between same-coloured sections */
.section + .section:not(.section--sand):not(.section--ocean) { border-top: 1px solid var(--line); }

.section__head { max-width: 46rem; margin-bottom: var(--sp-8); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head .h2 { margin-bottom: var(--sp-4); }

/* Flow utility. Headings carry no default margin, so vertical rhythm is set by
   the container; --flow-space can be overridden on any child for exceptions. */
.stack > * + * { margin-top: var(--flow-space, var(--sp-4)); }
.stack--lg { --flow-space: var(--sp-6); }
.stack > .h1 + *,
.stack > .h2 + *,
.stack > .h-display + * { --flow-space: var(--sp-5); }
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}
.cluster--center { justify-content: center; }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --------------------------------------------------------------------------
   6. UTILITIES
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--gold);
  color: var(--ocean-dark);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.rule {
  width: 52px;
  height: 2px;
  border: 0;
  margin: 0;
  background: var(--gold);
}

.text-center { text-align: center; }
.no-wrap { white-space: nowrap; }

/* Scroll reveal — JS adds .is-visible.
   Hiding content by default is how a page ends up blank when JavaScript fails,
   so the hidden state is applied ONLY inside @media (scripting: enabled).
   A browser with JS off, or one too old to understand the query, skips the
   whole block and renders everything visible. main.js also carries a timeout
   failsafe for the case where JS loads but the observer never fires. */
@media (scripting: enabled) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  }
  [data-reveal].is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* Media frames.
   Every photograph ships as <picture><source avif><img webp></picture>, so the
   <picture> element sits between the frame and the <img> and would otherwise
   swallow height rules. display:contents removes it from layout entirely. */
picture { display: contents; }

.frame { overflow: hidden; border-radius: var(--radius-md); background: var(--sand); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
