/* ==========================================================================
   Siccar — stylesheet
   Design direction: precision instrument. Petrol-ink base, single amber
   signal, grotesque + serif + mono. Signature element: "The Rule" — a
   hairline measurement ruler with amber tick marks between every section.
   ========================================================================== */

:root {
  /* ---- Palette ---------------------------------------------------------- */
  --color-foundry: #0F272E;      /* deep petrol-ink — dark sections, headings */
  --color-steel: #37505A;        /* muted blue-slate — panels, secondary */
  --color-bone: #E8EAE4;         /* cool off-white — page background */
  --color-zinc: #94A19C;         /* neutral grey-green — captions, ticks */
  --color-signal: #F2A20A;       /* amber — the one accent */
  --color-signal-hover: #d68f08;

  /* Derived working colors */
  --color-bg: var(--color-bone);
  --color-text: #14303A;         /* headings on light */
  --color-text-muted: #45595F;   /* body copy on light */
  --color-line: #C9D0CB;         /* hairlines on light */
  --color-line-dark: #2B454F;    /* hairlines on Foundry */
  --color-on-dark: #DDE3DE;      /* body text on Foundry */
  --color-error: #b23a2e;        /* form error border */
  --color-error-bg: #f7e7e4;     /* form error tint */
  --color-error-text: #7c2419;   /* form error text */
  --color-focus: #F2A20A;

  /* ---- Type ------------------------------------------------------------- */
  --font-display: "Archivo", system-ui, -apple-system, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --font-size-base: 1.0625rem;   /* 17px — serif body wants a touch more */
  --line-height-base: 1.65;

  /* ---- Spacing scale ---------------------------------------------------- */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* ---- Layout ----------------------------------------------------------- */
  --container-max: 1120px;
  --radius: 4px;                 /* tight, engineered — not pill-soft */
  --shadow: 0 1px 0 rgba(15, 39, 46, 0.06), 0 8px 28px rgba(15, 39, 46, 0.06);
  --transition: 200ms ease;
  --header-height: 108px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-muted);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }

p {
  margin: 0 0 var(--space-md);
  max-width: 62ch;
}

