/* Morning List landing page. Plain CSS, no build step. Mobile first. */

:root {
  /* color */
  --paper: #f5f1e8;
  --paper-2: #ece6d8;
  --card: #fffdf8;
  --ink: #1e1c19;
  --ink-2: #4a453e;
  --ink-3: #6a645a;
  --rule: #d9d1c1;
  --accent: #b8400e;
  --accent-dark: #973309;
  --on-accent: #ffffff;
  --on-ink: #f5f1e8;
  --on-ink-2: #c9c2b4;

  /* type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: 1.3125rem;
  --t-lg: 1.625rem;
  --t-xl: 2.0625rem;
  --t-2xl: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);

  /* space (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* detail */
  --r-1: 4px;
  --r-2: 10px;
  --shadow: 0 1px 0 var(--rule), 0 28px 56px -28px rgba(30, 28, 25, 0.28);
  --wrap: 1160px;
  --gutter: 20px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: var(--mono);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--s-4);
  top: var(--s-4);
  z-index: 10;
  background: var(--card);
  padding: var(--s-3) var(--s-4);
}

/* ---------- header ---------- */

.site-head {
  padding-block: var(--s-5);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.wordmark {
  font-family: var(--serif);
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

.head-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--t-sm);
  font-weight: 600;
}

/* ---------- hero ---------- */

.hero {
  padding-block: var(--s-6) var(--s-8);
}

.hero-grid {
  display: grid;
  gap: var(--s-7);
}

.hero h1 {
  font-family: var(--serif);
  font-size: var(--t-2xl);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin-top: var(--s-4);
}

.hero .lede {
  margin-top: var(--s-4);
  max-width: 34em;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ---------- form ---------- */

.join {
  margin-top: var(--s-6);
  max-width: 30rem;
}

.join-fields {
  display: grid;
  gap: var(--s-3);
}

.field label {
  display: block;
  margin-bottom: var(--s-1);
  font-size: var(--t-sm);
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0 var(--s-4);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-1);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

.field input:hover,
.field select:hover {
  border-color: var(--ink);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(30, 28, 25, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 0;
  border-radius: var(--r-1);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, transform 100ms ease-out;
}

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

.btn:active {
  transform: translateY(1px);
}

.join .btn {
  width: 100%;
  margin-top: var(--s-4);
}

/* Bot trap: off-screen, out of the tab order, hidden from assistive tech. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.join-note {
  margin-top: var(--s-3);
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.join-status {
  margin-top: var(--s-3);
  font-size: var(--t-sm);
  font-weight: 600;
}

.join-status:empty {
  display: none;
}

.join-status[data-state="error"] {
  color: var(--accent-dark);
}

/* ---------- the sample note (signature element) ---------- */

.note-wrap {
  min-width: 0;
  max-width: 34rem;
}

.note-caption {
  margin-bottom: var(--s-3);
}

.note {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 450ms ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-1) var(--s-4);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--ink-2);
}

.note-top {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-5) var(--s-4);
}

