/* Wyre Digital — site styles
   Layout: left-aligned editorial grid. Section headings sit in a narrow left column,
   content in a wide right column. One bold moment (the hero type and the estuary
   line field); everything else stays quiet. */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url(fonts/bricolage-grotesque-latin-standard-normal.woff2) format("woff2-variations");
}
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }

:root {
  /* Colour: pale mist ground, petrol ink, estuary teal accent */
  --bg: #F0F2EE;
  --surface: #E3E8E2;
  --fg: #14262E;
  --muted: #526369;
  --line: #C6CEC9;
  --accent: #0E6F6A;
  --accent-ink: #FFFFFF;
  --field-lines: rgba(14, 111, 106, 0.4);

  /* Type */
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --measure: 62ch;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --radius: 4px;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1A1F;
    --surface: #182730;
    --fg: #E6ECE8;
    --muted: #9BABA9;
    --line: #2B3C43;
    --accent: #45B8AE;
    --accent-ink: #0F1A1F;
    --field-lines: rgba(69, 184, 174, 0.42);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1A1F;
  --surface: #182730;
  --fg: #E6ECE8;
  --muted: #9BABA9;
  --line: #2B3C43;
  --accent: #45B8AE;
  --accent-ink: #0F1A1F;
  --field-lines: rgba(69, 184, 174, 0.42);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--fg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); letter-spacing: -0.025em; line-height: 1.0; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.375rem; }
p { margin: 0; max-width: var(--measure); }
p + p, p + ul, ul + p { margin-top: 1em; }
ul { padding-left: 1.2em; max-width: var(--measure); }
li + li { margin-top: 0.35em; }
.lead { font-size: 1.25rem; line-height: 1.5; max-width: 54ch; }
.muted { color: var(--muted); }
small, .small { font-size: 0.9375rem; }
strong { font-weight: 600; }

/* Wrapper and side gutter */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 1.75rem; height: 1.75rem; }
.brand .mark-bg { fill: var(--fg); }
.brand .mark-fg { stroke: var(--bg); }
.brand:hover .mark-bg { fill: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--fg);
  font: inherit;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a { color: var(--fg); text-decoration: none; font-weight: 500; font-size: 0.9375rem; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); }

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 150ms ease, color 150ms ease;
}
.button:hover { background: var(--accent); color: var(--accent-ink); }
.button.secondary { background: var(--bg); color: var(--fg); border-color: var(--line); }
.button.secondary:hover { border-color: var(--fg); background: var(--bg); color: var(--fg); }
.site-nav .button { padding: 0.6rem 1rem; }
.site-nav a.button { color: var(--bg); }
.site-nav a.button:hover { color: var(--accent-ink); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem max(var(--gutter), env(safe-area-inset-left, 0px)) 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 0; font-size: 1.0625rem; border-bottom: 1px solid var(--line); }
  .site-nav .button { margin-top: 0.75rem; text-align: center; border-bottom: none; }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 8rem);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.75rem, 7.2vw, 6rem);
  font-stretch: 92%;
  max-width: 14ch;
  line-height: 0.98;
}
.hero .lead { margin-top: 1.75rem; }
.hero .actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-field canvas { width: 100%; height: 100%; display: block; }
.hero-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, transparent) 38%, transparent 72%);
}
@media (max-width: 760px) {
  .hero-field::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, color-mix(in srgb, var(--bg) 40%, transparent) 100%); }
}

/* Page header (inner pages) */
.page-head {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.page-head .lead { margin-top: 1.25rem; }

/* Sections */
.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section + .section, .section.bordered { border-top: 1px solid var(--line); }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
}
@media (min-width: 900px) {
  .section-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
  .section-grid > .section-head { position: sticky; top: 5.5rem; }
}
.section-head p { margin-top: 0.75rem; color: var(--muted); max-width: 32ch; }
.section-body { min-width: 0; }

/* Fact row */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.facts strong { display: block; font-family: var(--font-display); font-weight: 620; font-size: 1.25rem; letter-spacing: -0.01em; margin-bottom: 0.35rem; }
.facts p { color: var(--muted); font-size: 0.9375rem; }

/* Row lists (services, work) */
.rows { list-style: none; margin: 0; padding: 0; max-width: none; }
.rows > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  margin: 0;
}
.rows > li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 640px) {
  .rows > li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.rows h3 a { color: inherit; text-decoration: none; }
.rows h3 a:hover { color: var(--accent); }
.rows .role { color: var(--muted); font-size: 0.9375rem; margin-top: 0.25rem; }
.rows p { max-width: none; }
.rows .more { font-weight: 500; white-space: nowrap; }

/* Process steps (a real sequence, hence the numbers) */
.steps { list-style: none; margin: 0; padding: 0; max-width: none; display: grid; gap: 2rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); counter-reset: step; }
.steps li { margin: 0; counter-increment: step; padding-top: 1rem; border-top: 2px solid var(--fg); }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 620; font-size: 0.9375rem; color: var(--muted); display: block; margin-bottom: 0.75rem; }
.steps h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.steps p { font-size: 0.9875rem; color: var(--muted); }

