/* ================================================================
   Design system (loaded last on every page). Tokens live in css/base.css.

   Palette: Paper #F4EFE7 (every light background, the footer too), Ink #1A1A1A, Grey #6B665C (small text on paper,
   4.98:1), Cream #F3F0E9 (all text on dark, 17.4:1 on Dark), Dark #0A0A0A (every dark section). Hairlines --hair on paper,
   --hair-dark on dark. No other colours and no semi-transparent text.

   Type: Cinzel for the CIEL PRIVÉ wordmark only. Newsreader: H1 40px/300, H2 26px/400, body 17px/1.7 (phones
   32 / 22 / 16), normal letter-spacing, no italics. Jost: labels, navigation and links 12px capitals at .16em,
   footer lists 15px, small print 13px. Nothing under 12px.

   Spacing: sections 120px top and bottom (72px on phones); inner-page reading columns at most 680px, centred on
   the page.

   Many pages carry their own older rules, several with !important, so the rules below are written to win:
   "html body" in front, and !important where an older rule has it.
================================================================ */

:root {
  --h1: 40px;
  --h2: 26px;
  --body: 17px;
  --label: 12px;
  --small: 13px;
  --list: 15px;
  --section: 120px;
  --column: 680px;
}
@media (max-width: 767px) { :root { --h1: 32px; --h2: 22px; --body: 16px; --section: 72px; } }

/* ── Ground: paper and ink; no italics anywhere ── */
html, html body { background: var(--paper) !important; color: var(--ink) !important; }
html body { font: 400 var(--body)/1.7 var(--font-serif); letter-spacing: normal; }
html body *, html body *::before, html body *::after { font-style: normal !important; }
html body :is(input, textarea, select, button) { font-family: inherit; }

/* ── Type scale ── */
/* H1: Newsreader 40/300 (the homepage's H1 is the wordmark, set below) */
html body :is(main h1, .notfound h1) {
  font: 300 var(--h1)/1.2 var(--font-serif) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--ink) !important;
}
/* H2 and the panel headings: Newsreader 26/400, as written (no capitals) */
html body :is(main h2, main h3, .who-headline, .line, .contact-title, .step h2) {
  font: 400 var(--h2)/1.3 var(--font-serif) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--ink) !important;
}
/* The homepage's panel headings ("Corporate Travel", "Bespoke Charters", "The network is quiet. The reach is not.")
   take the H1 size and weight, so the page keeps six sizes; their colour comes from the dark sections below */
