/* ========= TOKENS ========= */
:root {
  --bg: #fae5cc;
  --bg-2: #f2d4b0;
  --fg: #2d1810;
  --muted: rgba(45, 24, 16, 0.6);
  --rule: rgba(45, 24, 16, 0.12);
  --accent: #22c55e;
  --card: rgba(255, 255, 255, 0.55);
  --shadow-phone: 0 30px 70px rgba(45, 24, 16, 0.18);
  --shadow-soft: 0 10px 30px rgba(45, 24, 16, 0.08);
  --radius-pill: 999px;
  --max-width: 1240px;
}

/* ========= RESET ========= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

ul {
  list-style: none;
}

/* ========= BACKGROUND GRAIN (home only) ========= */
body.home {
  position: relative;
  isolation: isolate;
}

body.home::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.09  0 0 0 0 0.06  0 0 0 0.35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.35;
  mix-blend-mode: multiply;
}

body.home > * {
  position: relative;
  z-index: 2;
}

/* ========= NAV ========= */
.nav {
  padding: 28px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.brand span {
  font:
    400 1.55rem/1 'DM Serif Display',
    serif;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.75;
}

.nav-links a {
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

/* ========= HERO ========= */
.hero {
  padding: 40px 32px 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  min-height: 720px;
  position: relative;
}

.hero-text .eyebrow {
  font:
    600 0.78rem/1 'Inter',
    sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hero-text .eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  font:
    400 clamp(3.25rem, 6.8vw, 6rem) / 1.02 'DM Serif Display',
    serif;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-variation-settings:
    'SOFT' 100,
    'opsz' 144;
  color: var(--accent);
}

.hero .lede {
  font-size: 1.22rem;
  line-height: 1.55;
  opacity: 0.78;
  margin-bottom: 36px;
  max-width: 440px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.app-store-badge {
  display: inline-flex;
  transition: transform 0.2s;
}

.app-store-badge:hover {
  transform: translateY(-2px);
}

.app-store-badge img {
  display: block;
  height: 60px;
  width: auto;
}

.app-store-badge--large img {
  height: 74px;
}

@media (max-width: 640px) {
  .app-store-badge img {
    height: 52px;
  }
  .app-store-badge--large img {
    height: 64px;
  }
}

.cta-meta {
  font-size: 0.92rem;
  opacity: 0.6;
  max-width: 220px;
  line-height: 1.35;
}

.trust {
  display: flex;
  gap: 24px;
  margin-top: 48px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-item strong {
  font:
    400 1.6rem/1 'DM Serif Display',
    serif;
  letter-spacing: -0.01em;
}

.trust-item span {
  font-size: 0.82rem;
  opacity: 0.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ========= HERO ART: stacked angled phones ========= */
.hero-art {
  position: relative;
  height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bgword {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    400 clamp(8rem, 16vw, 14rem) / 1 'DM Serif Display',
    serif;
  letter-spacing: -0.04em;
  color: var(--fg);
  opacity: 0.06;
  transform: rotate(-7deg);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

.phone {
  position: absolute;
  background: #1d1d1f;
  padding: 6px;
  border-radius: 44px;
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.phone img {
  border-radius: 38px;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.phone-a {
  width: 260px;
  z-index: 3;
  transform: rotate(-3deg);
}

.phone-b {
  width: 220px;
  z-index: 2;
  transform: translate(-72%, 18px) rotate(-11deg);
}

.phone-c {
  width: 220px;
  z-index: 2;
  transform: translate(72%, 18px) rotate(9deg);
}

.hero-art:hover .phone-a {
  transform: rotate(-3deg) translateY(-8px);
}

.hero-art:hover .phone-b {
  transform: translate(-78%, 10px) rotate(-13deg);
}

.hero-art:hover .phone-c {
  transform: translate(78%, 10px) rotate(11deg);
}

/* floating chips */
.chip {
  position: absolute;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
  font-size: 0.86rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 4;
  animation: float 6s ease-in-out infinite;
}

.chip small {
  font-size: 0.72rem;
  opacity: 0.55;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.chip-1 {
  top: 80px;
  left: -10px;
  animation-delay: 0s;
}

.chip-2 {
  bottom: 120px;
  right: -10px;
  animation-delay: -2s;
}

.chip-3 {
  bottom: 30px;
  left: 40px;
  animation-delay: -4s;
  transform: rotate(-3deg);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.chip-dot--amber {
  background: #f59e0b;
}

.chip-dot--indigo {
  background: #6366f1;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ========= CHAPTER DIVIDERS ========= */
.chapter {
  max-width: 960px;
  margin: 0 auto;
  padding: 120px 32px 40px;
  text-align: center;
}

.chapter__title {
  font:
    400 clamp(2.5rem, 5vw, 4.5rem) / 1.02 'DM Serif Display',
    serif;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.chapter__title em {
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  color: var(--accent);
  font-variation-settings:
    'SOFT' 100,
    'opsz' 144;
}

.chapter__desc {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.55;
  opacity: 0.7;
}

/* ========= SECTION + SPLIT LAYOUT ========= */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 32px;
}

.section.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: center;
}

.copy {
  max-width: 440px;
}

.kicker {
  font:
    600 0.78rem/1 'Inter',
    sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 16px;
  color: var(--accent);
}

.kicker--muted {
  color: var(--fg);
  opacity: 0.55;
}

.kicker--accent {
  color: var(--accent);
  opacity: 1;
  margin-bottom: 12px;
}

.copy h2 {
  font:
    400 clamp(2rem, 3.6vw, 2.8rem) / 1.08 'DM Serif Display',
    serif;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.copy h2 em,
.quiz-header h2 em,
.pricing-header h2 em {
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-variation-settings:
    'SOFT' 100,
    'opsz' 144;
  color: var(--accent);
}

.copy > p {
  font-size: 1.08rem;
  line-height: 1.6;
  opacity: 0.78;
  margin-bottom: 24px;
}

.feature-list {
  margin-top: 8px;
}

.feature-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 1rem;
  line-height: 1.5;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list .num {
  font:
    400 0.92rem/1.4 'DM Serif Display',
    serif;
  color: var(--accent);
  min-width: 24px;
  padding-top: 2px;
}

.feature-list strong {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.feature-list span {
  opacity: 0.7;
  font-size: 0.94rem;
}

/* tall phone in split sections */
.phone-tall {
  width: 300px;
  margin: 0 auto;
  background: #1d1d1f;
  padding: 6px;
  border-radius: 46px;
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  position: relative;
  transition: transform 0.4s ease;
}

.phone-tall img {
  border-radius: 40px;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  width: 100%;
}

.phone-tall:hover {
  transform: rotate(-1deg) translateY(-4px);
}

.phone-frame-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
}

.phone-frame-wrap::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(34, 197, 94, 0.18),
    transparent 70%
  );
  z-index: 0;
  filter: blur(10px);
}

.phone-frame-wrap > * {
  position: relative;
  z-index: 1;
}

/* ========= RAYCAST CARD ========= */
.raycast {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px;
}

.raycast-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--rule);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow-soft);
}

.raycast-inner > img {
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.raycast-copy h3 {
  font:
    400 1.9rem/1.12 'DM Serif Display',
    serif;
  letter-spacing: -0.015em;
  margin: 10px 0 12px;
}

.raycast-copy p {
  opacity: 0.75;
  margin-bottom: 20px;
  line-height: 1.6;
}

.raycast-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap 0.2s;
}

.raycast-link:hover {
  gap: 14px;
}

.kbd {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin: 16px 0 20px;
  flex-wrap: wrap;
}

.kbd kbd {
  font:
    600 0.78rem/1 'Inter',
    sans-serif;
  background: #fff;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.kbd-sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* ========= QUIZZES (5-CARD GRID) ========= */
.quizzes {
  text-align: center;
}

.quiz-header {
  max-width: 640px;
  margin: 0 auto 48px;
}

.quiz-header h2 {
  font:
    400 clamp(2rem, 4vw, 3rem) / 1.08 'DM Serif Display',
    serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.quiz-header p {
  font-size: 1.08rem;
  opacity: 0.75;
  line-height: 1.55;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.quiz-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 22px 20px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.quiz-num {
  font:
    400 1.8rem/1 'DM Serif Display',
    serif;
  color: var(--accent);
  margin-bottom: 14px;
}

.quiz-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 1rem;
}

.quiz-desc {
  opacity: 0.65;
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ========= PRICING ========= */
.pricing-section {
  text-align: center;
}

.pricing-header {
  margin-bottom: 48px;
}

.pricing-header .kicker {
  margin-bottom: 12px;
}

.pricing-header h2 {
  font:
    400 clamp(2rem, 4vw, 3.2rem) / 1.08 'DM Serif Display',
    serif;
  letter-spacing: -0.02em;
}

.price-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 320px));
  gap: 20px;
  justify-content: center;
  text-align: left;
}

.price {
  position: relative;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.price--pro {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.price h3 {
  font:
    400 1.6rem/1 'DM Serif Display',
    serif;
  margin-bottom: 10px;
}

.price .amount {
  font:
    400 3rem/1 'DM Serif Display',
    serif;
  letter-spacing: -0.02em;
}

.price .amount small {
  font-size: 1rem;
  opacity: 0.55;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.price .price-sub {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-top: 6px;
  margin-bottom: 24px;
}

.price ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.98rem;
  opacity: 0.88;
}

.price--pro ul li {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.price ul li:last-child {
  border-bottom: none;
}

.badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent);
  color: #0c3a1c;
  font:
    700 0.7rem/1 'Inter',
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

/* ========= FINAL CTA ========= */
.final {
  text-align: center;
  padding: 120px 32px;
  max-width: 860px;
  margin: 0 auto;
}

.final h2 {
  font:
    400 clamp(2.4rem, 5vw, 4rem) / 1.05 'DM Serif Display',
    serif;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.final h2 em {
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  color: var(--accent);
  font-variation-settings:
    'SOFT' 100,
    'opsz' 144;
}

.final-note {
  margin-top: 20px;
  opacity: 0.6;
  font-size: 0.95rem;
}

.final-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ========= FOOTER ========= */
.footer {
  text-align: center;
  padding: 48px 32px;
  border-top: 1px solid var(--rule);
  font-size: 0.88rem;
  opacity: 0.55;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ========= SCROLL REVEAL ========= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

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

/* ========= POLICY PAGES (container) ========= */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  min-height: 100vh;
}

.container header {
  text-align: center;
  margin-bottom: 3rem;
}

.container h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.container .subtitle {
  font-size: 1.2rem;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.container .date {
  font-size: 0.9rem;
  opacity: 0.4;
}

.container section {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  max-width: none;
}

.container h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.container h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.container p {
  line-height: 1.7;
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.container ul {
  list-style-position: inside;
  margin-left: 0.5rem;
}

.container li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  opacity: 0.8;
}

.container a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(45, 24, 16, 0.3);
  transition: text-decoration-color 0.2s;
}

.container a:hover {
  text-decoration-color: rgba(45, 24, 16, 0.8);
}

.container footer {
  margin-top: 2rem;
  border-top: none;
  text-align: center;
}

.container footer a {
  font-weight: 500;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 980px) {
  .hero,
  .section.split,
  .raycast-inner {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .split--phone-first .phone-frame-wrap {
    order: 2;
  }

  .price-wrap {
    grid-template-columns: 1fr;
  }

  .nav {
    padding: 20px 24px 0;
    flex-wrap: wrap;
    gap: 16px;
  }

  .hero {
    padding: 20px 24px 40px;
    min-height: auto;
    text-align: left;
  }

  .hero-art {
    height: 500px;
    margin-top: 24px;
  }

  .chapter {
    padding-left: 24px;
    padding-right: 24px;
  }

  .section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .raycast {
    padding: 0 24px;
  }

  .raycast-inner {
    padding: 24px;
  }

  .phone-frame-wrap {
    padding: 8px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    gap: 16px;
    font-size: 0.88rem;
  }

  .hero-text .lede {
    font-size: 1.05rem;
  }

  .hero-art {
    height: 420px;
  }

  .phone-a {
    width: 200px;
  }

  .phone-b,
  .phone-c {
    width: 160px;
  }

  .phone-b {
    transform: translate(-90%, 12px) rotate(-10deg);
  }

  .phone-c {
    transform: translate(90%, 12px) rotate(10deg);
  }

  .chip {
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .chip-1 {
    top: 40px;
    left: 0;
  }

  .chip-2 {
    bottom: 80px;
    right: 0;
  }

  .chip-3 {
    display: none;
  }

  .trust {
    gap: 16px;
  }

  .trust-item strong {
    font-size: 1.3rem;
  }

  .phone-tall {
    width: 240px;
  }

  .phone-frame-wrap::before {
    width: 260px;
    height: 260px;
  }

  .raycast-inner {
    padding: 18px;
  }

  .price {
    padding: 24px 20px;
  }

  .final {
    padding: 80px 24px;
  }

  .container h1 {
    font-size: 2.25rem;
  }

  .container h2 {
    font-size: 1.3rem;
  }

  .container section {
    padding: 1.5rem;
  }
}

@media (max-width: 420px) {
  .hero-art {
    height: 360px;
  }

  .phone-a {
    width: 170px;
  }

  .phone-b,
  .phone-c {
    width: 140px;
  }
}
