:root {
  --teal: #018f9c;
  --teal-deep: #01656f;
  --teal-ink: #013c44;
  --teal-soft: #d9eef1;
  --cream: #f7efe3;
  --cream-warm: #f4dfbf;
  --paper: #fffdf8;
  --ink: #2a1c14;
  --ink-soft: #5c4636;
  --muted: #7a6454;
  --brown: #775034;
  --line: rgba(42, 28, 20, 0.1);
  --shadow: 0 18px 50px rgba(42, 28, 20, 0.1);
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", "SF Pro Text", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --wrap: 1080px;
  --radius: 14px;

  --bg: var(--cream);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --fg-muted: var(--muted);
  --accent: var(--teal);
  --on-accent: var(--paper);
  --surface: var(--paper);
  --border: var(--line);
  --field: var(--teal);
  --on-field: var(--cream);
  --on-field-soft: color-mix(in srgb, var(--cream) 78%, var(--teal-ink));
  --field-line: color-mix(in srgb, var(--cream) 28%, transparent);
  --board: var(--teal-ink);
  --on-board: var(--cream);
  --on-board-soft: color-mix(in srgb, var(--cream) 68%, var(--teal-ink));
  --board-wash: color-mix(in srgb, var(--paper) 10%, transparent);
  --board-wash-strong: color-mix(in srgb, var(--paper) 18%, transparent);
  --kind-chat: var(--teal);
  --kind-link: var(--teal-deep);
  --kind-code: var(--brown);
  --kind-article: var(--ink-soft);
  --kind-image: var(--muted);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 180ms;
  --duration-fast: 150ms;
  --duration-slow: 220ms;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 96px;
  --gutter: 24px;

  --radius-sm: 8px;
  --radius-pill: 999px;
  --board-pad: 20px;
  --board-radius: calc(var(--radius) + var(--board-pad));
  --header-h: 68px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

html, body {
  margin: 0;
  padding: 0;
  overscroll-behavior-y: none;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; }

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

button, input { font: inherit; }

button,
[role="button"],
summary {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--cream-warm);
  color: var(--ink);
}

h1, h2, h3 {
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 400;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
}

h3 {
  font-size: 20px;
  font-weight: 600;
}

p, li { text-wrap: pretty; }

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  color: var(--fg);
  backdrop-filter: saturate(1.2) blur(16px);
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}

.has-field .site-header:not(.is-on-cream) {
  background: transparent;
  color: var(--on-field);
  backdrop-filter: none;
}

.has-field .site-header.is-on-cream {
  background: var(--bg);
  color: var(--fg);
  backdrop-filter: saturate(1.2) blur(16px);
}

.has-field .field {
  margin-top: calc(-1 * var(--header-h));
}

.site-header.is-on-cream.is-scrolled {
  border-bottom-color: var(--border);
}

.bar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 18px;
  color: inherit;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  text-decoration: none;
  color: var(--fg-soft);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--fg); }

.has-field .site-header:not(.is-on-cream) .nav a { color: var(--on-field-soft); }
.has-field .site-header:not(.is-on-cream) .nav a:hover,
.has-field .site-header:not(.is-on-cream) .nav a[aria-current="page"] { color: var(--on-field); }

.nav-cta { display: none; }

.menu-toggle {
  display: none;
  margin-left: auto;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  border-radius: var(--radius-pill);
  transition:
    background-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease);
}

.has-field .site-header:not(.is-on-cream) .menu-toggle {
  background: transparent;
  border-color: var(--field-line);
  color: var(--on-field);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  text-decoration: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover { background: var(--teal-deep); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--fg);
}

.btn-ghost:hover { background: var(--surface); }

.field .btn-primary,
.has-field .site-header:not(.is-on-cream) .btn-primary {
  background: var(--on-field);
  color: var(--teal-ink);
}

.field .btn-primary:hover,
.has-field .site-header:not(.is-on-cream) .btn-primary:hover {
  background: var(--paper);
}

.field .btn-ghost,
.has-field .site-header:not(.is-on-cream) .btn-ghost {
  border-color: var(--field-line);
  color: var(--on-field);
}

