/* ─── tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:       #FDF5E8;   /* Chaz cream, matches app background.colorset */
  --ink:      #0E0E10;
  --muted:    rgba(14, 14, 16, 0.62);

  --coral:    #FF6B6B;
  --mustard:  #FFD166;
  --magenta:  #E63995;
  --lime:     #A0E36C;
  --indigo:   #4D5DD9;

  --max-w:    1200px;
  --gutter:   clamp(20px, 5vw, 80px);

  --font-ui:        "Inter", system-ui, -apple-system, sans-serif;
  --font-display:   "Inter Tight", "Inter", system-ui, sans-serif;
  --font-italic:    "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* ─── nav ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.nav__brand img { width: 36px; height: 36px; border-radius: 8px; }

.nav__cta {
  display: inline-block;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease;
}
.nav__cta:hover { transform: translateY(-1px); }

/* ─── section frame ──────────────────────────────────────────────────── */
.section {
  position: relative;
  padding: clamp(60px, 10vw, 140px) var(--gutter);
  overflow: hidden;
}

.section__inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  z-index: 1;
}

.section__inner--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

@media (max-width: 820px) {
  .section__inner--split {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .section__inner--split.section__inner--reverse > .phone { order: 2; }
}

.section__inner--reverse > .copy { order: 2; }
.section__inner--reverse > .phone { order: 1; }
@media (max-width: 820px) {
  .section__inner--reverse > .copy { order: 1; }
  .section__inner--reverse > .phone { order: 2; }
}

.section__inner--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ─── bg-circle (Heartward technique, our palette) ───────────────────── */
.bg-circle {
  position: absolute;
  z-index: 0;
  width: 50vw;
  height: 50vw;
  max-width: 880px;
  max-height: 880px;
  border-radius: 50%;
  background: var(--blob, var(--coral));
  opacity: 0.85;
  pointer-events: none;
}

.bg-circle--right { top: -10vw; right: -18vw; }
.bg-circle--left  { top: -8vw;  left:  -22vw; }

.bg-circle--small {
  width: 22vw;
  height: 22vw;
  max-width: 360px;
  max-height: 360px;
  opacity: 0.9;
}

.bg-circle--left-low { bottom: -8vw; left: -8vw; top: auto; }

/* ─── typography ─────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 0.98;
  font-size: clamp(40px, 6.4vw, 88px);
  margin: 0 0 24px;
}
.display em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.display .wordmark {
  height: 0.95em;
  width: auto;
  vertical-align: -0.12em;
  filter: brightness(0);
}

.display--md { font-size: clamp(34px, 5vw, 64px); margin-bottom: 20px; }
.display--xl { font-size: clamp(48px, 8vw, 120px); }

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  max-width: 36ch;
  margin: 0 0 32px;
  color: var(--muted);
}
.lede--center { text-align: center; max-width: 48ch; }
.lede--invert { color: rgba(253, 245, 232, 0.78); }

p { margin: 0 0 18px; }
section .copy p:not(.lede):not(.fineprint) {
  font-size: 18px;
  line-height: 1.55;
  max-width: 44ch;
  color: var(--ink);
}

.fineprint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}

/* ─── App Store badge ────────────────────────────────────────────────── */
.appstore { display: inline-block; transition: transform 0.15s ease; }
.appstore:hover { transform: translateY(-1px); }
.appstore img { display: block; }

/* ─── phone mockup ───────────────────────────────────────────────────── */
.phone {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone img {
  width: 100%;
  max-width: 360px;
  border-radius: 36px;
  box-shadow:
    0 30px 60px -20px rgba(14, 14, 16, 0.25),
    0 8px 18px -8px rgba(14, 14, 16, 0.18);
}
.phone--tilt img { transform: rotate(5deg); }
@media (max-width: 820px) {
  .phone--tilt img { transform: rotate(3deg); }
  .phone img { max-width: 280px; }
}

/* ─── hero-specific spacing ──────────────────────────────────────────── */
.section--hero { padding-top: clamp(40px, 6vw, 80px); }
.section--hero .copy { display: flex; flex-direction: column; align-items: flex-start; }

/* ─── roasts carousel ────────────────────────────────────────────────── */
.section--roasts { padding: clamp(70px, 10vw, 140px) 0; }
.section--roasts .section__inner { padding: 0 var(--gutter); }

.roasts {
  margin: 56px 0 0;
  padding: 0 var(--gutter) 16px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.roasts::-webkit-scrollbar { display: none; }
.roasts:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.roast {
  scroll-snap-align: start;
  background: var(--ink);
  color: var(--bg);
  border-radius: 28px;
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  aspect-ratio: 4 / 5;
  min-height: 360px;
}
.roast__day {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--coral);
}
.roast p {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0;
}
.roast em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 500;
}
.roast:nth-child(2) .roast__day { color: var(--magenta); }
.roast:nth-child(3) .roast__day { color: var(--mustard); }
.roast:nth-child(4) .roast__day { color: var(--lime); }
.roast:nth-child(5) .roast__day { color: var(--indigo); filter: brightness(1.4); }

@media (min-width: 1024px) {
  .roasts {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    grid-template-columns: repeat(5, 1fr);
    overflow-x: visible;
    padding: 0 var(--gutter);
  }
}

/* ─── CTA section ────────────────────────────────────────────────────── */
.section--cta {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(80px, 14vw, 200px) var(--gutter);
}
.section--cta .display em { color: var(--coral); }

/* ─── footer ─────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(253, 245, 232, 0.6);
  padding: 32px var(--gutter) 48px;
  font-size: 13px;
  border-top: 1px solid rgba(253, 245, 232, 0.08);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__links { display: flex; gap: 18px; }
.footer__links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.footer__links a:hover { border-bottom-color: currentColor; }
.footer__col--right { margin-left: auto; }

@media (max-width: 600px) {
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__col--right { margin-left: 0; }
}

/* ─── intersection-fade ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .section { opacity: 1; }
  .section[data-reveal="pending"] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .section[data-reveal="in"]      { opacity: 1; transform: none; }
}
