:root {
  --cream: #FFF5E6;
  --cream-2: #FAEBD4;
  --plum: #321C38;
  --plum-2: #4A2A52;
  --rose: #F2D8DF;
  --lavender: #E9DDF7;
  --fuchsia: #D946EF;
  --fuchsia-ink: #A21CAF;
  --ink: #1E1220;
  --muted: #62506A;
  --radius: 28px;
  --max: 1180px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--fuchsia); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -0.03em; margin: 0; }
h2 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h3 { font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.01em; }
.h2-sm { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
p { margin: 0; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 40ch; }
.lede.center { text-align: center; margin-inline: auto; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--cream) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 28px; align-items: center; font-weight: 500; font-size: 0.95rem; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--ink); }

/* App Store button */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--plum); color: var(--cream);
  text-decoration: none; border-radius: 16px;
  padding: 12px 22px 12px 18px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), background .2s;
}
.btn:hover { background: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 26px; height: 26px; flex: none; }
.btn span { display: flex; flex-direction: column; line-height: 1.1; }
.btn small { font-size: 0.7rem; opacity: .8; }
.btn strong { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.btn.sm { padding: 8px 16px 8px 12px; border-radius: 12px; gap: 8px; }
.btn.sm svg { width: 18px; height: 18px; }
.btn.sm strong { font-size: 0.95rem; }
.btn.light { background: var(--cream); color: var(--plum); }

/* App Store screenshots */
.shot {
  width: 300px; aspect-ratio: 638 / 1386; border-radius: 34px; overflow: hidden; background: var(--rose);
  box-shadow: 0 40px 80px -30px rgba(50,28,56,.55), 0 18px 30px -18px rgba(50,28,56,.4);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* Hero */
.hero { padding: 40px 0 110px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(3.2rem, 7.4vw, 6.2rem); margin: 18px 0 26px; }
.pill {
  display: inline-block; background: var(--plum); color: var(--cream);
  padding: 0.02em 0.2em 0.1em; border-radius: 0.18em; transform: rotate(-2.5deg); margin: 0.04em 0;
}
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 34px; }
.hero .note { font-size: 0.9rem; color: var(--muted); }
.stage { position: relative; height: 640px; }
.arch { position: absolute; left: 50%; bottom: 0; width: 88%; height: 78%; translate: -50% 0; background: var(--rose); border-radius: 999px 999px 40px 40px; }
.stage .shot { position: absolute; bottom: 30px; width: 270px; }
.stage .shot.front { left: 50%; translate: -62% 0; rotate: -4deg; z-index: 2; }
.stage .shot.back { left: 50%; translate: -8% -40px; rotate: 6deg; width: 240px; z-index: 1; }
.spark { position: absolute; color: var(--plum); width: 26px; animation: twinkle 3.2s ease-in-out infinite; }
.spark.s1 { top: 30px; left: 12%; }
.spark.s2 { top: 110px; right: 2%; width: 18px; animation-delay: 1.1s; }
.spark.s3 { bottom: 160px; left: 4%; width: 16px; color: var(--fuchsia); animation-delay: 2s; z-index: 3; }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.7) rotate(20deg); opacity: .6; } }

