/* Pilbo marketing site
   Shape rule: actions are pills, cards 20px, inner chips/rows 12px. One accent: coral.
   Greys are warm only. */

:root {
  color-scheme: light dark;

  /* Brand */
  --coral: #FF6B47;
  --coral-light: #FFB199;
  --coral-tint: #FFD2C4;

  /* Semantic (light) */
  --bg: #FFFFFF;
  --bg-soft: #FFF6F2;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --border: #F1E3DC;
  --text: #1C1714;
  --text-secondary: #6B5E57;
  --link: #B83A18;
  --accent: var(--coral);
  --on-accent: #1C1714;
  --accent-soft: #FFE9E1;
  --focus: #B83A18;
  --shadow: 0 1px 2px rgba(60, 30, 20, .06), 0 8px 24px rgba(60, 30, 20, .08);

  --r-card: 20px;
  --r-inner: 12px;
  --r-pill: 999px;

  --font: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1080px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161210;
    --bg-soft: #1E1916;
    --surface: #221C19;
    --surface-raised: #2A231F;
    --border: #3A302B;
    --text: #F7EFEB;
    --text-secondary: #B8A9A1;
    --link: #FF8A6B;
    --accent-soft: #3A241C;
    --focus: #FFB199;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 7vw, 3.75rem); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 800; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); color: var(--text); padding: 8px 16px; border-radius: var(--r-pill); z-index: 10;
}
.skip-link:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 900; font-size: 1.3rem; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text-secondary); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 10px; border-radius: var(--r-pill); }
.nav a:hover { color: var(--text); }
.nav .nav-hide-sm { display: none; }
@media (min-width: 720px) { .nav .nav-hide-sm { display: inline-block; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  border-radius: var(--r-pill);
  font: inherit; font-weight: 800; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #FF7F5F; }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: .95rem; }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 20px 8px 16px;
  background: #1C1714; color: #FFFFFF; text-decoration: none;
  border-radius: var(--r-inner); border: 1px solid #1C1714;
  line-height: 1.15;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: .72rem; font-weight: 600; opacity: .85; }
.store-badge strong { display: block; font-size: 1.12rem; font-weight: 800; }
@media (prefers-color-scheme: dark) {
  .store-badge { background: #FFFFFF; color: #1C1714; border-color: #FFFFFF; }
}

/* Sections */
section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.eyebrow { display: inline-block; font-weight: 800; color: var(--link); font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.lead { font-size: 1.2rem; color: var(--text-secondary); max-width: 34em; }
.section-head { max-width: 640px; margin-bottom: 40px; }

/* Hero */
.hero { padding: 48px 0 72px; overflow: hidden; }
.hero .container { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .container { grid-template-columns: 1.1fr .9fr; } .hero { padding: 80px 0 96px; } }
.hero h1 .accent { color: var(--link); }
.hero-note { font-size: .95rem; color: var(--text-secondary); margin: 0; }

/* Phone mock of the Today screen */
.phone {
  width: min(320px, 100%); margin: 0 auto; position: relative;
  background: var(--surface); border: 10px solid #1C1714; border-radius: 44px;
  box-shadow: var(--shadow); padding: 128px 16px 24px;
}
@media (prefers-color-scheme: dark) { .phone { border-color: #3A302B; } }
.phone-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.phone-top .day { font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.phone-top .date { font-size: .8rem; color: var(--text-secondary); }
.ring { width: 52px; height: 52px; }
.ring text { font: 800 13px var(--font); fill: var(--text); }
.slot-label { font-size: .75rem; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.dose { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-soft); border-radius: var(--r-inner); margin-bottom: 6px; }
.dose .pill-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); flex: none; display: grid; place-items: center; }
.dose .pill-dot span { width: 14px; height: 8px; border-radius: 4px; background: var(--coral); display: block; }
.dose .pill-dot.alt span { background: var(--coral-light); }
.dose .name { font-weight: 800; font-size: .9rem; line-height: 1.2; }
.dose .meta { font-size: .75rem; color: var(--text-secondary); line-height: 1.2; }
.dose .state { margin-left: auto; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); }
.dose .state.taken { background: var(--accent-soft); color: var(--link); }
.dose .state.next { background: var(--accent); color: var(--on-accent); }
.notif {
  position: absolute; left: -28px; right: -28px; top: 16px;
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow); padding: 12px 14px; font-size: .82rem; line-height: 1.3;
}
.notif-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.notif-head img { width: 20px; height: 20px; border-radius: 5px; }
.notif-head span { color: var(--text-secondary); font-size: .72rem; font-weight: 700; }
.notif-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.notif-actions span { text-align: center; padding: 6px; border-radius: var(--r-inner); background: var(--bg-soft); font-weight: 800; }
.notif-actions span:first-child { background: var(--accent); color: var(--on-accent); }
.phone-wrap { padding: 0 20px; }
@media (max-width: 420px) { .notif { left: -12px; right: -12px; } }

/* Steps */
.steps { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 900; margin-bottom: 14px; }
.step p { color: var(--text-secondary); margin: 0; }
.methods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.methods span { font-size: .82rem; font-weight: 800; padding: 4px 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--link); }

/* Features */
.features { display: grid; gap: 16px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; }
.feature .icon { width: 44px; height: 44px; border-radius: var(--r-inner); background: var(--accent-soft); color: var(--link); display: grid; place-items: center; margin-bottom: 14px; }
.feature .icon svg { width: 24px; height: 24px; }
.feature p { color: var(--text-secondary); margin: 0; }

/* Pricing */
.plans { display: grid; gap: 16px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(2, 1fr); } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px 24px; }
.plan.premium { border: 2px solid var(--accent); }
.plan-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name h3 { font-size: 1.4rem; margin: 0; }
.badge { font-size: .78rem; font-weight: 800; padding: 3px 12px; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); }
.plan-price { color: var(--text-secondary); margin: 6px 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0; }
.plan li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.plan li svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--link); }
.plan li.no { color: var(--text-secondary); }
.plan li.no svg { color: var(--text-secondary); }
.fine { font-size: .9rem; color: var(--text-secondary); margin-top: 20px; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font-weight: 800; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2.5px solid var(--text-secondary); border-bottom: 2.5px solid var(--text-secondary);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--text-secondary); margin: 0 0 18px; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .store-badges { justify-content: center; }
.cta-band img.app-icon { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 20px; box-shadow: var(--shadow); }

/* Docs (legal / support) */
.doc { padding: 48px 0 72px; }
.doc .container { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.75rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2em; }
.doc h3 { margin-top: 1.4em; }
.doc .meta { color: var(--text-secondary); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; }
.callout { background: var(--accent-soft); border-radius: var(--r-card); padding: 18px 20px; margin: 24px 0; }
.callout p:last-child { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-scroll { overflow-x: auto; }

/* 404 */
.notfound { text-align: center; padding: 96px 0; }
.notfound img { width: 120px; height: 120px; margin: 0 auto 24px; }
.notfound .lead { margin: 0 auto 28px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; font-size: .95rem; color: var(--text-secondary); }
.site-footer .container { display: grid; gap: 20px; }
@media (min-width: 760px) { .site-footer .container { grid-template-columns: 1fr auto; align-items: center; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text-secondary); font-weight: 700; text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
