@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-wdth-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --chalk: #f4f5f3;
  --ink: #181718;
  --graphite: #54575d;
  --dash: #8d9097;
  --amber: #e5a823;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --gutter: 1rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1, h2, .button, .signin, .tree-head, .moments strong, .start {
  font-family: var(--display);
  font-stretch: 125%;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Page frame */
.top,
.hero,
.points,
.join,
footer {
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.5rem 0.5rem;
}
.home { display: block; width: min(27rem, 100%); }
.home img { display: block; width: 100%; height: auto; }
.signin { font-weight: 700; font-size: 1rem; text-decoration: none; padding: 0.6rem 0; border-bottom: 3px solid var(--ink); }

/* Hero */
.hero {
  display: grid;
  gap: 3rem;
  padding-block: 2rem 4.5rem;
}
h1 {
  margin: 0 0 1.25rem;
  font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.lede { margin: 0 0 1.75rem; font-size: 1.3rem; line-height: 1.5; max-width: 34rem; }
.actions { margin: 0; }
.button {
  display: inline-block;
  background: var(--ink);
  color: var(--chalk);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.95rem 1.75rem;
  border-radius: 0.25rem;
}
.button:hover { background: #34323a; }
.button:focus-visible { outline-color: var(--ink); outline-offset: 4px; }
.note { margin: 1rem 0 0; color: var(--graphite); font-size: 1rem; max-width: 30rem; }

/* The roll tree: you on the left, your partner on the right, one spine between */
.tree {
  margin: 0;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 0.5rem;
  padding: 1.25rem 1rem 1rem;
  max-width: 32rem;
}
.tree-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-weight: 800;
  font-size: 1.05rem;
  padding-bottom: 0.75rem;
}
.tree-head span:last-child { text-align: right; color: var(--graphite); }
.start {
  margin: 0 0 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--graphite);
}
.moments {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
}
.moments::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 3px solid var(--ink);
  transform: translateX(-50%);
}
.moments li {
  position: relative;
  width: calc(50% - 1.25rem);
  padding: 0.55rem 0.75rem;
  border-radius: 0.35rem;
  background: #fff;
  line-height: 1.3;
  font-size: 1rem;
}
.moments li strong { display: block; font-weight: 700; font-size: 0.95rem; }
.moments li span:not(.sr) { color: var(--graphite); font-size: 0.95rem; }
.moments li::after {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 50%;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  transform: translateY(-50%);
}
.moments .me { justify-self: start; border: 2px solid var(--ink); }
.moments .me::after { right: -1.25rem; transform: translate(50%, -50%); }
.moments .them { justify-self: end; border: 2px dashed var(--dash); }
.moments .them::after { left: -1.25rem; transform: translate(-50%, -50%); }
.moments .mid { justify-self: center; width: calc(100% - 3.5rem); text-align: center; border: 2px solid var(--ink); background: var(--chalk); }
.moments .mid::after { display: none; }
.moments .key { border-color: var(--amber); }
.moments .key strong::before { content: '\2605\00a0'; color: var(--amber); }
@media (max-width: 30rem) {
  .tree { padding-inline: 0.75rem; }
  .moments li { width: calc(50% - 1rem); padding: 0.5rem 0.6rem; }
  .moments li strong, .moments li span:not(.sr) { font-size: 0.9rem; }
  .moments .me::after { right: -1rem; }
  .moments .them::after { left: -1rem; }
}
figcaption { margin-top: 1rem; color: var(--graphite); font-size: 0.95rem; line-height: 1.4; }

/* What it does: a heading on the left, the explanation on the right */
.points { display: grid; gap: 2.5rem; padding-block: 1rem 4.5rem; }
.point h2 {
  margin: 0 0 0.5rem;
  font-weight: 800;
  font-size: clamp(1.45rem, 3.4vw, 1.9rem);
  line-height: 1.1;
}
.point p { margin: 0; max-width: 36rem; }

/* The one decorative thing: a white belt with its black bar */
.belt {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.belt span {
  display: block;
  height: 2.25rem;
  background: #fff;
  border-block: 2px solid var(--ink);
  border-radius: 0.2rem;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 6rem 100%;
  background-position: calc(100% - 3rem) 0;
}

.join { padding-block: 4rem 4rem; }
.join h2 { margin: 0 0 0.75rem; font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.75rem); line-height: 1.05; }
.join p { margin: 0 0 1.5rem; max-width: 34rem; }

footer { padding-block: 1.5rem 3rem; color: var(--graphite); font-size: 0.95rem; }
footer p { margin: 0; }

@media (min-width: 60rem) {
  :root { --gutter: 2rem; }
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: 4rem; padding-block: 3rem 6rem; }
  .tree { justify-self: end; width: 100%; }
  .points { grid-template-columns: 1fr 1fr; gap: 3.5rem 4rem; }
}