.note-count {
  font-family: var(--serif);
  font-size: 5.5rem;
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.note-top p {
  font-family: var(--serif);
  font-size: var(--t-md);
  line-height: 1.2;
}

.note-top small {
  display: block;
  margin-top: var(--s-1);
  font-family: var(--sans);
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.note-section {
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--rule);
}

.note-section h3 {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.note-section h3 b {
  color: var(--accent);
}

.note-section li {
  margin-top: var(--s-3);
  font-size: var(--t-sm);
  line-height: 1.45;
  color: var(--ink-2);
}

.note-section li strong {
  display: block;
  color: var(--ink);
}

.note-section li strong span {
  display: inline-block;
}

.note-foot {
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
  font-size: var(--t-sm);
  color: var(--ink-2);
}

/* ---------- checks ---------- */

.checks {
  padding-block: var(--s-8);
  border-top: 1px solid var(--rule);
}

.section-grid {
  display: grid;
  gap: var(--s-6);
}

.section-head h2,
.band h2,
.terms h2 {
  font-family: var(--serif);
  font-size: var(--t-xl);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin-top: var(--s-3);
}

.section-head p {
  margin-top: var(--s-4);
  max-width: 26em;
  color: var(--ink-2);
}

.check {
  padding-block: var(--s-5);
  border-top: 1px solid var(--rule);
}

.check:first-child {
  border-top: 0;
  padding-top: 0;
}

.check dt {
  font-family: var(--serif);
  font-size: var(--t-lg);
  line-height: 1.2;
}

.check dd {
  margin-top: var(--s-2);
  max-width: 38em;
  color: var(--ink-2);
}

.check .how {
  margin-top: var(--s-3);
  font-family: var(--mono);
  font-size: var(--t-xs);
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- read-only band ---------- */

.band {
  padding-block: var(--s-8);
  background: var(--ink);
  color: var(--on-ink);
}

.band .label {
  color: var(--on-ink-2);
}

.band h2 {
  max-width: 14em;
}

.promises {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-6);
}

.promises li {
  padding-top: var(--s-4);
  border-top: 1px solid rgba(245, 241, 232, 0.28);
  color: var(--on-ink-2);
}

.promises strong {
  display: block;
  margin-bottom: var(--s-1);
  color: var(--on-ink);
  font-weight: 600;
}

.band :focus-visible {
  outline-color: var(--on-ink);
}

/* ---------- steps ---------- */

.steps-section {
  padding-block: var(--s-8) var(--s-7);
}

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-top: 1px solid var(--rule);
}

.steps li:first-child {
  border-top: 0;
  padding-top: 0;
}

.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: var(--t-xl);
  line-height: 1;
  color: var(--accent);
}

.steps h3 {
  font-family: var(--serif);
  font-size: var(--t-lg);
  font-weight: 500;
  line-height: 1.2;
}

.steps p {
  margin-top: var(--s-2);
  max-width: 36em;
  color: var(--ink-2);
}

/* ---------- price and maker ---------- */

.terms {
  padding-block: var(--s-7) var(--s-8);
}

.terms-grid {
  display: grid;
  gap: var(--s-6);
  padding-top: var(--s-7);
  border-top: 1px solid var(--ink);
}

.price {
  margin-top: var(--s-3);
  font-family: var(--serif);
  font-size: var(--t-2xl);
  line-height: 1;
  letter-spacing: -0.02em;
}

.price small {
  font-family: var(--sans);
  font-size: var(--t-base);
  letter-spacing: 0;
  color: var(--ink-2);
}

.terms p {
  margin-top: var(--s-4);
  max-width: 30em;
  color: var(--ink-2);
}

.terms .btn {
  margin-top: var(--s-5);
}

/* ---------- footer ---------- */

.site-foot {
  padding-block: var(--s-6);
  border-top: 1px solid var(--rule);
  font-size: var(--t-sm);
  color: var(--ink-3);
}

.site-foot p + p {
  margin-top: var(--s-2);
}

/* ---------- larger screens ---------- */

@media (min-width: 600px) {
  :root {
    --gutter: 32px;
  }

  .join-fields {
    grid-template-columns: 1.5fr 1fr;
  }

  .join .btn {
    width: auto;
  }

  .hero .lede {
    margin-top: var(--s-5);
    font-size: var(--t-md);
    line-height: 1.5;
  }

  .promises {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-6);
  }
}

@media (min-width: 960px) {
  :root {
    --gutter: 40px;
  }

  .hero {
    padding-block: var(--s-7) var(--s-9);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: var(--s-8);
    align-items: start;
  }

  .hero-copy {
    padding-top: var(--s-6);
  }

  .checks,
  .band {
    padding-block: var(--s-9);
  }

  .steps-section {
    padding-block: var(--s-9) var(--s-8);
  }

  .terms {
    padding-block: var(--s-7) var(--s-10);
  }

  .section-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: var(--s-8);
  }

  .section-head {
    position: sticky;
    top: var(--s-6);
    align-self: start;
  }

  .terms-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-8);
  }
}

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

  .note {
    animation: none;
  }

  .btn,
  .field input,
  .field select {
    transition: none;
  }
}
