/* The Good Things: palette lifted straight from the app (src/constants/theme.ts).
   Warm, cozy: honey, peach, blush and cream. Nothing harsh, nothing cold. */
:root {
  --cream: #FFF8EE;
  --paper: #FFFDF8;
  --honey: #F6B94A;
  --honey-deep: #E89A2C;
  --peach: #FFB59A;
  --blush: #F58F8F;
  --rose: #E86A7A;
  --ink: #4A3428;
  --ink-soft: #8A6F60;
  --ink-faint: #C2AC9C;
  --line: #F0E2D2;
  --night: #2E1F2B;
  --night-2: #4A2C3A;

  --sunrise: linear-gradient(180deg, #FFE3B8 0%, #FFC9A8 55%, #FFB3B3 100%);
  --sunset: linear-gradient(135deg, #F6B94A 0%, #F58F8F 55%, #E86A7A 100%);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito", "Avenir Next", system-ui, -apple-system, sans-serif;

  --shadow: 0 18px 40px -12px rgba(194, 122, 74, .32);
  --shadow-sm: 0 8px 20px -10px rgba(194, 122, 74, .35);
  --radius: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
em { font-style: italic; font-weight: 400; color: var(--rose); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(255, 248, 238, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 19px; }
.brand img { border-radius: 10px; box-shadow: var(--shadow-sm); }
.nav-cta {
  text-decoration: none; font-weight: 800; font-size: 15px;
  padding: 9px 18px; border-radius: 999px; background: var(--ink); color: var(--cream);
  transition: transform .2s;
}
.nav-cta:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  background: var(--sunrise);
  display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center;
  padding: 110px clamp(16px, 6vw, 96px) 80px;
  position: relative;
  overflow: hidden;
}
.hero::after { /* soft sun glow */
  content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  right: -18vmax; top: -22vmax; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 62%);
}
.hero > * { position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 800; color: var(--honey-deep); margin: 0 0 14px; }
.hero h1 { font-size: clamp(44px, 8vw, 88px); }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-soft); max-width: 30ch; margin: 22px 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.text-link { font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.text-link:hover { color: var(--ink); }

.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #111; color: #fff; text-decoration: none;
  padding: 11px 22px 11px 18px; border-radius: 14px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .45);
  transition: transform .2s, box-shadow .2s;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(0, 0, 0, .5); }
.store-btn svg { width: 28px; height: 28px; fill: currentColor; }
.store-btn span { display: flex; flex-direction: column; font-size: 21px; font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.store-btn small { font-size: 11px; font-weight: 600; letter-spacing: .02em; opacity: .85; }
.store-btn.big { padding: 15px 30px 15px 24px; border-radius: 18px; }
.store-btn.big svg { width: 34px; height: 34px; }
.store-btn.big span { font-size: 25px; }

/* ---------- Phone mockup ---------- */
.hero-phone { display: flex; flex-direction: column; align-items: center; position: relative; }
.phone {
  width: 300px; max-width: 100%;
  border-radius: 48px; padding: 12px;
  background: #1d1714;
  box-shadow: 0 50px 80px -30px rgba(122, 58, 30, .55), inset 0 0 0 2px #3a2e28;
  position: relative;
  transform: rotate(2deg);
  animation: bob 7s ease-in-out infinite;
}
@keyframes bob { 50% { transform: rotate(2deg) translateY(-10px); } }
.phone-notch { position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 92px; height: 26px; border-radius: 20px; background: #1d1714; z-index: 3; }
.screen {
  border-radius: 38px; overflow: hidden;
  background: linear-gradient(180deg, #FFF8EE, #FFEBD9);
  padding: 56px 20px 22px;
  text-align: left;
}
.app-hello { margin: 0; color: var(--ink-soft); font-size: 14px; }
.app-name { margin: 0; font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; }
.app-streak {
  margin: 12px 0 14px; display: inline-block;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft);
}
.app-count { text-align: center; color: var(--ink-soft); font-size: 13px; margin: 10px 0 14px; font-weight: 600; }
.app-card { background: #fff; border-radius: 20px; padding: 16px; box-shadow: var(--shadow-sm); text-align: center; }
.app-prompt { font-family: var(--serif); font-size: 17px; margin: 0 0 12px; line-height: 1.3; min-height: 2.6em; display: grid; place-items: center; }
.app-btn {
  width: 100%; border: 0; cursor: pointer;
  font: 800 14px var(--sans); color: #fff;
  padding: 12px; border-radius: 999px;
  background: var(--sunset);
  box-shadow: 0 10px 20px -10px rgba(232, 106, 122, .8);
  transition: transform .15s;
}
.app-btn:hover { transform: translateY(-1px); }
.app-btn:active { transform: scale(.97); }
.app-btn:focus-visible, .store-btn:focus-visible, .nav-cta:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }

.try-hint {
  font-family: var(--serif); font-style: italic; color: var(--ink-soft);
  margin: 18px 0 0; font-size: 16px; transition: opacity .4s;
}
.try-hint.gone { opacity: 0; }

.toast {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0;
  background: var(--ink); color: var(--cream);
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  width: max-content; max-width: min(92vw, 340px); text-align: center; pointer-events: none;
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: none; }

/* ---------- The jar (mirrors src/components/jar.tsx) ---------- */
.jar { --w: 196px; width: var(--w); margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.jar-lid { width: 66%; height: 20px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--honey), var(--honey-deep)); }
.jar-neck { width: 60%; height: 9px; background: rgba(255, 255, 255, .7); border-left: 2px solid rgba(194, 122, 74, .25); border-right: 2px solid rgba(194, 122, 74, .25); }
.jar-glass {
  width: 100%; height: calc(var(--w) * 1.08);
  position: relative; overflow: hidden;
  border-radius: 28px 28px 40px 40px;
  background: rgba(255, 255, 255, .6);
  border: 2.5px solid rgba(194, 122, 74, .25);
}
.jar-shine { position: absolute; left: 14px; top: 20px; width: 12px; height: 58%; border-radius: 10px; background: rgba(255, 255, 255, .75); z-index: 2; }
.jar-label {
  position: absolute; top: 22px; left: 50%; z-index: 3;
  transform: translateX(-50%) rotate(-2deg);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 3px 12px; font-family: var(--serif); font-style: italic; font-size: 14px;
}
.note {
  position: absolute; width: 32px; height: 22px; border-radius: 5px;
  box-shadow: 0 1px 2px rgba(122, 74, 42, .18);
  animation: drop .9s cubic-bezier(.3, 1.35, .55, 1) both;
}
.note::after { content: ""; position: absolute; top: 0; right: 0; width: 9px; height: 9px; border-bottom-left-radius: 4px; background: rgba(255, 255, 255, .45); }
@keyframes drop {
  0% { transform: translateY(var(--fall, -260px)) rotate(calc(var(--r) * -2)); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(0) rotate(var(--r)); opacity: 1; }
}

/* ---------- Sections ---------- */
section { padding: clamp(80px, 11vw, 140px) clamp(16px, 6vw, 96px); }
.section-title { font-size: clamp(34px, 5.4vw, 60px); text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }

.steps { list-style: none; padding: 0; margin: 0 auto; max-width: 1100px; display: grid; gap: 22px; grid-template-columns: 1fr; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; position: relative; box-shadow: var(--shadow-sm); }
.step-emoji { font-size: 36px; display: block; margin-bottom: 14px; }
.step-num { position: absolute; top: 24px; right: 26px; font-family: var(--serif); font-style: italic; color: var(--ink-faint); font-size: 22px; }
.step h3 { font-size: 24px; margin-bottom: 8px; }
.step p { margin: 0; color: var(--ink-soft); }

.moods { max-width: 1100px; margin: 64px auto 0; text-align: center; }
.moods-title { font-family: var(--serif); font-size: 22px; margin: 0 0 18px; }
.mood-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.mood {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 28%, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 60%, #fff);
  font-weight: 700; font-size: 14.5px;
  transition: transform .2s;
}
.mood:hover { transform: translateY(-3px) rotate(-1deg); }
.mood b { font-size: 20px; font-weight: 400; }

.features { background: linear-gradient(180deg, var(--cream), #FFEBD9); }
.feature-grid { max-width: 1100px; margin: 0 auto; display: grid; gap: 20px; grid-template-columns: 1fr; }
.feature {
  background: var(--paper); border-radius: var(--radius); padding: 30px 28px;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform .25s;
}
.feature::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--tint); }
.feature:hover { transform: translateY(-4px) rotate(-.4deg); }
.f-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--tint); font-size: 26px; margin-bottom: 16px; transform: rotate(-4deg); }
.feature h3 { font-size: 23px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--ink-soft); }

