/* Pomoji — site styles. Brand: ink, cream, tomato red, amber. */
:root {
  --ink: #0b0b0d;
  --ink-2: #111114;
  --surface: #16161a;
  --surface-2: #1d1d22;
  --line: #29292f;
  --cream: #f3efe8;
  --muted: #a7a39c;
  --dim: #77736d;
  /* App accent: SwiftUI system red (dark appearance), as returned by ThemeService.getAccentColor(). */
  --red: #ff453a;
  --red-2: #ff6961;
  --amber: #ffb020;
  --night: #43519a;
  --radius: 22px;
  --radius-lg: 32px;
  --wrap: 1160px;
  /* SF Pro Rounded on Apple devices (the app's font); Nunito is the closest rounded fallback elsewhere. */
  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--red-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(42px, 6.2vw, 74px); font-weight: 900; }
h2 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 900; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--amber);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255, 69, 58, .18); }
.accent { color: var(--red); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 13, .72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); font-family: var(--display); font-weight: 800; font-size: 21px; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; font-weight: 600; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--cream); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; border: 0; cursor: pointer; font-family: var(--body);
}
.btn:hover { text-decoration: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #e63b31; }
.btn-ghost { background: var(--surface-2); color: var(--cream); border: 1px solid var(--line); }
.nav .btn-red { color: #fff; }
@media (max-width: 860px) { .nav .hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-copy h1 .accent { display: inline-block; }
.store-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.store-badge img { height: 54px; width: auto; }
.store-meta { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.chip svg { width: 15px; height: 15px; color: var(--amber); }

.stage { position: relative; display: grid; place-items: center; }
.stage-rings { position: absolute; inset: 50% auto auto 50%; width: min(560px, 118%); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.stage-rings circle { fill: none; stroke-width: 34; }
.pomo-button {
  position: relative; width: min(440px, 88vw); aspect-ratio: 1;
  background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.pomo-button svg { width: 100%; height: 100%; overflow: visible; }
.pomo-hint {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--cream);
  transition: opacity .3s ease, transform .3s ease;
}
.pomo-hint .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.bubble {
  position: absolute; top: 4%; right: 2%; max-width: 230px;
  padding: 12px 16px; border-radius: 20px 20px 20px 6px;
  background: var(--cream); color: var(--ink); font-weight: 800; font-family: var(--display); font-size: 18px; line-height: 1.2;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(8px) scale(.94); transform-origin: bottom left;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2, .9, .3, 1.3);
  pointer-events: none;
}
.stage.awake .bubble { opacity: 1; transform: none; }
.stage.awake .pomo-hint { opacity: 0; transform: translateX(-50%) translateY(6px); }

/* Interactive Pomo states */
#pomo .h-eyes-open { transform-origin: 200px 176px; transform: scaleY(.06); opacity: 0; transition: transform .28s ease, opacity .2s ease; }
#pomo .h-eyes-closed { transition: opacity .2s ease; }
#pomo.awake .h-eyes-open { transform: scaleY(1); opacity: 1; }
#pomo.awake .h-eyes-closed { opacity: 0; }
#pomo .h-pupils { transition: transform .12s ease-out; }
#pomo .h-cap { transform-origin: 230px 110px; transition: transform .7s cubic-bezier(.3, .7, .3, 1), opacity .5s ease .15s; }
#pomo.awake .h-cap { transform: translate(120px, -170px) rotate(48deg); opacity: 0; }
#pomo .h-zzz { transition: opacity .3s ease; }
#pomo.awake .h-zzz { opacity: 0; }
#pomo .h-breathe { transform-origin: 200px 372px; animation: h-breathe 4.4s ease-in-out infinite; }
@keyframes h-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.02, 1.045); } }
#pomo.awake .h-breathe { animation: none; }
#pomo .h-sway { transform-origin: 200px 360px; transform: rotate(6deg); transition: transform .5s ease; }
#pomo.awake .h-sway { transform: rotate(0deg); }
#pomo .h-wing-l { transform-origin: 112px 224px; transition: transform .4s ease; }
#pomo .h-wing-r { transform-origin: 288px 224px; transition: transform .4s ease; }
#pomo.flapping .h-wing-l { animation: h-flap-l .32s ease-in-out 5 alternate; }
#pomo.flapping .h-wing-r { animation: h-flap-r .32s ease-in-out 5 alternate; }
@keyframes h-flap-l { from { transform: rotate(40deg); } to { transform: rotate(112deg); } }
@keyframes h-flap-r { from { transform: rotate(-40deg); } to { transform: rotate(-112deg); } }
#pomo .h-hop { transform-origin: 200px 372px; }
#pomo.flapping .h-hop { animation: h-hop .64s cubic-bezier(.3, .7, .4, 1) 3; }
@keyframes h-hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.05, .93); } 50% { transform: translateY(-34px) scale(.97, 1.04); } 85% { transform: translateY(0) scale(1.04, .95); } }
#pomo .h-sparks { opacity: 0; transition: opacity .3s ease; }
#pomo.flapping .h-sparks { opacity: 1; }
#pomo .h-yawn { transform-box: fill-box; transform-origin: top center; transition: transform .4s ease; }
#pomo.yawning .h-yawn { transform: scaleY(1.9); }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 110px 0; }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 52px; }
.section-head.center { align-items: center; text-align: center; margin-inline: auto; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step {
  background: linear-gradient(180deg, var(--surface) 0%, var(--ink-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 26px 30px; display: flex; flex-direction: column; gap: 10px;
}
.step .pose { width: 100%; max-width: 230px; aspect-ratio: 1; margin: 0 auto 4px; }
.step .num { font-family: var(--display); font-weight: 800; color: var(--red); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.step p { color: var(--muted); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature {
  grid-column: span 1;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
}
.feature.wide { grid-column: span 2; }
.feature .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255, 69, 58, .12); color: var(--red-2); margin-bottom: 6px;
}
.feature .icon svg { width: 24px; height: 24px; }
.feature p { color: var(--muted); font-size: 15.5px; }
.pro { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--ink); background: var(--amber); border-radius: 6px; padding: 2px 6px; vertical-align: 3px; margin-left: 6px; }

/* Companions gallery */
.tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 30px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: none; border: 0; color: var(--muted); font: 700 15px var(--body); cursor: pointer;
}
.tab svg { width: 17px; height: 17px; }
.tab[aria-selected="true"] { background: var(--cream); color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery[hidden] { display: none; }
.pal {
  position: relative; background: #0e0e10; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.pal .pose { width: 100%; max-width: 230px; aspect-ratio: 1; }
.pal h3 { font-size: 18px; }
.pal p { color: var(--muted); font-size: 13.5px; line-height: 1.4; }

/* Screens (placeholders until real screenshots land) */
.screens { display: flex; justify-content: safe center; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 22px; scrollbar-width: thin; }
.screen { flex: 0 0 auto; width: 260px; margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.phone {
  width: 100%; border-radius: 42px; padding: 10px;
  background: linear-gradient(160deg, #2a2a30, #121215); box-shadow: 0 30px 60px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.phone .glass { width: 100%; aspect-ratio: 1320 / 2868; border-radius: 33px; background: var(--ink-2); overflow: hidden; display: grid; place-items: center; }
.phone .glass img { width: 100%; height: 100%; object-fit: cover; }
.placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--dim); font-size: 13px; font-weight: 700; padding: 20px; border: 2px dashed var(--line); border-radius: 26px; width: 86%; height: 90%; justify-content: center; }
.placeholder svg { width: 34px; height: 34px; }
.screen figcaption { color: var(--muted); font-size: 15px; font-weight: 600; }
@media (min-width: 981px) { .screen { width: calc((100% - 4 * 22px - 8px) / 5); } }

/* Guides */
.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide {
  display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--cream);
  transition: transform .2s ease, border-color .2s ease;
}
.guide:hover { transform: translateY(-3px); border-color: #3a3a42; text-decoration: none; }
.guide .kicker { color: var(--amber); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.guide p { color: var(--muted); font-size: 15.5px; }
.guide .more { color: var(--red-2); font-weight: 700; font-size: 15px; margin-top: auto; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0; font-weight: 700; font-size: 17.5px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; color: var(--red); line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; }

/* CTA */
.cta {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center;
  padding: 44px; border-radius: var(--radius-lg);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 69, 58, .22), transparent 55%), var(--surface);
  border: 1px solid var(--line);
}
.cta .pose { width: 100%; aspect-ratio: 1; }
.cta-copy { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0 60px; margin-top: 110px; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--cream); }

/* ---------- Article pages ---------- */
.article { padding: 64px 0 20px; }
.article .wrap { max-width: 760px; }
.crumbs { font-size: 14px; color: var(--dim); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.article h1 { font-size: clamp(38px, 5.5vw, 60px); margin-bottom: 18px; }
.article .dek { font-size: 20px; color: var(--muted); margin-bottom: 18px; }
.article .byline { font-size: 14px; color: var(--dim); margin-bottom: 36px; }
.article h2 { font-size: clamp(26px, 3.2vw, 34px); margin: 48px 0 14px; }
.article h3 { margin: 28px 0 8px; }
.article p, .article ul, .article ol { margin: 0 0 18px; color: #d9d5ce; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--cream); }
.callout { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin: 28px 0; }
.callout .pose { width: 110px; flex: 0 0 110px; aspect-ratio: 1; }
.callout p { margin: 0 !important; }
.table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 15.5px; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--cream); font-weight: 700; }
.table td { color: #d9d5ce; }

/* Legal pages */
.legal { padding: 60px 0 20px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 10px; }
.legal h2 { font-size: 24px; margin: 38px 0 12px; }
.legal h3 { font-size: 18px; margin: 22px 0 8px; }
.legal p, .legal ul, .legal ol { margin: 0 0 14px; color: #d9d5ce; }
.legal ul, .legal ol { padding-left: 22px; }
.legal .meta { color: var(--dim); font-size: 14px; margin-bottom: 30px; }
.legal .card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 16px; }
.legal .card h3 { margin-top: 0; }
.legal .card p:last-child { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .stage { order: -1; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guides { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { width: min(var(--wrap), 100% - 32px); }
  .hero { padding: 36px 0 20px; }
  .section { padding: 76px 0; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .feature.wide { grid-column: span 1; }
  .cta { grid-template-columns: 1fr; padding: 28px; text-align: left; }
  .cta .pose { max-width: 180px; }
  .bubble { font-size: 16px; right: 0; top: 0; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .tab { justify-content: center; padding: 0 6px; font-size: 14px; }
  .tab svg { display: none; }
}

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