/* =============================================================================
   Tours Booking — Base
   Fonts, reset, element defaults, typography roles, layout primitives.
   Loads after tokens.css.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   FONTS

   Fraunces  — variable, axes: opsz 9–144, wght 100–900.
               SOFT and WONK are pinned to 0 for a clean editorial cut.
   Alan Sans — variable, axis: wght 300–900.
   Tropical Magic — static display face.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Alan Sans";
  src: url("../fonts/alan-sans-var.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tropical Magic";
  src: url("../fonts/tropical-magic.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}


/* -----------------------------------------------------------------------------
   RESET
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-8);
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background-color: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img { height: auto; }

input,
button,
textarea,
select { font: inherit; color: inherit; }

p,
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

ul[class],
ol[class] { list-style: none; padding: 0; }

:target { scroll-margin-top: var(--space-8); }


/* -----------------------------------------------------------------------------
   FOCUS
   Keyboard-visible only. The ring flips colour with the section theme.
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--tb-ble-aswar);
  color: var(--tb-blan-lekim-vag);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus-visible { transform: translateY(0); }


/* -----------------------------------------------------------------------------
   TYPOGRAPHY ROLES

   Fraunces  → display, editorial titles, quotes
   Alan Sans → everything functional
   Tropical Magic → rare accent, never beside Fraunces in one headline
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  font-variation-settings: "opsz" var(--opsz-heading);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "opsz" var(--opsz-display);
}

h2 {
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

/* Small functional headings belong to Alan Sans, per the guide */
h5, h6 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
}

p { text-wrap: pretty; }

a {
  color: var(--text-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover { color: var(--text-link-hover); }

strong, b { font-weight: var(--weight-semibold); }

::selection {
  background: var(--tb-lagon-moris);
  color: var(--tb-nwar-volkan);
}


/* --- Type utility classes ------------------------------------------------- */

/* Hero — the largest expressive statement on a page. One per page. */
.t-display {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--weight-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "opsz" var(--opsz-display);
  text-wrap: balance;
}

.t-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-display);
  line-height: 1.12;
  letter-spacing: var(--tracking-tight);
  font-variation-settings: "opsz" var(--opsz-heading);
  text-wrap: balance;
}

.t-subtitle {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-display);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  font-variation-settings: "opsz" var(--opsz-heading);
}

/* Quotes and expressive statements — Fraunces italic.

   The guide has no italic specimen, so this is a system decision: it stays in
   the 9pt optical family so it belongs with the headings, but sits at SemiBold
   rather than Black so a quote reads as a second voice, not another headline. */
.t-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-normal);
  font-variation-settings: "opsz" var(--opsz-heading);
}

/* Rare campaign accent. Never in the same headline as Fraunces. */
.t-accent {
  font-family: var(--font-accent);
  font-size: var(--text-3xl);
  font-weight: var(--weight-regular);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-normal);
}

/* Introductory line under a heading */
.t-lead {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-light);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
}

.t-body    { font-size: var(--text-base); line-height: var(--leading-relaxed); }
.t-body-sm { font-size: var(--text-sm);   line-height: var(--leading-relaxed); }

/* Uppercase label / eyebrow */
.t-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

.t-caption {
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

/* --- Colour utilities ----------------------------------------------------- */

.t-muted     { color: var(--text-muted); }
.t-secondary { color: var(--text-secondary); }
.t-accent-c  { color: var(--accent-secondary); }

/* Measure caps — body copy should not run past ~70 characters */
.measure        { max-width: 62ch; }
.measure-narrow { max-width: 46ch; }
.measure-wide   { max-width: 78ch; }


/* -----------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: var(--section-y);
  background-color: var(--surface-page);
  color: var(--text-primary);
}

.section--lg { padding-block: var(--section-y-lg); }
.section--flush-top { padding-block-start: 0; }

/* Section intro block — label, title, lead */
.section-head {
  max-width: 56ch;
  margin-block-end: var(--space-8);
}

.section-head > * + * { margin-block-start: var(--space-4); }

.section-head .t-label { color: var(--text-eyebrow); }

/* Stack — vertical rhythm without margin collapse guesswork */
.stack > * + * { margin-block-start: var(--space-4); }
.stack-sm > * + * { margin-block-start: var(--space-2); }
.stack-lg > * + * { margin-block-start: var(--space-6); }

.grid { display: grid; gap: var(--space-5); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

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


/* -----------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
