/* Site styles. Every value comes from tokens.css. */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
a, button, input { touch-action: manipulation; }
h1, h2, h3, [id] { scroll-margin-top: var(--s6); }
body {
  margin: 0;
  background: var(--mist);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
::selection { background: var(--river); color: var(--mist); }
:focus-visible { outline: 2px solid var(--river); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
p { margin: 0; }
p, li { max-width: var(--measure); }

a { color: var(--river); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--ease), text-decoration-color var(--ease); }
a:hover { color: var(--slate); }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--s5), env(safe-area-inset-left, 0px));
  padding-right: max(var(--s5), env(safe-area-inset-right, 0px));
}
@media (max-width: 480px) {
  .wrap { padding-left: max(var(--s4), env(safe-area-inset-left, 0px)); padding-right: max(var(--s4), env(safe-area-inset-right, 0px)); }
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--surface); padding: var(--s2) var(--s3); z-index: 10; }

/* The one quirk: a hand-drawn river line */
.river {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 30 3, 52 13, 84 8 S 140 2, 168 7 S 192 10, 198 6' fill='none' stroke='%231F7A6E' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 0.32em;
  background-position: 0 98%;
  padding-bottom: 0.1em;
}

/* Header */
.site-header { padding-block: var(--s5); }
.site-header .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3) var(--s6); }
.site-header .nav { justify-self: end; }
.wordmark { min-height: 44px; display: inline-flex; align-items: center; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 720px) {
  .site-header .wrap { grid-template-columns: 1fr auto; }
  .site-header .nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; flex-wrap: nowrap; overflow-x: auto; gap: 0 var(--s4); white-space: nowrap; scrollbar-width: none; margin-inline: calc(-1 * var(--s4)); padding-inline: var(--s4); }
  .site-header .nav::-webkit-scrollbar { display: none; }
  .site-header .header-cta { padding: var(--s2) var(--s4); min-height: 44px; display: inline-flex; align-items: center; }
}
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--slate); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); font-family: var(--font-display); font-weight: 500; font-size: var(--t-sm); }
.nav a { color: var(--slate); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--river); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  padding: var(--s3) var(--s5);
  border-radius: var(--radius);
  background: var(--slate);
  color: var(--mist);
  text-decoration: none;
  border: 1px solid var(--slate);
  transition: background-color var(--ease), color var(--ease);
  cursor: pointer;
}
.btn:hover { background: var(--river); border-color: var(--river); color: var(--mist); }
.btn-quiet { background: transparent; color: var(--slate); }
.btn-quiet:hover { background: var(--surface); color: var(--slate); border-color: var(--slate); }
.header-cta { padding: var(--s3) var(--s4); font-size: var(--t-sm); min-height: 44px; display: inline-flex; align-items: center; }

/* Sections */
main { display: block; }
.section { padding-block: var(--s8); }
.section + .section { border-top: 1px solid var(--line); }
.stack { display: grid; gap: var(--s4); align-content: start; }
.stack-lg { display: grid; gap: var(--s5); align-content: start; }
.lead { font-size: var(--t-lg); line-height: 1.55; color: var(--slate); }
.muted { color: var(--text-2); }
.small { font-size: var(--t-sm); }

/* Hero */
.hero { padding-block: var(--s7) var(--s8); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--s7); align-items: end; }
.hero-copy { display: grid; gap: var(--s5); min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.portrait-col { display: flex; flex-direction: column; gap: var(--s3); align-self: stretch; min-height: 0; width: 100%; max-width: 420px; justify-self: end; }
.portrait { position: relative; flex: 1 1 0; min-height: 0; border-radius: var(--radius); overflow: hidden; background: var(--river-wash); }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.signoff { font-style: italic; color: var(--text-2); }
.hello { width: 284px; max-width: 100%; height: auto; margin-right: -6px; align-self: flex-end; flex: none; }
.facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s7); }
@media (max-width: 800px) { .facts-2 { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
  .hero { padding-block: var(--s5) var(--s7); }
  .hero .wrap { grid-template-columns: 1fr; gap: var(--s6); }
  .portrait-col { order: -1; justify-self: stretch; max-width: none; }
  .portrait { flex: none; aspect-ratio: 4 / 3; }
}

/* Stream list on the home page */
.streams { list-style: none; margin: 0; padding: 0; display: grid; }
.streams li { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: var(--s3) var(--s6); align-items: baseline; padding-block: var(--s5); border-bottom: 1px solid var(--line); }
.streams li:first-child { border-top: 1px solid var(--line); }
.streams h3 a { color: var(--slate); text-decoration: none; }
.streams h3 a:hover { color: var(--river); }
.streams .from { font-family: var(--font-display); font-weight: 500; font-size: var(--t-sm); color: var(--text-2); white-space: nowrap; }
@media (max-width: 800px) { .streams li { grid-template-columns: 1fr; gap: var(--s2); } }

/* Two-column text block */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s5) var(--s7); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s3); }
.facts li { padding-left: var(--s5); position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 12px; height: 2px; background: var(--river); }