html body :is(.ep .ep-title, .reach .reach-heading, .reach .reach-line) {
  font: 300 var(--h1)/1.2 var(--font-serif) !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
/* Reading text: Newsreader 17/1.7 */
html body :is(main p, main li, main dd, main dt, main blockquote, .ed-intro, .intro, .step p, .page-enquiry, .ed-enquiry,
  .who-body, .ep-copy, .reach-text, .enquire-error, .enquire-success, .ed-list-title, .ed-list-summary) {
  font-family: var(--font-serif) !important;
  font-size: var(--body) !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--ink) !important;
  opacity: 1 !important;
}
/* Labels, eyebrows, breadcrumbs, navigation and link rows: Jost 12px capitals at .16em, Grey on paper */
html body :is(.skip-link, .ed-crumbs, .ed-crumbs a, .ed-crumbs span, .ed-eyebrow, .ed-related, .ed-related a, .eyebrow, .step-num,
  .legal-header, .sidebar-link, .who-label, .contact-label, .contact-form label, .notfound a,
  .hero-tagline, .hero-scroll-text, .ep-label, .ep-link, .reach-label, .globe-live, .globe-live span, .globe-credit, .submit-btn) {
  font-family: var(--font-sans) !important;
  font-size: var(--label) !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--grey) !important;
  opacity: 1 !important;
}
html body .step .step-num { letter-spacing: 0.06em !important; }   /* numbers read better close-set */
/* Small print: Jost 13px, Grey */
html body :is(.legal-updated, .page-footer-note, .page-footer-note a, .contact-whatsapp-bottom, .contact-whatsapp-bottom a, .email-error) {
  font-family: var(--font-sans) !important;
  font-size: var(--small) !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  color: var(--grey) !important;
  opacity: 1 !important;
}
/* Links inside text stay the colour of their text, underlined */
html body main :is(p, li, dd) a { color: inherit !important; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
html body .sidebar-link.active { color: var(--ink) !important; }
html body .ed-crumbs [aria-current] { color: var(--grey) !important; }

/* ── Surfaces: paper sections, the footer and the skip link included ── */
html body :is(.legal-header, .legal-layout, .section-who, .contact, .editorial, .ed-page, .notfound, .site-footer, .skip-link) { background: var(--paper) !important; }
html body .skip-link { color: var(--ink) !important; }
/* base.css sets every label to 11px on phones; labels are 12px */
html body label { font-size: var(--label) !important; }

/* ── Surfaces: dark sections, and everything on them in Cream ── */
html body :is(.hero, .section-editorial, .ep--corporate, .reach) { background-color: var(--dark) !important; }
html body .hero::before { background: rgba(10, 10, 10, 0.45) !important; }
html body .hero-overlay { background: var(--dark) !important; }
html body .ep--corporate::before { background: linear-gradient(to left, rgba(10, 10, 10, 0.65) 30%, rgba(10, 10, 10, 0.1) 100%) !important; }
html body .ep--bespoke::before { background: linear-gradient(to right, rgba(10, 10, 10, 0.85) 40%, rgba(10, 10, 10, 0) 100%) !important; }
html body .reach-content { background: linear-gradient(to top, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.6) 55%, rgba(10, 10, 10, 0) 100%) !important; }
html body :is(.hero, .section-editorial, .reach) :is(h1, h2, h3, p, span:not(.hero-scroll-line):not(.globe-labels span), a, em, strong, text) { color: var(--cream) !important; opacity: 1 !important; }
/* the globe's city labels (phones): the label type in Cream; js/globe.js shows each one in full or hides it */
html body .globe-labels span {
  font: 400 var(--label)/1 var(--font-sans) !important;   /* the box hugs the capitals, so the shadow covers all of it */
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: var(--cream) !important;
  text-shadow: 0 0 1px rgb(10, 10, 10), 0 0 2px rgb(10, 10, 10), 0 0 3px rgb(10, 10, 10), 0 0 6px rgba(10, 10, 10, 0.95), 0 0 12px rgba(10, 10, 10, 0.8), 0 0 20px rgba(10, 10, 10, 0.55) !important;   /* a soft shadow, no box */
  transition: none !important;   /* shown or hidden at once: never half-transparent */
}

/* The homepage H1 is the wordmark: Cinzel at the H1 size, in Cream; the tagline under it is a label */
html body .hero-title { font-size: var(--h1) !important; line-height: 1.2 !important; }
html body .title-line { font-family: var(--font-wordmark) !important; font-size: var(--h1) !important; color: var(--cream) !important; }
html body .hero .hero-tagline { line-height: 1.9 !important; }

/* The map: lines, dots and city labels in Cream; labels Jost at 12px or more at every width (the map scales with
   the screen: its 1000-unit width is drawn at the section's width) */
html body .reach-map :is(g, path, circle) { stroke: var(--cream); }
html body .reach-map circle { fill: var(--cream); }
html body .reach-map g:has(> text) { opacity: 1 !important; }
html body .reach-map text { font-family: var(--font-sans) !important; fill: var(--cream) !important; stroke: none; letter-spacing: 0.16em; font-size: calc(var(--label) / var(--map-scale, 1.44)) !important; }

/* ── The enquiry form: same fields and behaviour, on the system's type and colours ── */
html body .contact-form label { position: static !important; display: block; margin-bottom: 8px; pointer-events: auto; transition: none !important; }
html body .form-field input, html body .form-field textarea {
  font: 400 var(--body)/1.6 var(--font-serif) !important;
  color: var(--ink) !important;
  border-bottom-color: var(--grey) !important;   /* the field's line at 3:1 or more, so it can be seen */
  padding-top: 8px !important;
}
html body .form-field input:focus, html body .form-field textarea:focus { border-bottom-color: var(--ink) !important; }
html body .form-field textarea::placeholder { color: var(--grey); opacity: 1; font: inherit; }
html body .contact-form .submit-btn { background: var(--ink) !important; color: var(--cream) !important; padding: 14px 40px !important; }
html body .contact-form .submit-btn:hover { background: var(--ink) !important; }
/* the email message is hidden by visibility, not transparency, and appears when js/form.js marks it */
html body .email-error { visibility: hidden; transition: none !important; }
html body .email-error.visible { visibility: visible; }

