/* The app's "mist and pine" palette (web/src/app/globals.css). This module is
   served on its own, so it carries the values it uses rather than importing
   them. color-scheme also themes the scrollbars to match. */
:root {
  color-scheme: light dark;
  --page: #f4f6f4;
  --text: #17211d;
  --surface: #ffffff;
  --subtle: #edf1ee;
  --line: #d9e0db;
  --control-line: #7f8c85;
  --muted: #55635c;
  --accent: #0f6b5c;
  --accent-hover: #0b5548;
  --on-accent: #ffffff;
  --accent-soft: #e1f0ec;
  --accent-strong: #0a4a40;
  --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Lexend", ui-sans-serif, system-ui, sans-serif;
  --content-width: 65rem;
  --card-radius: 10px;
  --control-radius: 6px;
  /* Clears the sticky header when a link jumps to a section. */
  --anchor-offset: 4.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0f1513;
    --text: #e8eeeb;
    --surface: #171f1c;
    --subtle: #1f2925;
    --line: #2c3833;
    --control-line: #66756e;
    --muted: #a3b0aa;
    --accent: #5cc9b5;
    --accent-hover: #7ad6c5;
    --on-accent: #06231e;
    --accent-soft: #16302b;
    --accent-strong: #a6e3d7;
  }
}

*,
::before,
::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip {
  position: absolute;
  left: -999rem;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 2;
  padding: 0.5rem 0.75rem;
  border-radius: var(--control-radius);
  background: var(--surface);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
}

.brand svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.site-nav a:not(.btn) {
  color: var(--muted);
}

.site-nav a:not(.btn):hover {
  color: var(--text);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

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

.btn-ghost {
  background: transparent;
  border-color: var(--control-line);
  color: var(--text);
}

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

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

/* Hero */

.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 2rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin-top: 0.75rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  max-width: 34rem;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.fineprint {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* The mark, enlarged: a drop meeting still water and the rings it leaves. */
.ripple {
  width: 100%;
  max-width: 26rem;
  justify-self: center;
  color: var(--accent);
}

.ripple .ring {
  fill: none;
  stroke: currentColor;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--rest-scale));
  opacity: var(--rest-opacity);
  /* Plays once and settles: motion that loops needs a way to stop it. */
  animation: spread 2.4s ease-out backwards;
}

.ripple .ring:nth-of-type(1) {
  --rest-scale: 1;
  --rest-opacity: 0.3;
}

.ripple .ring:nth-of-type(2) {
  --rest-scale: 0.68;
  --rest-opacity: 0.55;
  animation-delay: 0.7s;
}

.ripple .ring:nth-of-type(3) {
  --rest-scale: 0.36;
  --rest-opacity: 0.9;
  animation-delay: 1.4s;
}

@keyframes spread {
  from {
    transform: scale(0.1);
    opacity: 0;
  }
}

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

  .ripple .ring {
    animation: none;
  }
}

/* Sections */

.section {
  padding: 4.5rem 0;
  scroll-margin-top: var(--anchor-offset);
}

.section-alt {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  margin-top: 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-head p:last-child {
  margin-top: 0.75rem;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
}

.section-alt .card {
  background: var(--page);
}

.card h3 {
  margin-top: 0.375rem;
  font-size: 1.125rem;
}

.card p {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.card ul {
  /* role="list" in the markup: Safari drops list semantics with the markers. */
  margin-top: 1rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-size: 0.875rem;
}

.card li {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.card li + li {
  margin-top: 0.375rem;
}

.card li::before {
  content: "";
  flex: none;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-0.125rem);
}

.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.icon-tile svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 2px solid var(--accent);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.steps h3 {
  margin-top: 0.375rem;
  font-size: 1rem;
}

.steps p {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Closing call to action */

.section-closing {
  padding-top: 0;
}

.cta {
  padding: 3rem 2rem;
  border-radius: var(--card-radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta p {
  max-width: 32rem;
  margin: 0.75rem auto 0;
}

.cta .actions {
  justify-content: center;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.site-footer nav {
  display: flex;
  gap: 1.25rem;
}

.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 56rem) {
  .hero .wrap {
    grid-template-columns: 1fr;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .ripple {
    max-width: 16rem;
    grid-row: 1;
    justify-self: start;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 36rem) {
  .wrap {
    padding: 0 1rem;
  }

  .site-nav .section-link {
    display: none;
  }

  .section {
    padding: 3rem 0;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}