.field .btn-ghost:hover,
.has-field .site-header:not(.is-on-cream) .btn-ghost:hover {
  background: color-mix(in srgb, var(--cream) 12%, transparent);
}

.field :focus-visible,
.has-field .site-header:not(.is-on-cream) :focus-visible {
  outline-color: var(--on-field);
}

.field {
  position: relative;
  overflow: hidden;
  background: var(--field);
  color: var(--on-field);
}

.field ::selection {
  background: var(--teal-deep);
  color: var(--cream);
}

.field-otter {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(50vw, 640px);
  height: auto;
  pointer-events: none;
  user-select: none;
}

.field-copy {
  position: relative;
  z-index: 1;
  width: min(36rem, 54%);
  margin-left: auto;
}

.field-home {
  min-height: min(92vh, 860px);
  display: grid;
  align-items: center;
  padding: calc(var(--header-h) + var(--space-6)) 0 var(--space-6);
}

.field-page {
  min-height: 340px;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + var(--space-7)) 0 var(--space-7);
}

.field-page .field-otter {
  width: min(38vw, 400px);
}

.field h1 {
  margin: 0 0 var(--space-5);
}

.field h1 em {
  font-style: italic;
  color: var(--cream-warm);
}

.lede {
  font-size: 18px;
  color: var(--fg-soft);
  max-width: 38rem;
  margin: 0 0 var(--space-6);
}

.field .lede {
  color: var(--on-field-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero-actions.is-center { justify-content: center; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  color: var(--on-field-soft);
  font-size: 13px;
  font-weight: 500;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-home .field-copy {
  animation: rise var(--duration-slow) var(--ease) both;
}

.field-home .field-otter {
  animation: rise 240ms var(--ease) 40ms both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section { padding: var(--space-9) 0; }
.section-tight { padding-top: 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--fg-soft);
  margin: 14px 0 0;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.panel {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  padding: 28px;
}

.panel.accent {
  background: var(--accent);
  color: var(--on-field);
  border-color: transparent;
}

.panel .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
  margin: 0 0 10px;
}

.panel.accent .label { color: var(--on-field-soft); }

.panel h3 { margin-bottom: var(--space-4); }

.panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  font-size: 15px;
}

.panel li span:last-child { font-weight: 600; }

.quote {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.35;
  color: var(--fg);
  text-wrap: balance;
}

.more { margin: 22px 0 0; }

.more a {
  color: var(--teal-deep);
  font-weight: 600;
  text-decoration: none;
}

.more a:hover { text-decoration: underline; }

.board {
  background: var(--board);
  color: var(--on-board);
  border-radius: var(--board-radius);
  padding: var(--board-pad);
}

.board-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-4);
}

.search {
  flex: 1;
  background: var(--board-wash);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  color: var(--on-board-soft);
  font-size: 13px;
}

.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: 12px;
  background: var(--board-wash);
  color: var(--on-board-soft);
}

.pill.on {
  background: var(--board-wash-strong);
  color: var(--on-board);
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}

.card {
  background: var(--surface);
  color: var(--fg);
  border-radius: var(--radius);
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card.selected { outline: 2px solid var(--accent); }

.card-h {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px 8px;
  font-size: 12px;
  font-weight: 600;
}

.card-b {
  flex: 1;
  padding: 0 12px 12px;
  font-size: 13px;
  color: var(--fg-soft);
  line-height: 1.45;
}

.card-b code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--cream-warm);
  padding: 2px 5px;
  border-radius: 4px;
}

.card-f {
  padding: 8px 12px 10px;
  font-size: 11px;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
}

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.chat { color: var(--kind-chat); }
.link { color: var(--kind-link); }
.code { color: var(--kind-code); }
.article { color: var(--kind-article); }
.image { color: var(--kind-image); }

.jobs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.job .num {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent);
}

.job p {
  color: var(--fg-soft);
  margin: 10px 0 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 28px;
}

.feature {
  padding: 8px 0 18px;
  border-top: 1px solid var(--border);
}

.feature p {
  color: var(--fg-soft);
  margin: 8px 0 0;
}

.kbd {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--cream-warm);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

