:root {
  --paper: #fbfaf6;
  --paper-warm: #f4efe5;
  --ink: #22201d;
  --muted: #6f6a62;
  --line: #292620;
  --green: #77b985;
  --green-soft: #dceedd;
  --yellow: #f4d17b;
  --coral: #ee9a86;
  --blue: #9ec5dc;
  --white: #fffdf8;
  --shadow: 0 18px 40px rgba(50, 44, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(34, 32, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 32, 29, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  border-radius: 6px;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  padding: 14px 0;
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: blur(12px);
}

.brand,
.nav-links,
.nav-action {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 750;
  text-decoration: none;
  min-height: 44px;
}

.brand-mark {
  position: relative;
  display: block;
  width: 58px;
  height: 44px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.brand-mark img {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 122px;
  height: 82px;
  object-fit: cover;
  object-position: 60% 42%;
  transform: translate(-50%, -50%);
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a,
.nav-action,
.price-ticket a {
  text-decoration: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.nav-action,
.signup-form button,
.settings-form button,
.daily-form button,
.account-panel button,
.price-ticket a {
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 7px 6px 9px 5px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 4px 4px 0 var(--blue);
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.nav-action {
  padding: 10px 16px;
}

.nav-action:hover,
.nav-action:focus-visible,
.signup-form button:hover,
.settings-form button:hover,
.daily-form button:hover,
.account-panel button:hover,
.signup-form button:focus-visible,
.settings-form button:focus-visible,
.daily-form button:focus-visible,
.account-panel button:focus-visible,
.price-ticket a:hover,
.price-ticket a:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--blue);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.88fr);
  align-items: center;
  gap: clamp(32px, 7vw, 80px);
  width: min(1120px, calc(100% - 32px));
  min-height: calc(86dvh - 72px);
  margin: 0 auto;
  padding: 54px 0 46px;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  color: rgba(34, 32, 29, 0.28);
  font-family: Georgia, serif;
  font-size: clamp(4rem, 11vw, 8.5rem);
  line-height: 1;
}

.hero::before {
  content: "{";
  left: -24px;
  top: 12%;
  transform: rotate(-8deg);
}

.hero::after {
  content: ")";
  right: 2%;
  bottom: 8%;
  transform: rotate(12deg);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.05;
}

h1 {
  max-width: 100%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 10vw, 7.4rem);
  font-weight: 700;
  overflow-wrap: normal;
  word-break: keep-all;
}

.hero-line {
  max-width: 18ch;
  margin: 6px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3.3vw, 2.9rem);
  line-height: 1.08;
}

.hero-text {
  max-width: 36rem;
  margin: 22px 0 0;
  color: #3f3a33;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.signup-form {
  width: min(100%, 560px);
  margin-top: 30px;
}

.signup-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 720;
}

.form-row {
  display: flex;
  gap: 10px;
}

.signup-form input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 6px 8px 5px 9px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: 0 14px;
}

.signup-form input:focus,
.settings-form input:focus,
.daily-form input:focus,
.daily-form textarea:focus,
.signup-form button:focus-visible,
.settings-form button:focus-visible,
.daily-form button:focus-visible,
.account-panel button:focus-visible,
.nav-action:focus-visible,
.price-ticket a:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.signup-form button {
  flex: 0 0 auto;
  padding: 0 18px;
  font: inherit;
}

.form-note {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.phone-sheet {
  width: min(100%, 392px);
  margin-left: auto;
  padding: 22px;
  border: 2px solid var(--line);
  border-radius: 8px 6px 10px 7px;
  background: var(--white);
  box-shadow: var(--shadow), 8px 8px 0 var(--green-soft);
  transform: rotate(1.2deg);
}

.phone-top,
.recap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.phone-top {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
}

.tiny-pill,
.trial {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--green-soft);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.day {
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 7px 5px 8px 6px;
  background: var(--white);
  font-variant-numeric: tabular-nums;
  font-weight: 780;
}

.day:nth-child(3n) {
  transform: rotate(-1.5deg);
}

.day:nth-child(4n) {
  transform: rotate(1.2deg);
}

.day.sober {
  background: var(--green-soft);
}

.day.light {
  background: #f8e6a7;
}

.day.medium {
  background: var(--coral);
}

.day.heavy {
  background: #d96c5d;
  color: var(--white);
}

.day.muted,
.day.empty {
  color: #9b958b;
  border-style: dashed;
}

.streak-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px dashed rgba(34, 32, 29, 0.32);
}

