/* ==========================================================================
   The link page.

   The page every social profile links to (src/link/). One stylesheet, linked
   from that page and nothing else, and nothing else linked from it: it does
   not load core.css, so no change to the marketing
   site's styles can move this page, and nothing here can move the site.

   The design language is CAA Console's, carried over rather than reinvented:

   · The palette is core.css's dark roles, under CAA Console's names for them —
     dark only, like every surface but the Console (docs/DESIGN-SYSTEM.md § 4).
     tools/a11y.test.mjs checks every value below against core.css, so the two
     cannot drift, and checks every text colour here against WCAG AA.
   · Montserrat for text and Archivo, bold, for the one title: the website's
     Phase 1 type, from the same files on this origin (see site.css, Type).
   · One border, the website's radius family (core.css: 8px small, 12px
     medium, a pill for buttons), and a shadow only on the one thing that
     floats over the page.
   · The website's primary call to action: the light, pill-shaped, tracked
     capitals button the masthead's "Get a quote" and the closing bands use
     (site.css, .btn--primary). On this page it is the quote link, because the
     quote is the lead path; WhatsApp is the second action.
   · The website's headings: Archivo bold, core.css's fluid --fs-h1, its tight
     tracking, and its section-head eyebrow — a short red rule, then the label
     in small tracked capitals.
   · Motion is feedback: colour, background and opacity, 120 ms. Nothing
     animates in, lifts or slides.
   · WhatsApp keeps its own green, as it does on CAA Console's buttons: it says
     which app is about to open.

   The layout is quiet on purpose — a single column, generous space, few
   borders — so the quote button leads and the green WhatsApp button is the
   only other thing competing for the eye.
   ========================================================================== */

/* --- Type -------------------------------------------------------------------
   The website's faces (site.css), from the same files. Latin-ext downloads only
   for a page that uses a character in its range; this one does not.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-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: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-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: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/archivo-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: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/archivo-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: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-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: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-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;
}

/* --- Theme tokens -----------------------------------------------------------
   CAA Console's dark theme (console.css, "Theme tokens"): core.css's roles,
   copied, and console.css's names pointed at them. Only the ones this page
   uses; the names are console.css's so it is obvious where each came from.

   Two are not in console.css, and are derived rather than invented:
   --whatsapp is core.css's brand green, and --on-whatsapp is the ink
   console.css's .btn--whatsapp sets on it.
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;

  /* core.css's roles this page draws with, value for value. The page does
     not load core.css (see the top of this file), so it carries the copy;
     tools/a11y.test.mjs fails the build if one drifts from core.css. */
  --bg-0: #0d0d0c;
  --bg-1: #1a1a19;
  --bg-2: #262523;
  --bg-selected: #3a3936;
  --border: #302f2c;
  --ink: #f2f0ec;
  --ink-2: #b6b3ac;
  --ink-3: #9d9a92;
  --focus: #7aa2f7;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow-pop: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.55);
  --whatsapp: #25d366;
  /* The CAA red, a fill only (2.75:1 on the ground, so never text): the short
     rule before an eyebrow, as on the website. */
  --accent: #b11217;
  /* The ink on a light fill, which is what the website's primary button is. */
  --ink-inverse: #0d0d0c;

  /* CAA Console's names for them, as console.css points them. */
  --console-bg: var(--bg-0);
  --console-surface: var(--bg-1);
  --console-subtle: var(--bg-2);
  --console-selected: var(--bg-selected);
  --console-border: var(--border);
  --console-ink: var(--ink);
  --console-ink-2: var(--ink-2);
  --console-ink-3: var(--ink-3);
  --console-focus: var(--focus);
  --console-scrim: var(--scrim);
  --console-shadow-pop: var(--shadow-pop);
  /* The logo is white artwork made for a dark ground. */
  --console-logo-filter: none;
  /* Graphite, as on the website and CAA Console: the primary button is the
     page's ink, with the page's ground as its label. */
  --console-primary: var(--ink);
  --console-primary-hover: #ffffff;
  --console-on-primary: var(--ink-inverse);

  /* The ink console.css's .btn--whatsapp sets on the green. */
  --on-whatsapp: #0b2e17;

  --console-font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --console-font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --console-font-accent: "Instrument Serif", Georgia, "Times New Roman", serif;
  /* Headings are bold, as Akzidenz-Grotesk is in the designer's pairing. */
  --console-fw-display: 700;

  /* core.css's radius family and spacing scale, value for value. */
  --r-sm: 8px;
  --r-md: 12px;
  --r-pill: 999px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --t-fast: 0.12s;

  /* core.css's fluid heading, its type tokens and its tracking. */
  --fs-h1: clamp(36px, 9vw, 72px);
  --fs-eyebrow: 11px;
  --tracking-tight: -0.02em;
  --tracking-wide: 0.12em;

  --float: 56px;
  --gutter: 16px;
}

