/* Meltemi Labs. Tokens come from brand/README.md. */
@font-face {
  font-family: "Anybody";
  src: url("/fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: block;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #0E2A47;      /* Aegean ink */
  --blue: #1F5FA8;     /* working blue */
  --sea: #6FA3D8;
  --spray: #D6E6EF;
  --wash: #F7F9FA;     /* whitewash */
  --pumice: #5E6B78;
  --gold: #C9A54E;     /* the one warm accent: the wave line in the hero */
  --display: "Anybody", "Arial Narrow", sans-serif;
  --text: "Public Sans", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 34rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
}
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--wash); color: var(--ink); padding: 0.5rem 0.9rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

.page { padding-inline: var(--gutter); }
.inner { max-width: 72rem; margin-inline: auto; }

h1, h2 { font-family: var(--display); margin: 0; }
h2 {
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.08;
}
h3 { font: 650 1.3rem/1.25 var(--text); margin: 0; }
p { margin: 0; }

/* Buttons */
.button {
  display: inline-block;
  background: var(--wash);
  color: var(--ink);
  font: 650 1.05rem/1 var(--text);
  text-decoration: none;
  padding: 1.05rem 1.6rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.button:hover { background: var(--spray); }
.button.on-light { background: var(--ink); color: var(--wash); }
.button.on-light:hover { background: var(--blue); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--wash);
  padding-top: 1.75rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(14, 42, 71, 0.55) 0%, rgba(14, 42, 71, 0.05) 45%, rgba(14, 42, 71, 0.35) 100%),
    linear-gradient(90deg, rgba(14, 42, 71, 0.6) 0%, rgba(14, 42, 71, 0) 70%),
    var(--ink) url("/img/dusk-boat.webp") 6% 70% / cover no-repeat;
}
.hero .inner { position: relative; z-index: 1; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top img { display: block; height: clamp(1.9rem, 4vw, 2.6rem); width: auto; }
.top a.nav { color: var(--wash); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(247, 249, 250, 0.6); padding-bottom: 2px; }
.top a.nav:hover { border-bottom-color: #fff; }

h1 {
  font-stretch: 140%;
  font-weight: 750;
  font-size: clamp(1.95rem, 7.7vw, 7.6rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  margin: clamp(4rem, 12vw, 9rem) 0 0;
  color: #fff;
}
.line { display: block; white-space: nowrap; }
.half { display: inline; }
.gc { display: inline-block; white-space: pre; }
@media (max-width: 40rem) {
  h1 { font-size: 12.5vw; margin-top: 4.5rem; }
  .half { display: block; }
  .hero { background-size: auto, auto, auto 150%; background-position: 0 0, 0 0, 51% 100%; }
}

/* The gust: slack sail → full sail. Only when JS has split the letters. */
.js h1 { visibility: hidden; }
.js.ready h1 { visibility: visible; }
.js.ready .gc { animation: fill 1.25s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 38ms + 120ms); }
@keyframes fill {
  from { font-stretch: 55%; font-weight: 420; transform: translateY(0.06em); }
  to   { font-stretch: 140%; font-weight: 750; transform: none; }
}

.hero-sub { display: grid; gap: 2rem; margin-top: clamp(1.75rem, 3vw, 2.75rem); padding-bottom: clamp(7rem, 14vw, 11rem); max-width: var(--measure); }
.hero-sub p { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: #fff; text-shadow: 0 1px 14px rgba(14, 42, 71, 0.55); }
.hero-sub .button { justify-self: start; }

/* Wind: drifting streamlines behind the dark sections. */
.wind { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wind path {
  fill: none;
  stroke: var(--spray);
  stroke-opacity: 0.2;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 180 60;
  vector-effect: non-scaling-stroke;
  animation: blow 14s linear infinite;
}
.wind path:nth-child(2) { animation-duration: 18s; stroke-dasharray: 260 90; }
.wind path:nth-child(3) { animation-duration: 11s; stroke-dasharray: 120 70; }
.wind path:nth-child(4) { animation-duration: 21s; stroke-dasharray: 300 110; }
@keyframes blow { to { stroke-dashoffset: -960; } }

/* Waves: the logo's gold and sea lines, drifting along the hero's edge. */
.sea { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(5rem, 11vw, 9rem); pointer-events: none; }
.sea svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
.sea .w1 { animation: drift 38s linear infinite; }
.sea .w2 { animation: drift 26s linear infinite reverse; }
.sea .w3 { animation: drift 52s linear infinite; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.band { padding-block: clamp(3.5rem, 8vw, 7rem); }
.band h2 { max-width: 18ch; }

/* Who we work with: three columns, each with a rule above. */
.cols { display: grid; gap: 2.25rem; margin: clamp(2rem, 4vw, 3.5rem) 0 0; padding: 0; list-style: none; }
.cols li { border-top: 2px solid var(--ink); padding-top: 1.1rem; }
.cols p { margin-top: 0.6rem; color: #2a4461; max-width: 28rem; }

/* Photo interlude: the tagline over the cliff and sea. */
.interlude {
  position: relative;
  color: #fff;
  min-height: clamp(26rem, 52vw, 40rem);
  display: flex;
  align-items: flex-start;
  padding-block: clamp(3rem, 7vw, 6rem);
  background:
    linear-gradient(90deg, rgba(14, 42, 71, 0.72) 0%, rgba(14, 42, 71, 0.25) 55%, rgba(14, 42, 71, 0) 100%),
    var(--ink) url("/img/cliff-sea.webp") 40% 100% / cover no-repeat;
}
.interlude .inner { width: 100%; }
.interlude h2 { font-size: clamp(2.2rem, 5.6vw, 4.6rem); line-height: 1; max-width: 12ch; }
.interlude p { margin-top: 1.25rem; max-width: 26rem; font-size: 1.2rem; text-shadow: 0 1px 14px rgba(14, 42, 71, 0.5); }

/* What we do: a plain list, heading stays in view beside it. */
.do, .faq { background: #fff; }
.do .lead, .faq .lead { align-self: start; margin-bottom: 1.75rem; }
.list { margin: 0; }
.list > div { padding: 1.6rem 0; border-top: 1px solid var(--spray); display: grid; gap: 0.4rem 2.5rem; }
.list > div:first-child { border-top: 2px solid var(--ink); }
.list dt { font: 650 1.3rem/1.25 var(--text); }
.list dd { margin: 0; color: #2a4461; max-width: 30rem; }

/* Questions: native disclosure, no script. */
.qa details { border-top: 1px solid var(--spray); }
.qa details:first-child { border-top: 2px solid var(--ink); }
.qa details:last-child { border-bottom: 1px solid var(--spray); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding: 1.3rem 0; font: 650 1.2rem/1.3 var(--text); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font: 400 1.6rem/1 var(--text); color: var(--blue); flex: none; }
.qa details[open] summary::after { content: "\2212"; }
.qa details p { padding: 0 0 1.4rem; max-width: 32rem; color: #2a4461; }

/* How it works: on deep water, with a line to follow. */
.how {
  position: relative;
  overflow: hidden;
  color: var(--wash);
  background: linear-gradient(rgba(14, 42, 71, 0.84), rgba(14, 42, 71, 0.9)), var(--ink) url("/img/deep-sea.webp") center / cover no-repeat;
}
.how .inner { position: relative; z-index: 1; }
.how h2 { color: #fff; }
.steps { margin: clamp(2rem, 4vw, 3.5rem) 0 0; padding: 0; list-style: none; display: grid; gap: 2.25rem; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 2.25rem; border-left: 1px solid rgba(214, 230, 239, 0.4); }
.steps li::before {
  content: "";
  position: absolute; left: -6px; top: 0.45rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--sea);
}
.steps h3 { color: #fff; }
.steps h3::before { content: counter(s) ". "; color: var(--sea); }
.steps p { color: var(--spray); margin-top: 0.4rem; max-width: 24rem; }
.promises { margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 1.75rem 0 0; list-style: none; border-top: 1px solid rgba(214, 230, 239, 0.3); display: grid; gap: 0.6rem 3rem; color: var(--spray); }
.promises li { max-width: 26rem; }

/* Mobile: a contact button that appears once the hero one is gone. */
.sticky-cta { position: fixed; right: 1rem; bottom: 1rem; z-index: 5; background: var(--blue); color: #fff; box-shadow: 0 6px 20px rgba(14, 42, 71, 0.35); border: 1px solid rgba(255, 255, 255, 0.35); opacity: 0; visibility: hidden; transform: translateY(0.75rem); transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s; }
.sticky-cta:hover { background: var(--ink); }
.sticky-cta.show { opacity: 1; visibility: visible; transform: none; }
@media (min-width: 52rem) { .sticky-cta { display: none; } }

.notfound .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.top .logo { display: block; }

/* ---------- Contact ---------- */
.contact .inner { display: grid; gap: 1.75rem; justify-items: start; }
.contact h2 { font-size: clamp(2rem, 5.2vw, 4rem); line-height: 1.02; max-width: 16ch; }
.contact p { max-width: var(--measure); color: #2a4461; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--spray); padding-block: 2.25rem 3rem; color: var(--pumice); font-size: 0.95rem; }
.foot .inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; }
.foot img { height: 2.4rem; width: auto; }
.foot p:first-of-type { margin-right: auto; font-weight: 600; color: var(--ink); }
.foot a { color: var(--pumice); }
.foot a:hover { color: var(--ink); }

/* ---------- Legal pages ---------- */
.doc-top { background: var(--ink); padding-block: 1.5rem; }
.doc-top img { display: block; height: 2.2rem; width: auto; }
.doc-main { padding-block: clamp(2.5rem, 6vw, 5rem); }
.doc-main .inner > * { max-width: 44rem; }
.doc-main h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 1.25rem; color: var(--ink); visibility: visible; }
.doc-main h2 { font-size: 1.35rem; font-stretch: 120%; margin: 2.5rem 0 0.6rem; }
.doc-main p, .doc-main li { max-width: var(--measure); }
.doc-main ul { padding-left: 1.2rem; }
.doc-main li { margin-bottom: 0.5rem; }

/* ---------- Wider screens ---------- */
@media (min-width: 52rem) {
  .cols { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .do .inner, .faq .inner { display: grid; grid-template-columns: 1fr 1.8fr; gap: 5rem; }
  .do .lead, .faq .lead { position: sticky; top: 2.5rem; margin-bottom: 0; }
  .list > div { grid-template-columns: 1fr 1.5fr; align-items: baseline; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .steps li { border-left: 0; border-top: 1px solid rgba(214, 230, 239, 0.4); padding: 1.6rem 0 0; }
  .steps li::before { left: 0; top: -6px; }
  .promises { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js h1 { visibility: visible; }
  .js.ready .gc { animation: none; }
  .sea svg { animation: none !important; }
  .wind path { animation: none; }
  .button, .sticky-cta { transition: none; }
}
