/* ============================================================
   Tearoff — landing page
   Palette pulled straight from the app theme (planner_theme.dart)
   ============================================================ */
:root {
  --paper:        #F9F7F3;
  --paper-warm:   #F5F2EC;
  --paper-edge:   #EFEBE4;
  --edge-tint:    #D6D0C8;
  --ink:          #262626;
  --ink-soft:     #4A443C;
  --ink-faint:    #6E665B;
  --gold-deep:    #876819;
  --gold:         #C8A96E;
  --gold-warm:    #B8945A;
  --line:         #E4DFD7;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --shadow-card: 0 22px 50px -28px rgba(91, 70, 32, 0.45);
  --shadow-soft: 0 12px 30px -20px rgba(91, 70, 32, 0.35);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--edge-tint);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

:focus-visible {
  outline: 2.5px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 1.1rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  color: var(--ink);
}

.section-lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0;
}

.section-head { max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--edge-tint);
}
.btn--ghost:hover { border-color: var(--gold-warm); background: rgba(200,169,110,0.08); }

.btn--small { padding: 0.6rem 1.05rem; font-size: 0.88rem; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  background: rgba(249, 247, 243, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.brand__mark { display: inline-flex; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
}
.site-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.btn { color: var(--paper); }
.site-nav a.btn:hover { color: var(--paper); }

@media (max-width: 620px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ============================================================
   "Page" sections — each section is a torn planner sheet
   ============================================================ */
.page {
  background: var(--paper);
  padding: clamp(3.25rem, 8vw, 6rem) var(--pad);
}
.page > * { max-width: var(--maxw); margin-inline: auto; }

/* ---------- The signature: a perforated tear edge ---------- */
.tear {
  position: relative;
  height: 26px;
  background: var(--paper);
  /* scalloped bite taken out of the bottom of the sheet above */
  -webkit-mask: radial-gradient(circle 12px at 12px 26px, transparent 11px, #000 12px) repeat-x;
  mask: radial-gradient(circle 12px at 12px 26px, transparent 11px, #000 12px) repeat-x;
  -webkit-mask-size: 24px 26px;
  mask-size: 24px 26px;
}
.tear::after {
  /* dotted gold tear guideline sitting just above the scallops */
  content: "";
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  top: 7px;
  height: 0;
  border-top: 2px dotted var(--gold-warm);
  opacity: 0.5;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.hero__copy { max-width: 34rem; }

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 1.4rem;
  color: var(--ink);
}
.hero__title em {
  font-style: italic;
  color: var(--gold-deep);
}

.hero__lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  margin: 0 0 2rem;
  max-width: 42ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

.hero__note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
  margin: 0;
}

/* ---------- Hero artwork: the planner page mockup ---------- */
.hero__art {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}
.planner {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 380px);
  aspect-ratio: 5 / 6;
  min-height: 420px;
}
.planner__back {
  position: absolute;
  inset: 6% 4% -2% 8%;
  background: #ECE5D7;
  border-radius: 18px;
  transform: rotate(-5deg);
  box-shadow: var(--shadow-card);
}
.planner__page {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 34%;
  background: linear-gradient(180deg, #FCFAF6, #F4F0E8);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transform: rotate(1.5deg);
}
.planner__body { padding: 12% 8% 8%; }
.planner__pill {
  width: 58%;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--gold);
  margin-bottom: 12%;
}
.planner__lines { display: flex; flex-direction: column; gap: 0.85rem; }
.planner__lines span {
  height: 0.55rem;
  border-radius: 999px;
  background: #E1D7C4;
}

.planner__perf {
  position: absolute;
  top: 0; bottom: 0;
  right: 34%;
  width: 14px;
  transform: translateX(50%);
  background:
    radial-gradient(circle 5px at 7px 0, transparent 4.5px, transparent 5px) 0 0/100% 100%,
    radial-gradient(circle 5px at 7px 12px, #F7F3EB 4.5px, transparent 5px) 0 0/14px 24px repeat-y;
  z-index: 2;
}

.planner__strip {
  position: relative;
  background: linear-gradient(160deg, #CBAC71, #B8945A);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14%;
  padding: 12% 0;
}
.tick {
  width: 34%;
  aspect-ratio: 1;
  background: #FBF8F1;
  border-radius: 8px;
  color: var(--gold-warm);
  display: grid;
  place-items: center;
}
.tick svg { width: 68%; }
.tick--done { color: var(--gold-warm); }
.tick:not(.tick--done) {
  background: transparent;
  border: 3px solid #E7D9BC;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__copy { max-width: none; }
  .hero__art { order: -1; }
  .planner { width: min(72%, 300px); }
}

/* ============================================================
   Ritual
   ============================================================ */
.steps {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  counter-reset: step;
}
.step {
  position: relative;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.step p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}

.ritual__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.ritual-card {
  position: relative;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 16px;
  border-left: 4px solid var(--gold);
}
.ritual-card--pm { border-left-color: var(--ink-soft); }

.ritual-card__kicker {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.75rem;
}
.ritual-card--pm .ritual-card__kicker { color: var(--ink-soft); }

.ritual-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.checklist { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.7rem;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.15em;
  width: 1.15rem; height: 1.15rem;
  border-radius: 5px;
  background: var(--paper);
  border: 2px solid var(--gold);
  box-sizing: border-box;
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 0.36rem; top: 0.34em;
  width: 0.32rem; height: 0.58rem;
  border: solid var(--gold-warm);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg);
}
.ritual-card--pm .checklist li::before { border-color: var(--ink-faint); }
.ritual-card--pm .checklist li::after { border-color: var(--ink-soft); }

.ritual-card__foot {
  font-size: 0.9rem;
  font-style: italic;
  font-family: var(--font-display);
  color: var(--ink-faint);
  margin: 0;
}

@media (max-width: 720px) {
  .ritual__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Features
   ============================================================ */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(2rem, 4vw, 3rem);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.feature {
  background: var(--paper);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.feature__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

@media (max-width: 820px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .features__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Pricing
   ============================================================ */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.85rem, 2vw, 1.25rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.4rem;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.plan--featured {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: var(--shadow-card);
}
.plan__flag {
  position: absolute;
  top: -0.75rem;
  left: 1.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.plan__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
}
.plan__price { margin: 0 0 1.25rem; display: flex; align-items: baseline; gap: 0.15rem; }
.plan__amount {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.plan__per { font-size: 0.9rem; color: var(--ink-faint); }
.plan--featured .plan__per { color: #C9C1B2; }

.plan__annual {
  margin: -0.9rem 0 1.25rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.plan--featured .plan__annual { color: #D8D1C4; }
.plan__annual b { font-weight: 600; }
.plan__save {
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}

.plan__list { list-style: none; margin: 0; padding: 0; }
.plan__list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.plan--featured .plan__list li { color: #D8D1C4; }
.plan__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
}

.pricing__foot {
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

@media (max-width: 880px) {
  .pricing__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .pricing__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq__list {
  margin-top: clamp(2rem, 4vw, 3rem);
  max-width: 70ch;
  border-top: 1px solid var(--line);
}
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold-deep);
  transition: transform 0.2s ease;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item summary:hover { color: var(--gold-deep); }
.faq__item summary:focus-visible {
  outline: 2.5px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}
.faq__item p {
  margin: 0;
  padding: 0 2.5rem 1.35rem 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ============================================================
   Waitlist
   ============================================================ */
.waitlist { background: var(--paper-warm); text-align: center; }
.waitlist__inner { max-width: 40rem; }
.waitlist .eyebrow,
.waitlist .section-lede { margin-inline: auto; }
.waitlist .section-lede { max-width: 44ch; }

.waitlist__form {
  display: flex;
  gap: 0.6rem;
  max-width: 30rem;
  margin: 2rem auto 0;
}
.waitlist__form input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--edge-tint);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}
.waitlist__form input::placeholder { color: var(--ink-faint); }
.waitlist__form input:focus-visible { border-color: var(--gold-deep); outline: none; }

.waitlist__status {
  min-height: 1.4rem;
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--gold-deep);
  font-weight: 500;
}
.waitlist__status[data-state="error"] { color: #A6402E; }

@media (max-width: 480px) {
  .waitlist__form { flex-direction: column; border-radius: 16px; }
  .waitlist__form input, .waitlist__form .btn { width: 100%; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--pad);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 2rem;
  align-items: start;
}
.site-footer__brand .brand__word { color: var(--paper); font-size: 1.4rem; }
.site-footer__brand p { margin: 0.3rem 0 0; color: #A79E8F; font-size: 0.9rem; }

.site-footer__nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer__nav a {
  text-decoration: none;
  color: #C9C1B2;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.site-footer__nav a:hover { color: var(--paper); }

.site-footer__legal {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid #474139;
  color: #897F72;
  font-size: 0.82rem;
}

@media (max-width: 620px) {
  .site-footer { grid-template-columns: 1fr; }
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