/* --- Ground ------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--console-bg);
  color: var(--console-ink);
  font-family: var(--console-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

/* One focus ring, for everything that takes focus, in CAA Console's focus blue. */
a:focus-visible {
  outline: 2px solid var(--console-focus);
  outline-offset: 2px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* One column, the width of a phone at most, centred on anything wider. The
   side padding never drops under the gutter and grows to clear a notch in
   landscape. */
.page,
.foot {
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.page {
  padding-top: calc(56px + env(safe-area-inset-top));
}

/* --- Header -------------------------------------------------------------- */

.head {
  margin-bottom: var(--sp-6);
}

.head__logo {
  display: block;
  width: auto;
  height: 28px;
  filter: var(--console-logo-filter);
}

.head__name {
  margin: 28px 0 0;
  font-family: var(--console-font-display);
  /* The website's h1 scale. The column is 480px wide, so the size is held to 48px rather than the
     72px the site reaches on a wide screen. */
  font-size: min(var(--fs-h1), 48px);
  font-weight: var(--console-fw-display);
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

.head__tagline {
  margin: 10px 0 0;
  max-width: 36ch;
  color: var(--console-ink-2);
  font-size: 15px;
  line-height: 1.55;
}

/* --- The two actions ------------------------------------------------------
   The quote is the page's primary action, so it is the website's primary
   button — light fill, dark label, pill, tracked capitals — at its large size,
   with a one-line subline under the label. WhatsApp is the second action: the
   same shape and height, on its own green, as on the website. */
.quote,
.book {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 var(--sp-6);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.quote {
  flex-direction: column;
  gap: 2px;
  min-height: 64px;
  background: var(--console-primary);
  border-color: var(--console-primary);
  color: var(--console-on-primary);
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}

/* The subline is sentence case and ordinary weight: it explains the button, it
   is not part of its name. --ink-inverse on --ink is 17.08:1. */
.quote__note {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.book {
  background: var(--whatsapp);
  color: var(--on-whatsapp);
  transition: opacity var(--t-fast) ease;
}

.book__icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.quote + .book {
  margin-top: var(--sp-3);
}

/* --- Rows: the grouped list the links sit in ---------------------------- */

.list,
.tiles {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One surface, one border, hairlines between rows — a single object rather
   than a stack of cards. */
.list,
.tiles {
  overflow: hidden;
  border: 1px solid var(--console-border);
  border-radius: var(--r-md);
  background: var(--console-surface);
}

.list > li + li,
.tiles > li + li {
  border-top: 1px solid var(--console-border);
}

.book + .list {
  margin-top: var(--sp-3);
}

.row,
.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 16px;
  font-weight: 550;
  transition: background-color var(--t-fast) ease;
}

/* Inside a clipped list, a ring outside the row would be cut off, so the
   rows draw theirs inside. */
.row:focus-visible,
.tile:focus-visible {
  outline-offset: -2px;
  border-radius: var(--r-md);
}

.row__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.row__label {
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.row__note {
  color: var(--console-ink-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.row__icon,
.tile__icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.row__arrow {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--console-ink-3);
}

.tile {
  min-height: 56px;
}

.tile__label {
  flex: 1;
}

/* --- Sections ------------------------------------------------------------ */

.section {
  margin-top: var(--sp-7);
}

/* The website's eyebrow (site.css): a short red rule, then the label in small
   tracked capitals. The rule is decoration; the label is the heading. */
.section__title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
  color: var(--console-ink-2);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  line-height: 1.5;
  text-transform: uppercase;
}

.section__title::before {
  content: "";
  flex: none;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.section__note {
  margin: calc(var(--sp-2) * -1) 0 var(--sp-3);
  color: var(--console-ink-2);
  font-size: 14px;
  line-height: 1.5;
}

/* Directions: stacked as rows on a phone; three across once there is room
   for three labels side by side, each its own tile with the mark above the
   name. */
@media (min-width: 480px) {
  .tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .tiles > li + li {
    border-top: 0;
  }

  .tile {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 88px;
    padding: 12px 8px;
    border: 1px solid var(--console-border);
    border-radius: var(--r-md);
    background: var(--console-surface);
    text-align: center;
  }

  .tile:focus-visible {
    outline-offset: 2px;
  }

  .tile__label {
    flex: none;
  }

  /* Three tiles side by side are plainly three destinations; the arrow a row
     carries to say "this leaves the page" would only crowd them. */
  .tile .row__arrow {
    display: none;
  }
}

/* --- Hover and press ------------------------------------------------------
   Hover only where there is a pointer that hovers, so a tap on a phone does
   not leave a row lit. Press answers everywhere. */
@media (hover: hover) {
  .row:hover,
  .tile:hover {
    background: var(--console-subtle);
  }

  .quote:hover {
    background: var(--console-primary-hover);
    border-color: var(--console-primary-hover);
  }

  .book:hover,
  .float:hover {
    opacity: 0.92;
  }
}

.row:active,
.tile:active {
  background: var(--console-selected);
}

.quote:active {
  background: var(--console-ink-2);
  border-color: var(--console-ink-2);
}

.book:active,
.float:active {
  opacity: 0.84;
}

/* --- Footer -------------------------------------------------------------- */

/* The bottom padding is the floating button's height and its margin, plus the
   home indicator, so the last line scrolls clear of the button rather than
   under it. */
.foot {
  margin-top: 48px;
  padding-bottom: calc(var(--float) + 40px + env(safe-area-inset-bottom));
  color: var(--console-ink-3);
  font-size: 13px;
}

.foot p {
  margin: 0;
}

/* --- The floating WhatsApp button -----------------------------------------
   Fixed to the corner, clear of the home indicator and of a notch in
   landscape. The only element on the page with a shadow, because it is the
   only one above the page. */
.float {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  z-index: 10;
  display: grid;
  place-items: center;
  width: var(--float);
  height: var(--float);
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--on-whatsapp);
  box-shadow: var(--console-shadow-pop);
  transition: opacity var(--t-fast) ease;
}

.float:focus-visible {
  outline-offset: 3px;
}

.float__icon {
  width: 28px;
  height: 28px;
}