/* Packages table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: var(--s4) var(--s4) var(--s4) 0; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-display); font-weight: 700; font-size: var(--t-sm); color: var(--text-2); }
td:first-child { font-family: var(--font-display); font-weight: 700; min-width: 11rem; }
td.price { font-family: var(--font-display); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; left: -9999px; }
  tr { padding-block: var(--s4); border-bottom: 1px solid var(--line); display: grid; gap: var(--s1); }
  td { border: 0; padding: 0; }
  td:first-child { font-size: var(--t-lg); }
  td.price::before { content: attr(data-label) ": "; font-weight: 500; color: var(--text-2); }
}

/* At a glance (service page heroes) */
.glance { margin: 0; display: grid; gap: var(--s4); align-content: start; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.glance div { display: grid; gap: var(--s1); }
.glance dt { font-family: var(--font-display); font-weight: 700; font-size: var(--t-sm); color: var(--river); }
.glance dd { margin: 0; }

/* Sequence (real steps only) */
.steps { margin: 0; padding-left: 1.4em; display: grid; gap: var(--s3); }
.steps li::marker { font-family: var(--font-display); font-weight: 700; color: var(--river); }

/* Sample placeholders */
.samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s5); }
.sample { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); display: grid; gap: var(--s2); align-content: start; min-width: 0; }

/* Call to action band */
.cta { background: var(--slate); color: var(--mist); }
.cta .wrap { padding-block: var(--s8); display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7); align-items: center; justify-content: space-between; }
.cta h2 { color: var(--mist); }
.cta p { color: color-mix(in srgb, var(--mist) 82%, var(--slate)); }
.cta .btn { background: var(--mist); color: var(--slate); border-color: var(--mist); }
.cta .btn:hover { background: var(--surface); border-color: var(--surface); color: var(--river); }



/* Footer */
.site-footer { padding-block: var(--s7) 0; }
.site-footer .range { margin-top: var(--s7); line-height: 0; }
.site-footer .range svg { display: block; width: 100%; height: clamp(72px, 11vw, 160px); }
.range .r1 { fill: color-mix(in srgb, var(--river) 18%, var(--mist)); }
.range .r2 { fill: color-mix(in srgb, var(--river) 42%, var(--mist)); }
.range .r3 { fill: var(--slate); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s7); justify-content: space-between; font-size: var(--t-sm); color: var(--text-2); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-family: var(--font-display); }
.site-footer a { color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--river); }

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

/* Home hero: headline + buttons centred beside the photo; bio sits below */
.hero-home .wrap { align-items: center; }
.hero-home .portrait-col { align-self: center; }
.hero-home .hero-copy { margin-top: calc(48px + var(--s3)); } /* offsets the greeting so the copy centres on the photo itself */
.hero-home .portrait { flex: none; aspect-ratio: 4 / 5; }
.hero-home { padding-block-end: var(--s6); }
.intro { padding-block-end: var(--s5); }
.intro .lead { max-width: none; } /* Mark asked for the bio to span the page */
.hero-home .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.hero-home .portrait-col { order: -1; justify-self: start; }
.hero-home .hello { align-self: flex-start; margin-right: 0; margin-left: -6px; }
@media (max-width: 800px) {
  .hero-home .portrait { aspect-ratio: 4 / 3; }
  .hero-home { padding-block-end: var(--s5); }
  .hero-home .hero-copy { margin-top: 0; }
  .hero-home .wrap { grid-template-columns: 1fr; }
  .hero-home .portrait-col { justify-self: stretch; }
}

/* Service page heroes: the action lives at the foot of the "At a glance" card */
.hero .wrap:has(.glance-card) { align-items: center; }
.glance-card { display: grid; gap: var(--s5); align-content: start; padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.glance-card .glance { padding: 0; background: none; border: 0; border-radius: 0; }
.btn-block { justify-self: stretch; justify-content: center; text-align: center; }
