/* Driftlatched — one stylesheet, no framework, no build step. Mobile first. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #0a0c0b;        /* near-black, slightly green */
  --ink-2: #111614;      /* raised surfaces */
  --fog: #d3dbd5;        /* body text: lake fog */
  --fog-dim: #8e9b93;    /* secondary text */
  --moss: #8fb08a;       /* the latch: one accent, used sparingly */
  --peat: #a2835f;       /* warm brown, for texture only */
  --line: rgba(211, 219, 213, 0.11);
  --radius: 6px;
  --gutter: 20px;
  --max: 1080px;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fog);
  font: 400 17px/1.65 var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Page transitions: a short cross-fade between pages (browsers that support
   cross-document view transitions), and a gentle rise of the content on load. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms var(--ease) both fade-out; }
::view-transition-new(root) { animation: 320ms var(--ease) both fade-in; }
.site-header { view-transition-name: header; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
main > * { animation: rise 600ms var(--ease) both; }
main > *:nth-child(2) { animation-delay: 80ms; }
main > *:nth-child(3) { animation-delay: 160ms; }

/* Lake fog: layered gradients plus fine grain, drifting very slowly. */
.fog {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 20% 15%, rgba(143, 176, 138, 0.10), transparent 70%),
    radial-gradient(50% 35% at 85% 30%, rgba(211, 219, 213, 0.06), transparent 70%),
    radial-gradient(70% 45% at 50% 100%, rgba(162, 131, 95, 0.10), transparent 70%),
    radial-gradient(40% 30% at 10% 80%, rgba(143, 176, 138, 0.06), transparent 70%);
  animation: drift 60s ease-in-out infinite alternate;
}
.fog::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, -3%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .fog, main > * { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
  .button, .card { transition: none; }
  .button:hover, .card:hover { transform: none; }
  html { scroll-behavior: auto; }
}

a { color: inherit; text-decoration-color: rgba(143, 176, 138, 0.6); text-underline-offset: 4px; transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease); }
a:hover { color: #fff; text-decoration-color: var(--moss); }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--ink-2); padding: 8px 12px; z-index: 10; }

/* Wordmark: drift | latched. The bar is the latch. */
.wm {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 21px;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.wm-a { font-weight: 400; color: var(--fog-dim); }
.wm-b { font-weight: 650; color: var(--fog); }
.wm-bar {
  position: relative;
  display: inline-block;
  width: 0.1em;
  height: 1.02em;
  background: var(--moss);
  border-radius: 1px;
  margin: 0 0.1em 0 0.32em;  /* room on the left for the catch; tight to "latched" */
}
.wm-bar::after {           /* the catch of the latch: points back at "drift", clear of the "l" */
  content: "";
  position: absolute;
  right: 100%;
  top: 38%;
  width: 0.2em;
  height: 0.1em;
  background: var(--moss);
  border-radius: 1px 0 0 1px;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--fog-dim); padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fog); }

/* Type */
.eyebrow {
  font: 600 12px/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 0 0 18px;
}
h1, h2 { font-family: var(--serif); font-weight: 400; color: #eef2ef; letter-spacing: -0.01em; }
h1 { font-size: clamp(42px, 10vw, 76px); line-height: 1.02; margin: 0 0 24px; }
h2 { font-size: clamp(32px, 6.4vw, 48px); line-height: 1.08; margin: 0 0 18px; }
h1 em, h2 em { font-style: italic; color: var(--moss); }
h3 { font: 600 18px/1.35 var(--sans); color: #eef2ef; letter-spacing: -0.005em; margin: 0 0 8px; }
p { margin: 0 0 16px; }
.lede { font-size: clamp(18px, 3.6vw, 20px); color: var(--fog); max-width: 38em; }
.dim { color: var(--fog-dim); }

/* Sections */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.hero { padding: 80px 0 88px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  display: inline-block;
  font: 600 14px/1 var(--sans);
  letter-spacing: 0.01em;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--moss);
  text-decoration: none;
  color: var(--ink);
  background: var(--moss);
  transition: background 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.button:hover { background: #a6c4a0; color: var(--ink); transform: translateY(-1px); }
.button--ghost { background: transparent; color: var(--fog); border-color: var(--line); }
.button--ghost:hover { background: var(--ink-2); color: #fff; }

.grid { display: grid; gap: 16px; margin-top: 36px; }
.card {
  background: rgba(17, 22, 20, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  backdrop-filter: blur(6px);
  transition: border-color 200ms var(--ease), transform 200ms var(--ease);
}
.card:hover { border-color: rgba(143, 176, 138, 0.35); transform: translateY(-2px); }
.card .tag { font: 600 11px/1 var(--sans); letter-spacing: 0.14em; color: var(--peat); text-transform: uppercase; margin-bottom: 16px; display: block; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--fog-dim); }

.list { list-style: none; padding: 0; margin: 36px 0 0; border-top: 1px solid var(--line); }
.list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.list strong { display: block; color: #eef2ef; font-weight: 600; margin-bottom: 4px; }
.list span { color: var(--fog-dim); }

.steps { display: grid; gap: 4px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 16px; align-items: baseline; color: var(--fog-dim); }
.steps li::before { content: counter(s); font: 400 22px/1 var(--serif); color: var(--moss); min-width: 18px; }
.steps strong { color: var(--fog); font-weight: 600; }

.note { margin-top: 28px; font-size: 13px; color: var(--fog-dim); }

.contacts { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid var(--line); }
.contacts div { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.contacts .label { font-size: 14px; color: var(--fog-dim); }
.contacts a { font: 500 clamp(18px, 4.8vw, 22px)/1.3 var(--sans); word-break: break-all; }

/* Legal pages */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 740px; }
.legal h1 { font-size: clamp(38px, 8vw, 56px); }
.legal h2 { font: 600 20px/1.35 var(--sans); margin-top: 40px; letter-spacing: -0.005em; }
.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin-bottom: 6px; }
.legal .meta { font-size: 13px; color: var(--fog-dim); margin-bottom: 32px; }

/* Footer */
.site-footer { padding: 40px 0 48px; font-size: 13px; color: var(--fog-dim); }
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--fog); }
.site-footer .wm { font-size: 18px; }
.site-footer .fine { grid-column: 1 / -1; font-size: 12px; line-height: 1.5; margin: 0; max-width: 60em; }

/* Larger screens */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  section { padding: 104px 0; }
  .hero { padding: 128px 0 136px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .split { display: grid; grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; }
  .split .list { margin-top: 6px; }
  .contacts { grid-template-columns: repeat(3, 1fr); gap: 0 32px; border-top: 0; }
  .contacts div { border-top: 1px solid var(--line); }
  .site-footer .wrap { grid-template-columns: auto 1fr; align-items: center; }
  .site-footer nav { justify-content: flex-end; }
}