.streak-note p {
  margin: 0;
}

.spark-line {
  flex: 0 0 50px;
  height: 22px;
  border-bottom: 4px solid var(--green);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.hand-note {
  position: absolute;
  right: 220px;
  bottom: 6px;
  max-width: 13ch;
  margin: 0;
  color: var(--muted);
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: 1.08rem;
  transform: rotate(-8deg);
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 28px;
}

.proof-strip div,
.step,
.notebook-panel,
.price-ticket {
  border: 2px solid var(--line);
  border-radius: 8px 6px 7px 5px;
  background: rgba(255, 253, 248, 0.86);
}

.proof-strip div {
  min-height: 132px;
  padding: 18px;
}

.metric {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
}

.proof-strip p {
  margin: 10px 0 0;
  color: var(--muted);
}

.split-section,
.app-preview,
.pricing,
.privacy {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
  border-top: 2px dashed rgba(34, 32, 29, 0.3);
}

h2 {
  max-width: 13ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5.5vw, 4.9rem);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step {
  min-height: 220px;
  padding: 18px;
}

.step:nth-child(2) {
  transform: rotate(-1deg);
}

.step:nth-child(3) {
  transform: rotate(1deg);
}

.step-number {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: 24px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 800;
}

h3 {
  font-size: 1.18rem;
}

.step p,
.preview-copy p,
.price-ticket p,
.privacy-list p {
  color: var(--muted);
}

.app-preview {
  align-items: center;
}

.preview-copy p {
  max-width: 34rem;
  margin: 18px 0 0;
  font-size: 1.06rem;
}

.notebook-panel {
  padding: 18px;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--white) 0,
      var(--white) 39px,
      rgba(34, 32, 29, 0.08) 40px
    );
  box-shadow: 7px 7px 0 var(--yellow);
}

.recap-row {
  min-height: 46px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(34, 32, 29, 0.16);
}

.recap-row strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.recap-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  font-size: 1.15rem;
  transform: rotate(-1deg);
}

.pricing {
  align-items: center;
}

.price-ticket {
  padding: 24px;
  box-shadow: 8px 8px 0 var(--blue);
}

.price-ticket div {
  margin: 18px 0 8px;
}

.price-ticket strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 1;
}

.price-ticket a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 10px 18px;
}

.privacy-list {
  display: grid;
  gap: 12px;
}

.privacy-list p {
  margin: 0;
  padding: 16px 0;
  border-bottom: 2px dashed rgba(34, 32, 29, 0.22);
}

.privacy-list a,
.site-footer a {
  color: var(--ink);
  font-weight: 760;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.app-shell {
  border-top: 2px dashed rgba(34, 32, 29, 0.3);
}

.app-heading,
.onboarding-panel,
.app-grid,
.sectionless-grid,
.panel-top,
.button-row {
  display: grid;
  gap: 18px;
}

.app-heading {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.42fr);
  align-items: end;
}

.trial-status,
.onboarding-panel,
.log-panel,
.calendar-panel,
.account-panel,
.stats-strip article {
  border: 2px solid var(--line);
  border-radius: 8px 6px 7px 5px;
  background: rgba(255, 253, 248, 0.9);
}

.trial-status {
  padding: 16px;
  box-shadow: 5px 5px 0 var(--yellow);
}

.trial-status span,
.trial-status strong {
  display: block;
}

.trial-status span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.trial-status strong {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
}

.onboarding-panel {
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.6fr);
  align-items: start;
  margin-top: 26px;
  padding: 20px;
  box-shadow: 6px 6px 0 var(--green-soft);
}

