/* Spyrian site styles.
   Tokens come from the Spyrian design system (light "Snowfield", dark "Polar night");
   components are adapted from its bundle.css. Colours live only in the two :root blocks. */

@font-face {
  font-family: "Overpass";
  src: url("fonts/Overpass-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Overpass Mono";
  src: url("fonts/OverpassMono-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-raised: #ffffff;
  --frost: #f3f7fb;
  --contour: #d9e3ee;
  --ink: #001737;
  --ink-muted: #486581;
  --deep-ice: #001737;
  --on-deep-ice: #ffffff;
  --slate: #486581;
  --gold: #ffc107;
  --on-gold: #001737;
  --gold-text: #8a5d00;
  --focus-ring: #001737;
  /* The opening is a navy band in both themes, like the social banners */
  --hero: #001737;
  --on-hero: #ffffff;
  --on-hero-muted: #c3d6ea;
  --hero-gold-text: #ffc107;
  --hero-slate: #8fa9c4;
  --font-sans: "Overpass", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Overpass Mono", ui-monospace, "Cascadia Mono", monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --radius-sm: 3px;
  --radius-md: 8px;
  --radius-pill: 999px;
  --page-max: 1080px;
  --header-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #00122b;
    --paper-raised: #001737;
    --frost: #0a2448;
    --contour: #1f3d63;
    --ink: #f3f7fb;
    --ink-muted: #a9c1da;
    --deep-ice: #a3cbf0;
    --on-deep-ice: #001737;
    --slate: #5f7d9c;
    --gold-text: #ffc107;
    --focus-ring: #ffc107;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/26px var(--font-sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
p, h1, h2, h3, ul, ol { margin: 0; }

.skip-link {
  position: absolute; top: -100px; left: var(--space-3); z-index: 20;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  background: var(--deep-ice); color: var(--on-deep-ice); text-decoration: none;
}
.skip-link:focus { top: var(--space-2); }

.wrap { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--space-3); }
@media (min-width: 720px) { .wrap { padding-inline: var(--space-4); } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--contour); }
.site-header .wrap { display: flex; align-items: center; gap: var(--space-4); min-height: var(--header-h); padding-block: var(--space-2); }
.brand { margin-right: auto; border-radius: var(--radius-sm); }
.brand img { width: auto; height: 56px; }
.site-nav { display: flex; gap: var(--space-4); }
.site-nav a { color: var(--ink-muted); font-size: 15px; line-height: 20px; text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 719px) {
  .site-nav { display: none; }
  .site-header .sp-btn { padding: 9px var(--space-3) 7px; font-size: 14px; }
}
main, section { scroll-margin-top: calc(var(--header-h) + 1px); }

/* Sections and type */
.section { padding-block: var(--space-6); }
.section--frost { background: var(--frost); --trail-bg: var(--frost); }
.eyebrow {
  display: flex; align-items: flex-start; gap: var(--space-2);
  color: var(--gold-text); font: 700 12px/16px var(--font-sans); letter-spacing: 0.12em; text-transform: uppercase;
}
.eyebrow::before {
  content: ""; flex: none; width: 12px; height: 12px; margin-top: 2px; background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
h2 { font: 600 clamp(28px, 4vw, 36px)/1.22 var(--font-sans); letter-spacing: -0.01em; text-wrap: balance; }
h3 { font: 700 18px/26px var(--font-sans); }
.lead { max-width: 62ch; color: var(--ink-muted); font-size: 18px; line-height: 30px; }
.coord { color: var(--ink-muted); font: 500 13px/20px var(--font-mono); letter-spacing: 0.02em; }
.sp-signpost { display: grid; gap: var(--space-3); max-width: 68ch; margin-bottom: var(--space-5); }

/* Buttons */
.sp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px var(--space-4) 9px; border: 1.5px solid transparent; border-radius: var(--radius-md);
  font: 600 15px/20px var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.sp-btn:hover { text-decoration: underline; }
.sp-btn--primary { background: var(--deep-ice); color: var(--on-deep-ice); }
.sp-btn--beacon { background: var(--gold); color: var(--on-gold); }
.sp-btn--quiet { border-color: var(--slate); background: transparent; color: var(--ink); }
.sp-btn--quiet:hover { background: var(--frost); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Footer */
.site-footer { border-top: 1px solid var(--contour); color: var(--ink-muted); font-size: 14px; line-height: 22px; }
.site-footer .wrap { display: grid; gap: var(--space-3); padding-block: var(--space-5); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.footer-nav a { color: var(--ink-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }

/* Opening: a navy band with the cairn photo (soft colour) fading in from the right.
   Inside it the text tokens switch to their on-navy values. */
.hero {
  position: relative; overflow: hidden; display: grid;
  background: var(--hero); color: var(--on-hero);
  --ink: var(--on-hero); --ink-muted: var(--on-hero-muted); --gold-text: var(--hero-gold-text);
  --slate: var(--hero-slate); --focus-ring: var(--hero-gold-text);
}
.hero .wrap {
  position: relative; display: grid; justify-items: start; gap: var(--space-4); width: 100%;
  padding-block: var(--space-5) calc(var(--space-6) + var(--space-4));
}
.hero-photo { height: 260px; margin-bottom: calc(-1 * var(--space-5)); -webkit-mask-image: linear-gradient(180deg, black 45%, transparent); mask-image: linear-gradient(180deg, black 45%, transparent); }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% 78%; }
/* Capped at 900 px wide: on a wider window the band keeps its height, so a wider box would
   blow the 1100 px photo up and crop it to a thin strip */
@media (min-width: 880px) {
  .hero-photo {
    position: absolute; inset: 0 0 0 auto; width: min(62%, 900px); height: auto; margin: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, transparent 18%, black 62%);
    mask-image: linear-gradient(90deg, transparent, transparent 18%, black 62%);
  }
  .hero-photo img { object-position: 60% 94%; }
  .hero .wrap { padding-block: var(--space-6) calc(var(--space-6) + var(--space-5)); }
  .hero .lead { max-width: 50ch; }
}
.hero .sp-btn--quiet:hover { background: transparent; border-color: var(--on-hero); }
.display { max-width: 16ch; font: 300 clamp(40px, 6.5vw, 56px)/1.08 var(--font-sans); letter-spacing: -0.02em; text-wrap: balance; }
.hero .lead { font-size: 19px; line-height: 31px; }
.hero .actions { margin-top: var(--space-2); }

/* Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  display: grid; align-content: start; gap: var(--space-2); padding: var(--space-4);
  border: 1px solid var(--contour); border-radius: var(--radius-md); background: var(--paper-raised);
}
.card p { color: var(--ink-muted); }

/* Process */
.principles { margin-top: var(--space-6); }

/* Trail: a waypoint route (design system component), used for the engagement phases.
   Every marker is outlined on a dotted route; there is no current step, so no gold. */
.sp-trail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.sp-trail li { position: relative; display: grid; align-content: start; gap: 2px; padding: 32px var(--space-4) 0 0; color: var(--ink-muted); }
.sp-trail li::before { content: ""; position: absolute; top: 9px; right: 0; left: 0; border-top: 2px dotted var(--slate); }
.sp-trail li:last-child::before { display: none; }
.sp-trail .mark {
  position: absolute; top: 2px; left: 0; z-index: 1; width: 16px; height: 16px;
  border: 2px solid var(--slate); border-radius: var(--radius-pill); background: var(--trail-bg, var(--paper));
}
.sp-trail b { color: var(--ink); font: 700 16px/22px var(--font-sans); }
.sp-trail .detail { font-size: 15px; line-height: 24px; }

@media (max-width: 719px) {
  .sp-trail { grid-template-columns: 1fr; gap: var(--space-4); }
  .sp-trail li { padding: 0 0 0 36px; }
  .sp-trail li::before { top: 18px; right: auto; bottom: calc(-1 * var(--space-4)); left: 7px; border-top: 0; border-left: 2px dotted var(--slate); }
}

/* About, careers, contact */
.about-grid { display: grid; gap: var(--space-5); max-width: 68ch; }
.prose { display: grid; gap: var(--space-3); max-width: 65ch; }
.founder { gap: var(--space-3); }
.founder p { color: var(--ink); }
.founder .coord { margin-top: calc(-1 * var(--space-2)); color: var(--ink-muted); }
.checklist { display: grid; gap: var(--space-2); padding-left: 1.25em; }
.checklist li::marker { color: var(--slate); }
.contact-email { margin-bottom: var(--space-2); font: 600 clamp(22px, 3.2vw, 30px)/1.3 var(--font-sans); overflow-wrap: anywhere; }
.contact-email a { text-decoration-thickness: 1px; text-underline-offset: 6px; }
