/* ==========================================================================
   Cloud Pillow funnel — design system (reusable structure).
   Brand/theme colors live in theme.css (product-specific). This file is the
   reusable component layer and reads var(--token) with sane fallbacks.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  color: var(--ink, #1c2433);
  background: var(--bg, #fbfaf7);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent, #6c8cff); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-display, var(--font-body, ui-sans-serif, system-ui, sans-serif));
  line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--ink-strong, #131a27);
}
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
p { color: var(--ink-soft, #41506a); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 22px; }
.container--narrow { max-width: 820px; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-ink, #4258c9); margin-bottom: 14px;
}
.lede { font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: var(--ink-soft, #41506a); max-width: 56ch; }
.center .lede { margin-inline: auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg, #fbfaf7) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line, #ece7df);
}
.topbar__row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink-strong); }
.brand__mark { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(140deg, var(--accent, #6c8cff), var(--accent-2, #b9c7ff)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.topnav { display: none; gap: 28px; font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }
.topnav a:hover { color: var(--ink-strong); }
.topbar__cta { display: none; }
@media (min-width: 800px) { .topnav { display: flex; } .topbar__cta { display: inline-flex; } }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent, #6c8cff); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: 1rem;
  padding: 15px 28px; border: 0; border-radius: var(--radius-pill, 999px);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent, #6c8cff) 70%, transparent);
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease; text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--accent, #6c8cff) 75%, transparent); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: 18px 36px; font-size: 1.08rem; }
.btn--block { display: flex; width: 100%; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink-strong, #131a27); box-shadow: inset 0 0 0 1.5px var(--line-strong, #d9d2c6); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-strong, #131a27); }
.btn--dark { --btn-bg: var(--ink-strong, #131a27); }
.btn__sub { font-weight: 500; opacity: .8; font-size: .82em; }

/* ---------- Badges / pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface, #fff); box-shadow: inset 0 0 0 1px var(--line, #ece7df); font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.pill--accent { background: var(--accent-tint, #eef1ff); color: var(--accent-ink, #4258c9); box-shadow: none; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--accent, #6c8cff); color: #fff; }
.badge--save { background: var(--save, #e8607a); }

/* ---------- Stars ---------- */
.stars { --pct: 100%; display: inline-block; font-size: 1rem; line-height: 1; position: relative; font-family: Arial, sans-serif; }
.stars::before { content: "★★★★★"; letter-spacing: 2px; color: var(--star-empty, #e3ddd0); }
.stars::after { content: "★★★★★"; letter-spacing: 2px; color: var(--star, #f6b73c); position: absolute; inset: 0; width: var(--pct); overflow: hidden; white-space: nowrap; }
.rating-row { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.hero__media { position: relative; }
.hero__media img { width: 100%; border-radius: var(--radius-lg, 28px); box-shadow: 0 40px 80px -40px rgba(30,30,60,.4); }
.hero h1 + .lede { margin-top: 18px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 26px; align-items: center; color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.hero__float { position: absolute; background: var(--surface, #fff); border-radius: 16px; padding: 12px 16px; box-shadow: 0 18px 40px -18px rgba(30,30,60,.35); font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }

/* ---------- Marquee / trust bar ---------- */
.trustbar { border-block: 1px solid var(--line, #ece7df); background: var(--surface-2, #fff); }
.trustbar__row { display: flex; flex-wrap: wrap; gap: 14px 34px; justify-content: center; align-items: center; padding-block: 20px; color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.trustbar__row span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Feature cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2,1fr);} .grid-3 { grid-template-columns: repeat(3,1fr);} .grid-4 { grid-template-columns: repeat(4,1fr);} }
.card { background: var(--surface, #fff); border-radius: var(--radius, 20px); padding: 26px; box-shadow: 0 1px 0 var(--line, #ece7df), 0 18px 40px -30px rgba(30,30,60,.35); }
.card__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-tint, #eef1ff); color: var(--accent-ink, #4258c9); margin-bottom: 16px; font-size: 1.4rem; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .98rem; }

/* ---------- Split / alternating feature rows ---------- */
.feature-row { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .feature-row { grid-template-columns: 1fr 1fr; gap: 56px; } .feature-row--reverse .feature-row__media { order: 2; } }
.feature-row__media img { border-radius: var(--radius-lg, 28px); box-shadow: 0 30px 60px -36px rgba(30,30,60,.4); width: 100%; }
.checklist { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; color: var(--ink-soft); }
.checklist li::before { content: "✓"; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-tint, #eef1ff); color: var(--accent-ink, #4258c9); font-weight: 900; font-size: .85rem; }

/* ---------- Comparison ---------- */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface,#fff); border-radius: var(--radius,20px); overflow: hidden; box-shadow: 0 18px 40px -30px rgba(30,30,60,.35); }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line, #ece7df); font-size: .96rem; }
.compare thead th { background: var(--ink-strong, #131a27); color: #fff; font-size: .9rem; }
.compare thead th.is-us { background: var(--accent, #6c8cff); }
.compare td.us { font-weight: 700; color: var(--ink-strong); }
.compare .yes { color: #2e9c6a; font-weight: 800; }
.compare .no { color: #c2553f; font-weight: 700; }
.compare tr:last-child td { border-bottom: 0; }

/* ---------- Pricing / offer tiers ---------- */
.tiers { display: grid; gap: 20px; }
@media (min-width: 760px) { .tiers { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.tier {
  position: relative; background: var(--surface, #fff); border-radius: var(--radius, 20px); padding: 26px 24px 24px;
  box-shadow: inset 0 0 0 1.5px var(--line, #ece7df); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; cursor: pointer;
}
.tier:hover { transform: translateY(-3px); }
.tier.is-selected { box-shadow: inset 0 0 0 2.5px var(--accent, #6c8cff), 0 20px 40px -24px color-mix(in srgb, var(--accent,#6c8cff) 60%, transparent); }
.tier__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.tier__name { font-weight: 800; font-size: 1.1rem; color: var(--ink-strong); }
.tier__qty { color: var(--ink-soft); font-size: .9rem; margin-top: 2px; }
.tier__price { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.tier__price b { font-size: 2rem; font-family: var(--font-display); letter-spacing: -.02em; color: var(--ink-strong); }
.tier__compare { text-decoration: line-through; color: var(--ink-faint, #9aa3b5); font-weight: 600; }
.tier__per { color: var(--ink-soft); font-size: .88rem; margin-top: 4px; }
.tier__save { margin-top: 10px; }
.tier__radio { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.tier__radio i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong, #d9d2c6); display: inline-block; flex: none; transition: box-shadow .15s; }
.tier.is-selected .tier__radio i { box-shadow: inset 0 0 0 6px var(--accent, #6c8cff); }

/* ---------- Guarantee ---------- */
.guarantee { display: grid; gap: 22px; align-items: center; background: var(--surface-2,#fff); border-radius: var(--radius-lg,28px); padding: clamp(26px,4vw,44px); box-shadow: inset 0 0 0 1px var(--line,#ece7df); }
@media (min-width: 760px){ .guarantee { grid-template-columns: 120px 1fr; } }
.guarantee__seal { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 30% 30%, var(--accent-2,#b9c7ff), var(--accent,#6c8cff)); color: #fff; font-weight: 800; line-height: 1.1; box-shadow: 0 18px 30px -16px color-mix(in srgb, var(--accent,#6c8cff) 70%, transparent); }
.guarantee__seal b { font-size: 1.5rem; display: block; }

/* ---------- Reviews ---------- */
.reviews-head { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.reviews-grid { columns: 1; column-gap: 22px; }
@media (min-width: 680px){ .reviews-grid { columns: 2; } }
@media (min-width: 1000px){ .reviews-grid { columns: 3; } }
.review { break-inside: avoid; background: var(--surface,#fff); border-radius: var(--radius,20px); padding: 22px; margin-bottom: 22px; box-shadow: 0 1px 0 var(--line,#ece7df), 0 14px 30px -26px rgba(30,30,60,.35); }
.review__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review__title { font-weight: 800; color: var(--ink-strong); margin-bottom: 6px; }
.review__body { font-size: .96rem; color: var(--ink-soft); }
.review__by { margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--ink-soft); }
.review__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint,#eef1ff); color: var(--accent-ink,#4258c9); display: grid; place-items: center; font-weight: 800; }
.review__verified { color: #2e9c6a; font-weight: 700; font-size: .8rem; display: inline-flex; gap: 4px; align-items: center; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface,#fff); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line,#ece7df); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; color: var(--ink-strong); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent-ink,#4258c9); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 22px 20px; color: var(--ink-soft); }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: color-mix(in srgb, var(--surface,#fff) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line,#ece7df); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; justify-content: space-between; transform: translateY(110%); transition: transform .3s ease; }
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta__price { font-weight: 800; color: var(--ink-strong); }
.sticky-cta__price s { color: var(--ink-faint,#9aa3b5); font-weight: 600; margin-right: 6px; }
.sticky-cta .btn { padding: 13px 22px; }
@media (min-width: 800px){ .sticky-cta { display: none; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink-strong, #131a27); color: #c7cedd; }
.footer a { color: #c7cedd; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: 30px; padding-block: 54px; }
@media (min-width: 700px){ .footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer__brand .brand { color: #fff; }
.footer small { color: #8b94a9; }
.footer__links { display: grid; gap: 10px; font-size: .92rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 20px; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; font-size: .82rem; color: #8b94a9; }

/* ---------- Notices ---------- */
.notice { border-radius: 14px; padding: 14px 18px; font-size: .92rem; font-weight: 600; }
.notice--info { background: var(--accent-tint,#eef1ff); color: var(--accent-ink,#4258c9); }
.notice--warn { background: #fff4e5; color: #9a5b00; box-shadow: inset 0 0 0 1px #ffe2b8; }
.sample-flag { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-faint,#9aa3b5); background: var(--surface-2,#fff); padding: 4px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line,#ece7df); }

/* ---------- Utilities ---------- */
.muted { color: var(--ink-faint, #9aa3b5); }
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}.mt-6{margin-top:3rem}
.maxw-prose{max-width:62ch}.center .maxw-prose{margin-inline:auto}
.bg-soft { background: var(--surface-soft, #f3f0ea); }
.bg-tint { background: var(--accent-tint, #eef1ff); }
.hide { display: none !important; }

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