a { color: var(--color-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

/* --------------------------------------------------------------------------
   Accessibility helpers
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 1000;
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--color-signal);
  color: var(--color-foundry);
  border-radius: var(--radius);
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-md); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 1px;
}

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

/* --------------------------------------------------------------------------
   Layout utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.section { padding-block: var(--space-3xl); }
.section--tight { padding-block: var(--space-2xl); }

/* --------------------------------------------------------------------------
   Mono label / eyebrow — the "instrument readout" voice
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-steel);
  margin: 0 0 var(--space-lg);
}

.mono { font-family: var(--font-mono); }

.lead {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.5;
  color: var(--color-text);
  max-width: 54ch;
}

/* --------------------------------------------------------------------------
   THE RULE — signature measurement ruler
   Short zinc minor ticks every 20px, tall amber major ticks every 100px,
   both hanging from a top hairline. Reads like a caliper / drawing edge.
   -------------------------------------------------------------------------- */
.rule {
  height: 13px;
  border: 0;
  margin: 0;
  border-top: 1px solid var(--color-line);
  background-image:
    repeating-linear-gradient(90deg, var(--color-zinc) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(90deg, var(--color-signal) 0 1px, transparent 1px 100px);
  background-repeat: repeat-x, repeat-x;
  background-size: 20px 5px, 100px 12px;
  background-position: left top, left top;
}

.rule--on-dark {
  border-top-color: var(--color-line-dark);
  background-image:
    repeating-linear-gradient(90deg, var(--color-steel) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(90deg, var(--color-signal) 0 1px, transparent 1px 100px);
}

/* Hero ruler sweeps in once, left to right */
.rule--hero { animation: rule-sweep 500ms ease-out both; }

@keyframes rule-sweep {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

/* --------------------------------------------------------------------------
   Buttons — engineered, mono, with a signal arrow
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; }
.btn::after { content: "\25B8"; /* ▸ */ font-size: 0.9em; }

.btn--primary {
  background-color: var(--color-signal);
  color: var(--color-foundry);
}
.btn--primary:hover { background-color: var(--color-signal-hover); }

.btn--ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-line);
}
.btn--ghost:hover { border-color: var(--color-foundry); }

/* Ghost button on dark backgrounds */
.on-dark .btn--ghost {
  color: var(--color-on-dark);
  border-color: var(--color-line-dark);
}
.on-dark .btn--ghost:hover { border-color: var(--color-signal); color: #fff; }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bone);   /* opaque so the logo's white blends via multiply */
  transition: box-shadow var(--transition);
}
.site-header--scrolled { box-shadow: 0 1px 0 var(--color-line), var(--shadow); }

/* Wordmark — inline SVG; used in the footer, adapts via currentColor */
.wordmark-svg {
  display: block;
  height: 26px;
  width: auto;
}

/* Full-colour logo lockup — header, on the light Bone background.
   multiply blends the logo's white background into Bone so no white box shows. */
.wordmark-logo {
  display: block;
  height: 84px;
  width: auto;
  mix-blend-mode: multiply;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: var(--header-height);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
}
.wordmark:hover { text-decoration: none; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.primary-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  margin: 0; padding: 0;
}

.primary-nav__links a {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--color-steel);
  padding-block: var(--space-2xs);
}
.primary-nav__links a:hover { color: var(--color-foundry); text-decoration: none; }

.primary-nav__links a[aria-current="page"] {
  color: var(--color-foundry);
  border-bottom: 2px solid var(--color-signal);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 22px; height: 2px;
  margin-inline: auto;
  background-color: var(--color-foundry);
  transition: transform var(--transition), opacity var(--transition);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
/* Photographic hero — image + brand scrim, text over the quiet area */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(80vh, 760px);
  background-color: var(--color-foundry);
  overflow: hidden;
}
.hero > .container { width: 100%; }

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
/* Foundry scrim: heavy on the left (text sits there), lifting toward the right
   so the image reads. Keeps large + small text above WCAG AA on the text side. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg,
      rgba(15, 39, 46, 0.93) 0%,
      rgba(15, 39, 46, 0.86) 45%,
      rgba(15, 39, 46, 0.74) 75%,
      rgba(15, 39, 46, 0.64) 100%),
    linear-gradient(0deg,
      rgba(15, 39, 46, 0.5) 0%,
      rgba(15, 39, 46, 0) 55%);
}

.hero__content {
  max-width: none;
  padding-block: var(--space-2xl);
}
.hero__content .eyebrow {
  color: var(--color-bone);
  font-size: 1.5rem;
  letter-spacing: 0.16em;
}
.hero h1 {
  color: #fff;
  margin-bottom: var(--space-lg);
  font-size: clamp(2.75rem, 7vw, 5rem);
}
.hero .lead { color: var(--color-bone); max-width: none; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* Instrument panel — decorative status readout */
.panel {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #f2f4ef 100%);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
}
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-zinc);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-line);
}
.panel__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-steel);
  padding-block: var(--space-xs);
}
.panel__row .val { color: var(--color-foundry); }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-signal);
  margin-right: var(--space-xs);
  box-shadow: 0 0 0 3px rgba(242, 162, 10, 0.18);
}

/* --------------------------------------------------------------------------
   Proof strip
   -------------------------------------------------------------------------- */
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  padding-block: var(--space-xl);
  list-style: none;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--color-steel);
}
.proof li { display: flex; align-items: center; }

/* --------------------------------------------------------------------------
   Grids / cards
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--space-lg); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-line);
  border-top: 2px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover { border-top-color: var(--color-signal); }
a.card:hover { text-decoration: none; }

.card__img {
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--color-line);
}
.card__body { padding: var(--space-lg); }

.card h3 { margin: 0 0 var(--space-xs); }
.card p { margin-bottom: 0; }

/* Before / after shift */
.shift {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-lg);
  align-items: stretch;
}
.shift__col {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: var(--space-lg);
  background: #fff;
}
.shift__col--from { background: transparent; border-style: dashed; }
.shift__arrow {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--color-signal);
}
.shift__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-zinc);
  margin-bottom: var(--space-sm);
}

/* --------------------------------------------------------------------------
   Statement — large editorial intro paragraph
   -------------------------------------------------------------------------- */
.statement {
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.42;
  color: var(--color-text);
  max-width: none;
  margin: 0;
}

/* Text blocks that run the full container width (About: intro + note) */
.section--wide .lead,
.section--wide p,
.section--wide .note { max-width: none; }