/* ---------- Story (night) ---------- */
.story {
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 70%, #7A3E4A 100%);
  color: #F8EBDD; position: relative; overflow: hidden;
}
.stars { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #FFE3B8; animation: twinkle var(--t, 3s) ease-in-out infinite var(--dl, 0s); }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }
.story-inner { max-width: 820px; margin: 0 auto; position: relative; }
.eyebrow.light { text-align: center; color: var(--honey); }
.section-title.light em { color: var(--peach); }
.why { max-width: 640px; margin: 0 auto; text-align: center; display: grid; gap: 22px; }
.why p { margin: 0; font-family: var(--serif); font-size: clamp(20px, 2.6vw, 25px); line-height: 1.5; color: #E6D2C3; text-wrap: balance; }
.why p:first-child { font-size: clamp(24px, 3.4vw, 32px); color: #FFF3E4; }
.why .why-turn { font-size: clamp(26px, 3.8vw, 36px); line-height: 1.3; font-style: italic; color: var(--peach); padding: 14px 0; }
.why .why-close { font-family: var(--sans); font-size: 18px; color: #F8EBDD; }
.why-cta { display: flex; justify-content: center; margin-top: 40px; }
.store-btn.light { background: var(--cream); color: var(--ink); box-shadow: 0 14px 34px -12px rgba(255, 200, 150, .45); }

/* ---------- Final CTA ---------- */
.final { background: var(--sunrise); text-align: center; display: flex; flex-direction: column; align-items: center; }
.final-jar img { width: 180px; border-radius: 42px; box-shadow: var(--shadow); animation: bob2 6s ease-in-out infinite; }
@keyframes bob2 { 50% { transform: translateY(-8px) rotate(-2deg); } }
.final h2 { font-size: clamp(34px, 5.4vw, 60px); margin: 36px 0 14px; }
.final p { color: var(--ink-soft); font-size: 19px; margin: 0 0 32px; }

.site-footer {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  padding: 26px clamp(16px, 6vw, 96px); background: var(--cream); color: var(--ink-soft); font-size: 14px;
}
.site-footer p { margin: 0; display: flex; align-items: center; gap: 8px; }
.site-footer img { border-radius: 5px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Larger screens ---------- */
@media (min-width: 760px) {
  .steps, .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.15fr .85fr; }
  .phone { width: 320px; }
  .jar { --w: 206px; }
}
@media (max-width: 400px) {
  .phone { width: 280px; }
  .jar { --w: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