.field .kbd {
  background: color-mix(in srgb, var(--cream) 16%, transparent);
  color: var(--on-field);
  border-color: var(--field-line);
}

.local-band {
  background: var(--teal-ink);
  color: var(--on-field);
  padding: var(--space-9) 0;
}

.local-band ::selection {
  background: var(--teal-deep);
  color: var(--cream);
}

.local {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-6);
}

.local p { color: var(--on-field-soft); }

.local ul {
  margin: 0;
  padding-left: 18px;
  color: var(--on-field-soft);
}

.local-link {
  color: var(--teal-soft);
  font-weight: 600;
  text-decoration: none;
}

.local-link:hover { text-decoration: underline; }

.local-band :focus-visible { outline-color: var(--on-field); }

.faq { max-width: 720px; }

.faq-item {
  border-top: 1px solid var(--border);
  padding: 4px 0;
}

.faq-item:last-child { border-bottom: 1px solid var(--border); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 44px;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 500;
}

.faq-item[open] summary::after { content: "–"; }

.faq-item p {
  color: var(--fg-soft);
  margin: 0 0 12px;
}

.page,
.essay {
  padding-top: var(--space-7);
  padding-bottom: var(--space-8);
}

.essay h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 48px 0 14px;
}

.essay p,
.essay li {
  color: var(--fg-soft);
  font-size: 17px;
  max-width: 40rem;
}

.essay ul { padding-left: 1.2em; }

.essay-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 48px 0 0;
}

.spec {
  border-top: 1px solid var(--border);
  margin: 16px 0 32px;
}

.spec-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-4);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.spec-row div:first-child {
  font-weight: 600;
  color: var(--fg);
}

.cta {
  text-align: center;
  padding: var(--space-7) 0 var(--space-2);
}

.cta .lede {
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  margin-top: 40px;
  color: var(--fg-muted);
  font-size: 14px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.foot a:hover { color: var(--fg); }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.prose { max-width: 720px; }

.prose p,
.prose li { color: var(--fg-soft); }

.prose h2 { margin: 42px 0 14px; }

.prose a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.stack { display: grid; gap: var(--space-4); }

.row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.row strong { display: block; margin-bottom: 4px; }

@media (max-width: 860px) {
  .compare,
  .jobs,
  .features,
  .local,
  .row,
  .cards {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-auto-flow: column;
    grid-auto-columns: 170px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .nav { display: none; }

  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: var(--header-h);
    background: var(--surface);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 8px);
    padding: 8px;
    box-shadow: var(--shadow);
  }

  .nav.open a,
  .has-field .site-header:not(.is-on-cream) .nav.open a {
    color: var(--fg-soft);
    padding: 0 12px;
    border-radius: var(--radius);
  }

  .nav.open a:hover,
  .nav.open a[aria-current="page"],
  .has-field .site-header:not(.is-on-cream) .nav.open a:hover,
  .has-field .site-header:not(.is-on-cream) .nav.open a[aria-current="page"] {
    color: var(--fg);
  }

  .nav.open .btn-primary,
  .has-field .site-header:not(.is-on-cream) .nav.open .btn-primary {
    background: var(--accent);
    color: var(--on-accent);
  }

  .menu-toggle { display: inline-flex; }

  .header-cta { display: none; }

  .nav.open .nav-cta {
    display: inline-flex;
    margin: 4px 8px 8px;
    width: calc(100% - 16px);
  }

  .field-home,
  .field-page {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: calc(var(--header-h) + var(--space-5)) 0 0;
  }

  .field-copy {
    order: 1;
    width: 100%;
    margin: 0;
    padding-bottom: var(--space-5);
  }

  .field-otter,
  .field-page .field-otter {
    order: 2;
    position: relative;
    left: -8%;
    width: min(88vw, 340px);
    margin-top: auto;
  }

  .field-page { padding-bottom: 0; }

  .field h1 { font-size: clamp(34px, 9vw, 48px); }

  .local-band { padding: var(--space-7) 0; }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .btn:hover,
  .btn:active { transform: none; }

  .field-home .field-otter,
  .field-home .field-copy { animation: none; }

  .site-header {
    transition: none;
  }
}
