/*
 * agelane.com: the product's "Warm daylight" (warm paper, deep ink, lane green
 * for the next action). Tokens are the dashboard's (apps/dashboard/src/styles.css).
 */

@font-face {
  font-family: "Figtree Variable";
  src: url("/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Variable";
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #f6f2ea;
  --surface: #fffdf8;
  --sunk: #efe9dd;
  --ink: #1b1f23;
  --ink-2: #4a4f55;
  --ink-3: #6a665e;
  --line: #e2dacb;
  --line-strong: #c9bfac;
  --lane: #1f7a4d;
  --lane-press: #155c39;

  --font-display: "Fraunces Variable", Georgia, serif;
  --font-body: "Figtree Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 120px);

  color-scheme: light;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 24px;
}
body {
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--lane);
  outline-offset: 3px;
}
a {
  color: var(--lane);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--lane-press);
  text-decoration-thickness: 2px;
}
p {
  margin: 0 0 1em;
  max-width: 36em;
  text-wrap: pretty;
}
h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.7rem);
}
h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}
h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  line-height: 1.35;
}
.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
main > section {
  padding-block: var(--section);
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* -- Header and footer ------------------------------------------------------ */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 18px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.brand::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--lane);
}
.site-header nav {
  display: flex;
  gap: 4px 24px;
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  font-weight: 550;
  text-decoration: none;
}
.site-header nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 32px;
  padding-block: 32px;
  color: var(--ink-2);
  font-size: 0.94rem;
}
.site-footer p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  min-height: 44px;
  margin: 0;
}

/* -- Hero ------------------------------------------------------------------- */

main > .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(28px, 4vw, 56px) calc(var(--section) / 2);
}
.lead {
  margin: 24px 0 32px;
  max-width: 31em;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--lane);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
.button:hover {
  background: var(--lane-press);
  color: #fff;
}
.phone {
  display: block;
  justify-self: end;
  width: min(100%, 310px);
  height: auto;
  border: 9px solid var(--ink);
  border-radius: 42px;
  box-shadow: 0 28px 56px -20px rgb(27 31 35 / 0.32);
}

/* -- Sections --------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: start;
}
.band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.section-lead {
  margin: 16px 0 32px;
  font-size: 1.08rem;
  color: var(--ink-2);
}
.note {
  margin: 28px 0 0;
  color: var(--ink-3);
  font-size: 0.94rem;
}

.steps {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0 0 28px 56px;
  counter-increment: step;
}
.steps li:last-child {
  padding-bottom: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -4px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--lane);
  border-radius: 50%;
  color: var(--lane);
  font-weight: 650;
}
/* The lane that joins the steps. */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 38px;
  bottom: 10px;
  width: 1.5px;
  background: var(--line-strong);
}
.steps p {
  margin: 0;
  color: var(--ink-2);
}

figure {
  margin: 0;
  min-width: 0;
}
pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  border-radius: 18px;
  background: var(--ink);
  color: #f3eee3;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
}
figcaption {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.94rem;
}

.checks {
  margin: 32px 0 0;
}
.checks > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 4px 32px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.checks dt {
  font-weight: 650;
}
.checks dd {
  margin: 0;
  max-width: 38em;
  color: var(--ink-2);
}

.prices {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.prices th,
.prices td {
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
}
.prices thead th {
  padding-block: 10px;
  color: var(--ink-3);
  font-size: 0.94rem;
  font-weight: 550;
}
.prices tbody th {
  font-size: 1.12rem;
  font-weight: 650;
}
.prices td:nth-child(2) {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.prose {
  max-width: 800px;
  padding-block: clamp(28px, 4vw, 56px) calc(var(--section) / 2);
}
.prose h1 {
  font-size: clamp(2rem, 4.4vw, 2.8rem);
}
.prose h2 {
  margin: 40px 0 10px;
  font-size: 1.4rem;
}
.prose .note {
  margin: 14px 0 24px;
}

@media (max-width: 820px) {
  main > .hero,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .phone {
    justify-self: center;
    width: min(76%, 280px);
  }
  .checks > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Each plan becomes a block: four columns of prices don't fit a phone. */
@media (max-width: 620px) {
  .prices,
  .prices tbody,
  .prices tr,
  .prices tbody th,
  .prices td {
    display: block;
  }
  .prices thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .prices tr {
    padding: 18px 0;
    border-bottom: 1px solid var(--line-strong);
  }
  .prices tbody th,
  .prices td {
    padding: 2px 0;
    border: 0;
  }
  .prices td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }
  .prices td::before {
    content: attr(data-label);
    color: var(--ink-2);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
  }
}