/* Service detail blocks */
.service { padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.service:first-of-type { border-top: 0; padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.service .section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.service dl { margin: 1.75rem 0 0; display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: 70ch; }
.service dt { font-weight: 600; margin-bottom: 0.4rem; }
.service dd { margin: 0; color: var(--muted); }
.service dd ul { padding-left: 1.1em; margin: 0; }

/* Case studies */
.case { padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.case:first-of-type { border-top: 0; padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.case .role { margin-top: 0.75rem; color: var(--muted); max-width: 32ch; }
.case .role span { display: block; }
.case .role span + span { margin-top: 0.25rem; }
.case .aside { margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; max-width: 60ch; }
.case .aside p { color: inherit; }
.tags { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: none; }
.tags li { margin: 0; font-size: 0.875rem; padding: 0.3rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

/* Prose pages (about, privacy) */
.prose h2 { font-size: 1.6rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }
.prose p + h2, .prose ul + h2 { margin-top: 2.5rem; }
.prose ul { margin-top: 0.75rem; }

/* FAQ */
.faq { list-style: none; margin: 0; padding: 0; max-width: 70ch; }
.faq li { margin: 0; padding-block: 1.25rem; border-top: 1px solid var(--line); }
.faq li:last-child { border-bottom: 1px solid var(--line); }
.faq h3 { font-size: 1.125rem; margin-bottom: 0.4rem; }
.faq p { color: var(--muted); }

/* Call to action band */
.cta-band { background: var(--surface); padding-block: clamp(3.5rem, 7vw, 6rem); }
.cta-band h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); max-width: 18ch; }
.cta-band .actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; }
.cta-band .actions a:not(.button) { font-weight: 500; }

/* Contact */
.contact-grid { display: grid; gap: 3rem clamp(2rem, 5vw, 5rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.contact-side h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.contact-side section + section { margin-top: 2rem; }
.contact-side p { color: var(--muted); }
.contact-side a.plain { color: var(--fg); font-weight: 500; }

form.contact { display: grid; gap: 1.25rem; max-width: 40rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 500; font-size: 0.9375rem; }
.field .hint { color: var(--muted); font-size: 0.875rem; }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  width: 100%;
  min-width: 0;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field textarea { min-height: 9rem; resize: vertical; }
.field-row { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--surface); border-left: 3px solid var(--accent); }
.form-status.error { border-left-color: #B3261E; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.site-footer .brand { font-size: 1.1rem; }
.site-footer p { color: var(--muted); max-width: 30ch; margin-top: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 0.5rem; }
.site-footer a { color: var(--fg); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer h2 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; margin-bottom: 0.75rem; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.footer-legal p { margin: 0; max-width: none; }

/* 404 */
.notfound { padding-block: clamp(5rem, 12vw, 10rem); }
.notfound .actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Utilities */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Website pricing tiers */
.tiers { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: 2.25rem; max-width: none; }
.tier { padding-top: 1rem; border-top: 2px solid var(--fg); }
.tier h3 { font-size: 1.15rem; min-height: 2.5em; text-wrap: balance; }
.tier .price { font-family: var(--font-display); font-weight: 620; font-size: 1.6rem; letter-spacing: -0.02em; margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.tier .for { color: var(--muted); font-size: 0.9375rem; margin-top: 0.5rem; min-height: 3.6em; }
.tier ul { margin-top: 0.75rem; padding-left: 1.1em; font-size: 0.9375rem; }
.tier li + li { margin-top: 0.3rem; }
.tiers-note { margin-top: 1.5rem; color: var(--muted); font-size: 0.9375rem; max-width: 70ch; }

/* Wordmark brand (option 2) */
.brand-wordmark { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.brand-wordmark .wm { font-size: 1.65rem; font-weight: 720; letter-spacing: -0.035em; line-height: 1; color: var(--fg); }
.brand-wordmark .wm-b { font-weight: 400; letter-spacing: -0.02em; color: var(--accent); }
.brand-wordmark .wm-line { width: 3.05em; height: auto; margin-left: 0.05em; stroke: var(--accent); }
.brand-wordmark:hover .wm-b, .brand-wordmark:hover .wm-line { color: var(--fg); stroke: var(--fg); }
.site-footer .brand-wordmark .wm { font-size: 1.25rem; }