/* --------------------------------------------------------------------------
   Founder's note — first-person story, amber left rule
   -------------------------------------------------------------------------- */
.note {
  border-left: 2px solid var(--color-signal);
  padding-left: var(--space-xl);
  max-width: 68ch;
}
.note p { font-size: 1.12rem; line-height: 1.6; color: var(--color-text-muted); }
.note p + p { margin-top: var(--space-md); }
.note__attr {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-steel);
  margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   Full-bleed media band — wide atmospheric image between sections
   -------------------------------------------------------------------------- */
.media-band { width: 100%; }
.media-band img {
  display: block;
  width: 100%;
  height: clamp(240px, 38vw, 460px);
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Leadership bios — square headshot beside the bio
   -------------------------------------------------------------------------- */
.bios { display: grid; gap: var(--space-2xl); }
.bio {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-xl);
  align-items: start;
}
.bio__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--color-line);
  border-top: 3px solid var(--color-signal);
  border-radius: var(--radius);
}
.bio__name { margin-bottom: var(--space-2xs); }
.bio__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-signal);
  margin-bottom: var(--space-md);
}
.bio__body p { max-width: 68ch; }

@media (max-width: 640px) {
  .bio { grid-template-columns: 1fr; gap: var(--space-lg); }
  .bio__photo { max-width: 200px; }
}

/* --------------------------------------------------------------------------
   Dark bands (CTA, footer) sit on Foundry
   -------------------------------------------------------------------------- */
.on-dark {
  background-color: var(--color-foundry);
  color: var(--color-on-dark);
}
.on-dark h1, .on-dark h2, .on-dark h3 { color: #fff; }
.on-dark p { color: var(--color-on-dark); }
.on-dark .eyebrow { color: var(--color-zinc); }

.cta-band { padding-block: var(--space-3xl); }
.cta-band .btn { margin-top: var(--space-lg); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-field { margin-bottom: var(--space-lg); }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-steel);
  margin-bottom: var(--space-xs);
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background-color: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--color-signal); }
.form-field textarea { min-height: 160px; resize: vertical; }

/* Submit states — shown in-page, no browser alert */
.form-status {
  margin: var(--space-md) 0 0;
  padding: var(--space-md);
  border: 1px solid var(--color-error);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--color-error-bg);
  color: var(--color-error-text);
  font-size: 0.95rem;
  line-height: 1.5;
}
.form-status a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.form-status[hidden] { display: none; }

.form-success {
  border: 1px solid var(--color-line);
  border-left: 3px solid var(--color-signal);
  border-radius: var(--radius);
  padding: var(--space-lg);
  background: rgba(242, 162, 10, 0.07);
}
.form-success[hidden] { display: none; }
.form-success h3 { margin-bottom: var(--space-xs); }
.form-success p { margin-bottom: 0; }

/* Contact detail rows */
.detail { margin-bottom: var(--space-lg); }
.detail__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-zinc);
  margin-bottom: var(--space-2xs);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-foundry);
  color: var(--color-on-dark);
  padding-block: var(--space-2xl);
}
.site-footer__inner {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1.5fr 1fr 1fr;
}
.site-footer .wordmark { color: #fff; margin-bottom: var(--space-md); }
.site-footer__tag { margin-bottom: var(--space-sm); max-width: 34ch; }
.site-footer .site-footer__badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-signal);
  margin: 0;
}
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-zinc);
  margin-bottom: var(--space-md);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--space-xs); }
.site-footer a { color: var(--color-on-dark); font-family: var(--font-mono); font-size: 0.85rem; }
.site-footer a:hover { color: var(--color-signal); }
.site-footer p { color: var(--color-zinc); }

.site-footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-line-dark);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-zinc);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .shift { grid-template-columns: 1fr; }
  .shift__arrow { transform: rotate(90deg); justify-self: start; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 799px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background-color: var(--color-bone);
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform var(--transition), visibility var(--transition);
  }
  .primary-nav[data-open="true"] { transform: translateY(0); visibility: visible; }

  .primary-nav__links { flex-direction: column; align-items: stretch; gap: var(--space-lg); }
  .primary-nav__links a[aria-current="page"] { border-bottom: none; color: var(--color-signal); }
  .primary-nav .btn { justify-content: center; }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   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;
    scroll-behavior: auto !important;
  }
}