.ticker { background: var(--plum); color: var(--cream); overflow: hidden; padding: 16px 0; }
.ticker-track { display: flex; gap: 48px; width: max-content; animation: slide 36s linear infinite; font-family: var(--display); font-weight: 600; font-size: 1.15rem; white-space: nowrap; }
.ticker-track span::after { content: "✦"; margin-inline-start: 48px; color: var(--fuchsia); }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.band { padding: 120px 0; }
.cream-2 { background: var(--cream-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.split.flip > :first-child { order: 2; }
.copy { display: flex; flex-direction: column; gap: 22px; }
.phone-col { display: flex; justify-content: center; position: relative; isolation: isolate; }
.phone-col .shot { width: 330px; }
.checks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 7px;
  background: var(--fuchsia) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/15px no-repeat;
}

.dark { background: var(--plum); color: var(--cream); }
.dark .eyebrow { color: #D8C6DC; }
.dark h2 em { font-style: normal; color: var(--fuchsia); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 16px; color: #E7DBE9; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 50px; min-height: 34px; padding-top: 4px; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--fuchsia); color: #fff; font-family: var(--display); font-weight: 800;
}
.steps strong { color: var(--cream); }

/* Habit grid demo in the app's Egypt pattern. Tiles scale in on scroll where supported. */
.habit-demo { --c: #8B5CF6; display: grid; gap: 0; padding: 20px; border-radius: 24px; background: var(--plum-2); max-width: 470px; }
.demo-name { font-size: .9rem; font-weight: 700; color: var(--cream); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.demo-name::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
/* Tiles sit edge to edge so completed days read as one continuous pattern. */
.tiles { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0; }
.tile { aspect-ratio: 1; }
.tile.on { background: #fff center / cover no-repeat; }
.tile.gap { background: color-mix(in srgb, var(--c) 22%, transparent); }
@supports (animation-timeline: view()) {
  .tiles .tile.on { animation: fill linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
}
@keyframes fill { from { opacity: 0; transform: scale(.3); } }

.lav { background: var(--lavender); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches b { width: 34px; height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.06); }
.patterns { overflow: hidden; margin-top: 70px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.patterns-track { display: flex; gap: 16px; width: max-content; animation: slide 40s linear infinite; }
.patterns-track img { width: 150px; height: 150px; border-radius: 22px; object-fit: cover; box-shadow: 0 12px 30px -16px rgba(50,28,56,.5); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { background: #fff; border: 2px solid var(--plum); border-radius: 20px; padding: 18px; }
.stat strong { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; }
.stat span { font-size: .85rem; color: var(--muted); }
.blob { position: absolute; inset: 8% 10%; background: #FFD9B8; border-radius: 42% 58% 55% 45% / 50% 40% 60% 50%; z-index: -1; }

.grid-head { text-align: center; display: grid; gap: 18px; justify-items: center; margin-bottom: 56px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: #fff; border-radius: var(--radius); padding: 30px; display: grid; gap: 12px; align-content: start; }
.card p { color: var(--muted); font-size: 1rem; }
.icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.icon svg { width: 24px; height: 24px; }

/* Guide cards */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.related .guide-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.guide-card { display: flex; flex-direction: column; background: #fff; border-radius: 24px; overflow: hidden; text-decoration: none; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.guide-card:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(50,28,56,.45); }
.guide-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.guide-card-body { padding: 22px 24px 26px; display: grid; gap: 10px; }
.guide-card h2, .guide-card h3 { font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.015em; }
.guide-card p { color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq-item { background: #fff; border-radius: 20px; padding: 0 24px; }
.faq-item summary { cursor: pointer; list-style: none; padding-block: 20px; padding-inline: 0 36px; position: relative; font-weight: 700; font-size: 1.05rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; inset-inline-end: 0; top: 50%; translate: 0 -50%; font-size: 1.6rem; font-weight: 400; color: var(--fuchsia-ink); transition: rotate .2s; }
.faq-item[open] summary::after { rotate: 45deg; }
.faq-body { padding: 0 0 22px; display: grid; gap: 10px; color: var(--muted); }
.faq-body .more { color: var(--fuchsia-ink); font-weight: 700; text-decoration: none; }
.faq-body .more:hover { text-decoration: underline; }

.pro-band { padding-bottom: 0; }
.pro { background: var(--rose); border-radius: 40px; padding: 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.final { text-align: center; padding: 130px 0 120px; }
.final .wrap { display: grid; justify-items: center; gap: 24px; }
.final img.bee { width: 150px; animation: hover 4s ease-in-out infinite; }
@keyframes hover { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }

/* Footer */
footer { border-top: 1px solid rgba(50,28,56,.12); padding: 56px 0 36px; font-size: .95rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 40px; }
.footer-brand { display: grid; gap: 14px; justify-items: start; }
.footer-brand .brand { color: var(--ink); }
footer h2 { font-size: .8rem; font-family: var(--body); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { text-decoration: none; }
footer a:not(.btn):hover { color: var(--ink); text-decoration: underline; }
.footer-base { margin-top: 44px; font-size: .85rem; }

/* Language switcher: native <details>, so it works without JS. */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 10px; color: var(--muted); font-size: .9rem; font-weight: 500;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: rgba(50,28,56,.07); color: var(--ink); }
.lang summary svg { width: 18px; height: 18px; }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30; margin: 0; padding: 8px; list-style: none;
  width: min(360px, calc(100vw - 32px)); max-height: min(70vh, 480px); overflow: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(50,28,56,.45), 0 0 0 1px rgba(50,28,56,.06);
}
.lang ul a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.lang ul a:hover { background: var(--cream); }
.lang ul a[aria-current] { background: var(--lavender); font-weight: 700; }

/* Scripts that break with tight tracking or clip at line-height 1. */
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(he) h1, :lang(he) h2, :lang(he) h3,
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(th) h1, :lang(th) h2, :lang(th) h3 { letter-spacing: 0; }
:lang(hi) h1, :lang(hi) h2, :lang(th) h1, :lang(th) h2, :lang(ar) h1, :lang(ar) h2, :lang(vi) h1, :lang(vi) h2 { line-height: 1.25; }
:lang(ar) .eyebrow, :lang(he) .eyebrow, :lang(hi) .eyebrow, :lang(th) .eyebrow, :lang(ja) .eyebrow, :lang(ko) .eyebrow,
:lang(zh-Hans) .eyebrow, :lang(zh-Hant) .eyebrow { letter-spacing: .04em; }
/* CJK: no word spaces, so break at phrase boundaries and use a smaller display size. */
:lang(ja), :lang(zh-Hans), :lang(zh-Hant) { word-break: auto-phrase; line-break: strict; }
:lang(ko) { word-break: keep-all; }
:lang(ja) .hero h1, :lang(ko) .hero h1, :lang(zh-Hans) .hero h1, :lang(zh-Hant) .hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: 1.15; letter-spacing: 0; }
:lang(ja) h2, :lang(ko) h2, :lang(zh-Hans) h2, :lang(zh-Hant) h2 { line-height: 1.2; letter-spacing: 0; }
.eyebrow:lang(ja), .eyebrow:lang(ko), .eyebrow:lang(zh-Hans), .eyebrow:lang(zh-Hant) { text-transform: none; }
[dir="rtl"] .more span { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .ticker-track, [dir="rtl"] .patterns-track { animation-direction: reverse; }

/* Articles */
.article { padding-top: 34px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 26px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--ink); }
.article h1, .guides-hero h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
.meta { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.feature-wrap { width: min(960px, 100% - 40px); margin-top: 34px; }
.feature-wrap img { width: 100%; border-radius: 28px; aspect-ratio: 3 / 2; object-fit: cover; }
.prose { padding: 50px 0 20px; font-size: 1.1rem; line-height: 1.7; }
.prose > p:first-child { font-size: 1.25rem; line-height: 1.6; color: var(--ink); }
.prose p + p, .prose section > * + * { margin-top: 1.1em; }
.prose > * + * { margin-top: 1.1em; }
.prose section { margin-top: 56px; }
.prose h2 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); line-height: 1.08; letter-spacing: -0.02em; }
.prose a:not(.btn) { color: var(--fuchsia-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--fuchsia-ink); font-weight: 700; }
.howto { background: #fff; border-radius: 22px; padding-block: 26px !important; padding-inline: 52px 26px !important; }
.article-figure { margin: 34px auto 0; display: grid; justify-items: center; gap: 14px; }
.article-figure img { width: 280px; border-radius: 26px; box-shadow: 0 30px 60px -30px rgba(50,28,56,.5); }
.article-figure figcaption { font-size: .95rem; color: var(--muted); text-align: center; max-width: 46ch; }
.callout {
  margin-top: 34px !important; background: var(--plum); color: var(--cream); border-radius: 26px; padding: 22px 26px;
  display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; font-size: 1rem; line-height: 1.5;
}
.callout img { width: 64px; }
.callout p { margin: 0 !important; color: #E7DBE9; }
.callout .callout-title { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--cream); }
.article-faq .faq-item { margin-top: 12px; }
.related { background: var(--cream-2); padding: 90px 0; margin-top: 70px; }
.related h2 { margin-bottom: 36px; font-size: clamp(2rem, 4vw, 3rem); }
.guides-hero { padding: 50px 0 30px; }
.guides-hero .lede { margin-top: 22px; max-width: 52ch; }
.guides-list { padding-top: 40px; }

@media (max-width: 960px) {
  .hero .wrap, .split, .pro { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .stage { height: 540px; max-width: 520px; width: 100%; margin-inline: auto; }
  .stage .shot { width: 220px; }
  .stage .shot.back { width: 196px; }
  .features { grid-template-columns: 1fr 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .band { padding: 90px 0; }
  .pro { padding: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap, .wrap.narrow, .feature-wrap { width: calc(100% - 32px); }
  .hero { padding-bottom: 80px; }
  .stage { height: 460px; }
  .stage .shot { width: 180px; border-radius: 24px; }
  .stage .shot.back { width: 160px; }
  .features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: span 2; }
  .phone-col .shot { width: 270px; }
  .callout { grid-template-columns: 48px 1fr; }
  .callout img { width: 48px; }
  .callout .btn { grid-column: 1 / -1; justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .prose { font-size: 1.05rem; }
}
/* Phones: one-line header, less repetition, denser cards. */
@media (max-width: 960px) {
  /* The hero already shows this screenshot; skip the repeat once the layout stacks. */
  #how-it-works .phone-col { display: none; }
}
@media (max-width: 600px) {
  .nav .wrap { height: 60px; }
  .nav-links { gap: 8px; }
  .brand { font-size: 1.05rem; white-space: nowrap; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .btn { white-space: nowrap; }
  .lang summary span { display: none; }
  .lang summary { padding: 8px; }
  .lang ul { position: fixed; top: 64px; inset-inline: 16px; width: auto; }

  .hero { padding: 20px 0 56px; }
  .hero h1 { margin: 12px 0 18px; }
  .hero .cta { margin-top: 24px; }
  .stage { height: 400px; }
  .band, .related { padding: 64px 0; }
  .related { margin-top: 48px; }
  .final { padding: 72px 0 64px; }
  .grid-head { margin-bottom: 32px; }
  .split { gap: 40px; }
  .patterns { margin-top: 48px; }
  .patterns-track img { width: 110px; height: 110px; border-radius: 18px; }
  .swatches { gap: 8px; }
  .swatches b { width: 28px; height: 28px; border-radius: 8px; }
  .pro { border-radius: 28px; }

  /* Feature cards: icon beside the text. */
  .features { gap: 12px; }
  .card { grid-template-columns: 44px 1fr; gap: 4px 14px; padding: 18px; border-radius: 20px; }
  .card .icon { grid-row: 1 / span 2; width: 44px; height: 44px; }
  .card > :not(.icon) { grid-column: 2; }
  .card p { font-size: .95rem; }

  /* Guide cards: thumbnail rows instead of full-width image cards. */
  .guide-grid, .related .guide-grid { grid-template-columns: 1fr; gap: 12px; }
  .guide-card { flex-direction: row; align-items: center; border-radius: 18px; }
  .guide-card img { width: 104px; height: 104px; aspect-ratio: 1; flex: none; }
  .guide-card-body { padding: 12px 16px; gap: 4px; }
  .guide-card h2, .guide-card h3 { font-size: 1.05rem; }
  .guide-card p { font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  .prose section { margin-top: 44px; }
  .howto { padding-inline: 40px 18px !important; }
  .article-figure img { width: 220px; }
}

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