/* Layout: a road runs down the page, and each feature is a stop along it. */
@font-face {
  font-family: 'Barlow';
  src: url('fonts/barlow-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('fonts/barlow-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1a1d40;
  --muted: #5b5f7b;
  --canvas: #f3f4f9;
  --line: #e6e7ef;
  --white: #ffffff;
  --green: #2f7a45;
  --green-dark: #256239;
  --ground: #17402a;
  --tint: #dcecdf;
  --amber: #b45309;
  --on-ink-muted: #c3c5da;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-right: max(20px, env(safe-area-inset-right, 0px));
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}

a {
  color: var(--green-dark);
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 7vw, 76px);
}

h2 {
  font-size: clamp(32px, 4.5vw, 44px);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-right);
}

/* Header */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 22%;
}

/* Hero */
.hero {
  background: var(--ink);
  color: var(--white);
}

.hero .grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: start;
  padding-block: 40px 0;
}

.hero-copy {
  padding-block: 28px 64px;
}

.lede {
  font-size: 20px;
  color: var(--on-ink-muted);
  max-width: 34em;
  margin: 20px 0 28px;
}

.soon {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
}

.small-print {
  display: block;
  margin-top: 14px;
  font-size: 15px;
  color: var(--on-ink-muted);
}

/* Sample app screen, cut off by the end of the hero like a phone in a pocket */
.phone {
  background: var(--canvas);
  color: var(--ink);
  border: 8px solid #0d0f26;
  border-bottom: 0;
  border-radius: 32px 32px 0 0;
  padding: 18px 14px 20px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 400px;
  width: 100%;
  justify-self: end;
}

.phone-day {
  font-size: 17px;
  font-weight: 500;
  padding: 2px 6px 10px;
}

.card {
  background: var(--white);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(26, 29, 64, 0.1);
}

.card strong {
  display: block;
  font-size: 16px;
  font-weight: 500;
}

.muted {
  color: var(--muted);
}

.leg {
  padding: 8px 10px 8px 28px;
  position: relative;
}

.leg::before {
  content: '↓';
  position: absolute;
  left: 10px;
  color: var(--muted);
}

.leg b {
  display: block;
  font-weight: 500;
}

.sample-label {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 6px 0;
}

/* The road */
.road {
  position: relative;
  padding-block: 72px 32px;
}

.road::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 26px);
  width: 52px;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--white) 0 26px,
      transparent 26px 56px
    ) center / 4px 100% no-repeat,
    var(--ink);
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 104px;
  align-items: center;
  margin-bottom: 72px;
}

.stop:nth-child(even) .stop-copy {
  order: 2;
}

.stop p {
  margin: 12px 0 0;
  color: var(--muted);
}

.leave-card {
  background: var(--ink);
  color: var(--white);
  border-radius: 14px;
  padding: 16px;
}

.leave-card .big {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
}

.leave-card .label {
  font-size: 14px;
  color: var(--on-ink-muted);
}

.leave-card hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 12px 0;
}

.warning {
  color: var(--amber);
  font-weight: 500;
  padding: 0 4px 10px;
}

.stack {
  display: grid;
  gap: 8px;
}

.line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 4px;
}

.line span:last-child {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.card .total {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
}

/* Price */
.price {
  background: var(--ground);
  color: var(--white);
  padding-block: 64px;
}

.price .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.price p {
  color: var(--tint);
  margin: 14px 0 0;
}

.price ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.price li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.price h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: var(--tint);
}

.tiers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

/* Footer */
footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  font-size: 15px;
  padding-block: 28px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

footer a {
  color: var(--white);
}

/* Legal pages */
.doc-head {
  background: var(--ink);
  color: var(--white);
}

.doc {
  max-width: 720px;
  padding-block: 40px 64px;
}

.doc h1 {
  font-size: clamp(38px, 6vw, 52px);
}

.updated {
  color: var(--muted);
  margin: 10px 0 28px;
}

.doc h2 {
  font-size: 28px;
  margin: 36px 0 10px;
}

.doc p,
.doc li {
  max-width: 65ch;
}

.doc p {
  margin: 0 0 14px;
}

.doc ul,
.doc ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 6px;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  background: var(--white);
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--line);
}

th {
  font-weight: 500;
}

/* Details only the owner can fill in. None of these should be left when the site goes live. */
.todo {
  background: #fde68a;
  color: var(--ink);
  padding: 0 4px;
  border-radius: 3px;
}

@media (max-width: 800px) {
  .hero .grid,
  .price .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .grid {
    gap: 0;
  }

  .hero-copy {
    padding-block: 12px 40px;
  }

  .phone {
    justify-self: center;
  }

  /* The road moves to the left edge, and the stops sit beside it. */
  .road::before {
    left: var(--gutter);
    width: 28px;
    background:
      repeating-linear-gradient(
        to bottom,
        var(--white) 0 20px,
        transparent 20px 44px
      ) center / 3px 100% no-repeat,
      var(--ink);
  }

  .stop {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 52px;
    padding-left: 44px;
  }

  .stop:nth-child(even) .stop-copy {
    order: 0;
  }
}

@media (max-width: 480px) {
  .tiers {
    grid-template-columns: minmax(0, 1fr);
  }
}