.onboarding-panel h3,
.log-panel h3,
.calendar-panel h3,
.app-recap h3,
.account-panel h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.onboarding-panel p,
.helper-copy,
.account-panel p {
  color: var(--muted);
}

.settings-form,
.daily-form {
  display: grid;
  gap: 10px;
}

.settings-form label,
.daily-form label {
  font-weight: 720;
}

.settings-form input:not([type="checkbox"]),
.daily-form input,
.daily-form textarea {
  width: 100%;
  min-height: 46px;
  border: 2px solid var(--line);
  border-radius: 6px 8px 5px 9px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
}

.daily-form textarea {
  resize: vertical;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.check-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.app-grid {
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  align-items: start;
  margin-top: 24px;
}

.log-panel,
.calendar-panel,
.account-panel {
  padding: 20px;
}

.button-row {
  grid-template-columns: repeat(2, minmax(0, max-content));
  align-items: center;
}

.daily-form button,
.settings-form button,
.account-panel button {
  padding: 9px 14px;
  font: inherit;
}

.daily-form .ghost-button,
.account-panel .ghost-button {
  background: var(--white);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--green-soft);
}

.account-panel .danger-button {
  background: #f7d4ca;
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--coral);
}

.panel-top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  margin-bottom: 16px;
}

.month-controls {
  display: inline-grid;
  grid-template-columns: 44px minmax(120px, auto) 44px;
  align-items: center;
  gap: 8px;
  font-weight: 760;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.55rem;
  cursor: pointer;
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-align: center;
}

.app-calendar .day {
  cursor: pointer;
}

.day.is-today {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.day.future {
  background: var(--paper-warm);
  color: #9b958b;
  border-style: dashed;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 5px 4px 6px 5px;
}

.legend-zero {
  background: var(--green-soft);
}

.legend-light {
  background: #f8e6a7;
}

.legend-medium {
  background: var(--coral);
}

.legend-heavy {
  background: #d96c5d;
}

.legend-empty {
  background: var(--white);
  border-style: dashed !important;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stats-strip article {
  min-height: 126px;
  padding: 14px;
}

.stats-strip span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 700;
  line-height: 1;
}

.stats-strip p {
  margin: 10px 0 0;
  color: var(--muted);
}

.sectionless-grid {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  align-items: stretch;
  margin-top: 24px;
}

.app-recap {
  box-shadow: 6px 6px 0 var(--yellow);
}

.recap-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.recap-list .recap-row {
  min-height: 40px;
}

.account-panel {
  box-shadow: 6px 6px 0 var(--blue);
}

.is-submitted input {
  border-color: var(--green);
}

.daily-form input:disabled,
.daily-form textarea:disabled,
.daily-form button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 42px;
  color: var(--muted);
  border-top: 2px solid rgba(34, 32, 29, 0.18);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .hero,
  .split-section,
  .app-preview,
  .pricing,
  .privacy,
  .app-heading,
  .onboarding-panel,
  .app-grid,
  .sectionless-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-visual {
    min-height: 440px;
  }

  .phone-sheet {
    margin: 0 auto;
  }

  .hand-note {
    right: 10%;
  }

  .steps,
  .proof-strip,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .step {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: min(100% - 24px, 1120px);
  }

  .nav-action {
    padding-inline: 12px;
  }

  .hero,
  .section {
    width: min(100% - 24px, 1120px);
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .form-row {
    flex-direction: column;
  }

  .signup-form button {
    width: 100%;
  }

  .panel-top,
  .button-row {
    grid-template-columns: 1fr;
  }

  .daily-form button,
  .settings-form button,
  .account-panel button,
  .price-ticket a {
    width: 100%;
    justify-content: center;
  }

  .month-controls {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .weekday-row,
  .app-calendar {
    gap: 5px;
  }

  .phone-sheet {
    padding: 16px;
  }

  .phone-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-grid {
    gap: 6px;
  }

  .day {
    font-size: 0.86rem;
  }

  .hero-visual {
    min-height: 390px;
  }

  .hand-note {
    display: none;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
