/* AikidoInTheField.com — tide palette, Alegreya, margin-note layout */
:root {
  --ink: #12343B;      /* ink-sea: text, dark ground */
  --mist: #EEF2EF;     /* page ground */
  --kelp: #4F6B4A;     /* links, secondary accent */
  --sun: #B8892B;      /* low sun on water: primary action */
  --stone: #5E6B6A;    /* muted text */
  --foam: #FBFCFB;     /* raised surfaces */
  --line: #C9D3CF;

  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  /* modular scale 1.25 from 19px */
  --s-1: 0.85rem;
  --s0: 1.1875rem;
  --s1: 1.48rem;
  --s2: 1.85rem;
  --s3: 2.32rem;
  --s4: 3.2rem;

  --measure: 36rem;
  --gutter: 12rem;
  --pad: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--s0);
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--kelp); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--mist); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- header ---------- */
.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .75rem 2rem;
  padding: 1.25rem var(--pad);
  font-family: var(--sans);
}
.brand { font-family: var(--serif); font-weight: 700; font-size: var(--s1); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand span { font-weight: 400; font-style: italic; color: var(--kelp); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 1.05rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--sun); }

/* ---------- hero (home) ---------- */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--mist);
  padding: clamp(3rem, 9vw, 7rem) var(--pad) 0;
  overflow: hidden;
}
.hero__inner { max-width: 46rem; position: relative; z-index: 1; padding-bottom: clamp(7rem, 16vw, 11rem); }
.hero__tag { font-family: var(--sans); font-size: 1.05rem; color: #A9C2BC; margin: 0 0 1.5rem; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
.hero h1 .push { display: block; font-style: italic; font-weight: 400; color: #CFE0DB; }
.hero__lead { font-size: var(--s1); line-height: 1.45; max-width: 34rem; margin: 0 0 2.25rem; color: #DCE6E3; }
.tide { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(6rem, 14vw, 10rem); }
.tide path { fill: var(--mist); }
.tide .tide__wave { animation: breathe 10s ease-in-out infinite; transform-origin: 50% 100%; }
.tide .tide__wave--back { fill: #2C4E54; animation-delay: -2.5s; }
@keyframes breathe {
  0%, 100% { transform: translateY(18%); }
  45%      { transform: translateY(0); }
  55%      { transform: translateY(0); }
}
.breath-cue { font-family: var(--sans); font-size: var(--s-1); color: #A9C2BC; margin-top: 1.25rem; }
@media (prefers-reduced-motion: reduce) {
  .tide .tide__wave { animation: none; transform: none; }
}

/* ---------- page head (inner pages) ---------- */
.page-head { padding: clamp(2.5rem, 7vw, 5rem) var(--pad) 2rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 5.5vw, var(--s4)); line-height: 1.08; font-weight: 500; letter-spacing: -0.015em; margin: 0 0 1rem; max-width: 22ch; }
.page-head p { font-size: var(--s1); line-height: 1.45; color: var(--stone); max-width: var(--measure); margin: 0; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: .85rem 1.25rem; align-items: center; }
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  padding: .8rem 1.4rem; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; line-height: 1.2;
}
.btn--sun { background: var(--sun); color: #1A1408; }
.btn--sun:hover { background: #CB9A37; color: #1A1408; }
.btn--line { border-color: currentColor; color: inherit; }
.btn--line:hover { background: rgba(255,255,255,.08); color: inherit; }
.on-light .btn--line { color: var(--ink); }
.on-light .btn--line:hover { background: #E2E9E6; }

/* ---------- margin-note sections ---------- */
.band { padding: clamp(3rem, 7vw, 5.5rem) var(--pad); }
.band + .band { border-top: 1px solid var(--line); }
.band--deep { background: var(--ink); color: var(--mist); border-top: 0 !important; }
.band--deep a:not(.btn) { color: #CFE0DB; }
.note {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  gap: 0 3rem;
  max-width: calc(var(--gutter) + 3rem + 48rem);
}
.note__side h2 { font-size: var(--s1); line-height: 1.2; font-weight: 700; margin: 0; position: sticky; top: 1.5rem; }
.note__side p { font-family: var(--sans); font-size: var(--s-1); color: var(--stone); margin: .5rem 0 0; }
.band--deep .note__side p { color: #A9C2BC; }
.note__body { max-width: var(--measure); }
.note__body > :first-child { margin-top: 0; }
.note__body h3 { font-size: var(--s1); line-height: 1.25; margin: 2rem 0 .5rem; font-weight: 700; }
.note__body .big { font-size: var(--s2); line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 1.5rem; }
.note__body .wide { max-width: 48rem; }
@media (max-width: 52rem) {
  .note { grid-template-columns: 1fr; }
  .note__side { margin-bottom: 1.5rem; }
  .note__side h2 { position: static; }
}

/* problem strip: three statements, no cards */
.felt { list-style: none; padding: 0; margin: 0; }
.felt li { padding: 1.25rem 0 1.25rem 1.25rem; border-left: 3px solid var(--line); margin-bottom: 1rem; }
.felt li strong { display: block; font-size: var(--s1); line-height: 1.25; margin-bottom: .35rem; }

/* method: a true sequence */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.25rem 1fr; gap: 0 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.band--deep .steps li { border-top-color: #2C4E54; }
.steps li::before { content: counter(step); font-size: var(--s3); line-height: 1; font-style: italic; color: var(--sun); }
.steps h3 { margin: 0 0 .35rem !important; }
.steps .sub { font-family: var(--sans); font-size: 1rem; color: var(--stone); font-weight: 400; }
.band--deep .steps .sub { color: #A9C2BC; }
.steps p { margin: 0; }

/* paths */
.paths { display: grid; gap: 2rem; }
.path h3 { margin: 0 0 .35rem !important; }
.path p { margin: 0 0 .5rem; }
.path a { font-family: var(--sans); font-weight: 700; }

/* exercise list */
.ex { list-style: none; padding: 0; margin: 0 0 2rem; }
.ex li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0 1rem; padding: .85rem 0; border-bottom: 1px dotted var(--line); }
.band--deep .ex li { border-bottom-color: #2C4E54; }
.ex .num { font-family: var(--sans); font-variant-numeric: tabular-nums; color: var(--stone); font-size: 1rem; padding-top: .15rem; }
.band--deep .ex .num { color: #A9C2BC; }
.ex strong { font-weight: 700; }

blockquote { margin: 2rem 0; padding: 0 0 0 1.25rem; border-left: 3px solid var(--sun); font-style: italic; font-size: var(--s1); line-height: 1.4; }
.fine { font-family: var(--sans); font-size: var(--s-1); color: var(--stone); }

/* ---------- footer ---------- */
.site-foot {
  padding: 2.5rem var(--pad) 3rem; border-top: 1px solid var(--line);
  font-family: var(--sans); font-size: 1rem; color: var(--stone);
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.site-foot p { margin: 0; max-width: 32rem; }
.site-foot a { color: var(--ink); }
.site-head--deep { background: var(--ink); }
.site-head--deep .brand, .site-head--deep .site-nav a { color: var(--mist); }
.site-head--deep .brand span { color: #CFE0DB; }
.site-head--deep .site-nav a:hover { border-bottom-color: #2C4E54; }

/* social-good link: always visible, set apart from the main nav */
.site-nav a.nav-sg { color: var(--kelp); font-weight: 700; }
.site-head--deep .site-nav a.nav-sg { color: #E2C27A; }

/* ported long-form pages (security) */
.prose { max-width: 42rem; margin-left: calc(var(--gutter) + 3rem); }
@media (max-width: 52rem) { .prose { margin-left: 0; } }
.prose h2 { font-size: var(--s2); line-height: 1.2; font-weight: 500; margin: 3rem 0 .75rem; }
.prose h3 { font-size: var(--s1); line-height: 1.25; margin: 2rem 0 .5rem; }
.prose h4 { font-size: var(--s0); margin: 1.5rem 0 .25rem; }
.prose > :first-child { margin-top: 0; }
.prose li { margin-bottom: .4rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; margin: 1.5rem 0; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .5rem .75rem; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--sans); }
.prose .actions { margin-top: 3rem; }