/* ── Spacing: sections 120px top and bottom (72px on phones), the first below the header ── */
html body .ed-page { padding-top: calc(var(--hdr-h) + var(--section)) !important; padding-bottom: var(--section) !important; }
html body main > .page { padding-top: calc(var(--hdr-h) + var(--section)) !important; padding-bottom: var(--section) !important; min-height: 0 !important; }
html body .legal-header { padding-top: calc(var(--hdr-h) + var(--section)) !important; }
html body .legal-layout { padding-bottom: var(--section) !important; }
html body .notfound { padding-top: calc(var(--hdr-h) + var(--section)) !important; padding-bottom: var(--section) !important; min-height: 0 !important; }
html body .section-who { padding-top: var(--section) !important; padding-bottom: var(--section) !important; }
html body .contact { padding-top: var(--section) !important; padding-bottom: var(--section) !important; }
html body .reach-content { padding-top: var(--section) !important; padding-bottom: var(--section) !important; }
html body .ep--bespoke .ep-content { padding-bottom: var(--section) !important; }

/* ── One grid: every inner page's reading column, at most 680px, centred on the page; labels, headings and body stay
   left-aligned inside it. Two-column step grids are centred as a block, at most 1000px. ── */
html body .ed-page { max-width: none !important; margin: 0 !important; padding-left: max(var(--gutter), (100% - var(--column)) / 2) !important; padding-right: max(var(--gutter), (100% - var(--column)) / 2) !important; }
html body .ed-page > * { max-width: var(--column) !important; }
html body main > .page { max-width: none !important; margin: 0 !important; padding-left: var(--gutter) !important; padding-right: var(--gutter) !important; }
html body main > .page > * { width: 100%; max-width: var(--column) !important; margin-left: auto !important; margin-right: auto !important; }
html body main > .page > .steps-grid { max-width: 1000px !important; }
/* The legal pages: the column centred on the page, its section list beside it on the left where there is room */
html body .legal-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--column)) minmax(0, 1fr) !important;
  column-gap: 48px;
  align-items: start !important;
  padding-left: var(--gutter) !important;
  padding-right: var(--gutter) !important;
}
html body .legal-sidebar { grid-column: 1; grid-row: 1; justify-self: end; width: min(240px, 100%) !important; padding-left: 0 !important; padding-right: 32px !important; border-color: var(--hair) !important; }
html body .legal-layout .page { grid-column: 2; grid-row: 1; max-width: var(--column) !important; padding-left: 0 !important; padding-right: 0 !important; }
/* below 1280px there is no room beside the column: the section list sits above it, as one scrolling row */
@media (max-width: 1279px) {
  html body .legal-layout { grid-template-columns: minmax(0, var(--column)) !important; justify-content: center; }
  html body .legal-sidebar { grid-column: 1; grid-row: 1; justify-self: stretch; width: 100% !important; position: static !important; padding: 16px 0 !important; border-right: 0 !important; border-bottom: 1px solid var(--hair) !important; overflow-x: auto !important; }
  html body .sidebar-nav { flex-direction: row !important; gap: 28px !important; white-space: nowrap !important; }
  html body .legal-layout .page { grid-column: 1; grid-row: 2; }
}

/* ── Phones: text over the Bespoke photograph and the globe ──
   The Bespoke panel's text spans the width on phones, over the bright horizon: an even Dark tint behind the text,
   fading lower down so the photograph still shows. The globe's labels and its time line are plain text with a soft
   shadow (no boxes). */
@media (max-width: 767px) {
  html body .ep--bespoke::before { background: linear-gradient(to bottom, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.88) 62%, rgba(10, 10, 10, 0.35) 100%) !important; }
  html body .ep-content { padding-top: var(--section) !important; padding-bottom: var(--section) !important; }
}
html body .globe-live span { text-shadow: 0 0 2px rgba(10, 10, 10, 0.95), 0 0 6px rgba(10, 10, 10, 0.9), 0 0 14px rgba(10, 10, 10, 0.75); }
html body .reach .globe-live { color: var(--cream) !important; }   /* the line itself, not only its words, in Cream */

/* ── Hairlines: one value on paper (rgba(26,26,26,.12)) for every separator the pages draw ── */
html body :is(.ed-section h2, .ed-list li, .policy-section h2, .legal-sidebar) { border-color: var(--hair) !important; }

/* ── Grain: one fine grain over every photograph, the same on every page (a 128px tile of noise, overlaid) ── */
html body :is(.ed-photo, .dest-cards figure) { position: relative; }
html body :is(.hero-photo, .dest-hero, .dest figure, .ep-photo)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url('../assets/grain.png') 0 0 / 128px 128px repeat; opacity: 0.07; mix-blend-mode: overlay;
}
