/* =====================================================================
   pipli.app shared stylesheet
   Tokens come from the app's V15 design system (design/v15/SYSTEM.md).
   Every page uses the same components: .site-header, .band, .btn,
   .card, .feature, .faq, .legal (prose + sticky contents), .site-footer.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --cream: #FFF4E4;
  --cream-2: #F8EAD5;
  --white: #FFFFFF;
  --ink: #14242A;
  --ink-2: #4E5E63;
  --hair: rgba(20, 36, 42, .10);
  --teal: #1F758E;
  --teal-deep: #17607A;
  --teal-tint: #DDEFF3;
  --yellow: #FFC94A;
  --sun: #FFD45E;
  --yellow-tint: #FFF0C9;

  --f-display: "Bricolage Grotesque", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --gutter: 20px;
  --max: 1120px;
  --r-sm: 12px;
  --r-card: 24px;
  --r-panel: 32px;
  --r-band: 36px;

  --e1: 0 2px 0 rgba(20, 36, 42, .08);
  --e3: 0 8px 24px rgba(20, 36, 42, .16), 0 2px 0 rgba(20, 36, 42, .06);
  --focus: 0 0 0 3px var(--cream), 0 0 0 6px var(--ink);
}
@media (min-width: 768px) {
  :root { --gutter: 32px; --r-band: 56px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: var(--teal-tint); color: var(--ink); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: 999px;
  font: 700 15px/1 var(--f-display); text-decoration: none; box-shadow: var(--e3);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font: 700 13px/1.2 var(--f-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 12px;
}

/* ---------- 3. Header band (the app's signature: colour block, curved bottom) ---------- */
.band {
  background: var(--teal);
  color: #fff;
  border-radius: 0 0 var(--r-band) var(--r-band);
  position: relative;
}
.band a { color: #fff; }
.band .eyebrow { color: rgba(255, 255, 255, .86); }
.band :focus-visible { box-shadow: 0 0 0 3px var(--teal), 0 0 0 6px #fff; }

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 24px/1 var(--f-display); letter-spacing: -0.02em;
  text-decoration: none; color: inherit;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .35); }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; text-decoration: none;
  font: 700 16px/1 var(--f-display);
}
.site-nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .18); }
.site-nav .nav-optional { display: none; }
@media (min-width: 600px) { .site-nav .nav-optional { display: list-item; } }

/* Page header band (legal, support, 404) */
.page-head { padding-top: 28px; padding-bottom: 48px; }
.page-head h1 { font-size: clamp(36px, 7vw, 56px); line-height: 1.04; max-width: 16ch; }
.page-head .lede { margin-top: 14px; font-size: 18px; line-height: 1.45; font-weight: 500; color: rgba(255, 255, 255, .9); max-width: 46ch; }
@media (min-width: 768px) { .page-head { padding-top: 40px; padding-bottom: 72px; } }

/* ---------- 4. Hero (landing) ---------- */
.hero { padding-top: 24px; padding-bottom: 0; display: grid; gap: 40px; }
.hero__copy { padding-bottom: 8px; }
.hero h1 { font-size: clamp(46px, 11vw, 84px); line-height: .98; letter-spacing: -0.035em; max-width: 9ch; }
.hero h1 .hl {
  background: linear-gradient(transparent 62%, rgba(255, 201, 74, .95) 62%, rgba(255, 201, 74, .95) 90%, transparent 90%);
  color: #fff;
  padding: 0 .04em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hero .sub { margin-top: 20px; font-size: 19px; line-height: 1.45; font-weight: 500; color: rgba(255, 255, 255, .92); max-width: 30ch; }
.hero__visual { position: relative; display: flex; justify-content: center; margin-bottom: -96px; }
.hero__visual .device { width: min(68vw, 290px); }
.hero__pip {
  position: absolute; width: min(30vw, 150px); left: max(0px, calc(50% - min(68vw, 290px) / 2 - min(20vw, 96px))); bottom: 64px;
  filter: drop-shadow(0 10px 14px rgba(20, 36, 42, .18));
}
.hero-spacer { height: 112px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.1fr .9fr; align-items: end; padding-top: 40px; gap: 32px; }
  .hero__copy { padding-bottom: 120px; }
  .hero .sub { font-size: 21px; }
  .hero__visual { margin-bottom: -120px; justify-content: flex-end; padding-right: 40px; }
  .hero__visual .device { width: 320px; }
  .hero__pip { width: 170px; left: auto; right: 300px; bottom: 120px; }
  .hero-spacer { height: 176px; }
}

/* ---------- 5. Store slot (placeholder until the App Store link is live) ---------- */
.store-slot {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 56px; padding: 9px 22px; margin-top: 28px;
  border: 1.5px solid rgba(255, 255, 255, .55); border-radius: 14px;
  color: #fff; text-decoration: none;
}
.store-slot small { font: 600 12px/1.2 var(--f-body); letter-spacing: .02em; opacity: .85; }
.store-slot span { font: 700 20px/1.15 var(--f-display); letter-spacing: -0.01em; }
.store-slot--ink { border-color: rgba(20, 36, 42, .35); color: var(--ink); }

/* ---------- 6. Phone frame (CSS only) ---------- */
.device {
  position: relative;
  background: var(--ink);
  border-radius: 48px;
  padding: 9px;
  box-shadow: 0 30px 60px -20px rgba(20, 36, 42, .45), 0 2px 0 rgba(20, 36, 42, .2);
}
.device img { width: 100%; border-radius: 39px; background: var(--cream); aspect-ratio: 1179 / 2556; object-fit: cover; }
.device::after { /* camera island */
  content: ""; position: absolute; top: 19px; left: 50%; width: 28%; height: 22px;
  transform: translateX(-50%); background: var(--ink); border-radius: 999px;
}
@media (max-width: 480px) {
  .device { border-radius: 38px; padding: 7px; }
  .device img { border-radius: 31px; }
  .device::after { top: 15px; height: 18px; }
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  font: 800 18px/1 var(--f-display); letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  background: var(--teal); color: #fff;
  transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--teal-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn--secondary { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 2.5px var(--teal); }
.btn--secondary:hover { background: var(--teal-tint); color: var(--teal-deep); }
.btn--secondary:focus-visible { box-shadow: inset 0 0 0 2.5px var(--teal), var(--focus); }

/* ---------- 8. Sections, cards ---------- */
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--closer { padding-top: 24px; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(32px, 5.5vw, 48px); line-height: 1.04; }
.section-head p { margin-top: 14px; font-size: 18px; color: var(--ink-2); }

.card {
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--e1);
  padding: 24px;
}
.card h2, .card h3 { font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; }
.card p + p { margin-top: 10px; }

/* ---------- 9. Feature rows ---------- */
.features { display: grid; gap: 88px; }
.feature { display: grid; gap: 28px; align-items: center; }
.feature__text h2 { font-size: clamp(32px, 5.4vw, 46px); line-height: 1.04; max-width: 13ch; }
.feature__text p { margin-top: 16px; font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 40ch; }
.feature__text p strong { color: var(--ink); font-weight: 700; }
.feature__list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; max-width: 42ch; }
.feature__list li { padding-left: 16px; border-left: 3px solid var(--teal); font-size: 17px; color: var(--ink-2); }
.feature__list li strong { display: block; color: var(--ink); font: 800 19px/1.25 var(--f-display); letter-spacing: -0.01em; margin-bottom: 2px; }
.feature__media {
  background: var(--cream-2);
  border-radius: var(--r-panel);
  overflow: hidden;
  display: flex; justify-content: center; align-items: center;
  padding: 36px 24px;
}
.feature__media .device { width: min(62vw, 240px); box-shadow: 0 20px 40px -18px rgba(20, 36, 42, .35); }
.feature__media--teal { background: var(--teal-tint); }
@media (min-width: 900px) {
  .features { gap: 120px; }
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; }
  .feature--flip .feature__media { order: -1; }
  .feature__media { padding: 56px 40px; }
  .feature__media .device { width: 270px; }
}

/* ---------- 10. Facts row (plain text, no icon grid) ---------- */
.facts { display: grid; gap: 0; border-top: 1.5px solid var(--hair); }
.fact { padding: 22px 0; border-bottom: 1.5px solid var(--hair); }
.fact h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.fact p { margin-top: 6px; color: var(--ink-2); max-width: 36ch; }
@media (min-width: 900px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 40px; border-top: 0; }
  .fact { border-bottom: 0; border-top: 1.5px solid var(--hair); padding-top: 24px; }
}

/* ---------- 11. Closing call to action ---------- */
.closer {
  background: var(--teal); color: #fff;
  border-radius: var(--r-panel);
  padding: 36px 24px 0;
  display: grid; gap: 8px;
  overflow: hidden;
}
.closer h2 { font-size: clamp(32px, 5.6vw, 48px); line-height: 1.04; max-width: 14ch; }
.closer p { margin-top: 12px; font-size: 18px; color: rgba(255, 255, 255, .9); max-width: 38ch; }
.closer .store-slot { margin-top: 24px; }
.closer__pic { justify-self: end; align-self: end; }
.closer__pip { width: 170px; margin: 0 -4px -16px 0; }
@media (min-width: 900px) {
  .closer { grid-template-columns: 1fr auto; align-items: end; padding: 56px 56px 0; }
  .closer__copy { padding-bottom: 56px; }
  .closer__pip { width: 240px; margin: 0 0 -24px; }
}

/* ---------- 12. FAQ accordion (details/summary) ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--white); border-radius: 20px; box-shadow: var(--e1);
}
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 20px;
  font: 700 18px/1.3 var(--f-display); letter-spacing: -0.005em;
  border-radius: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--cream-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7 1v12M1 7h12' stroke='%2314242A' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 20px; color: var(--ink-2); max-width: 62ch; }
.faq .answer p + p, .faq .answer p + ol, .faq .answer ol + p { margin-top: 10px; }
.faq .answer strong { color: var(--ink); }
.faq .answer ol { margin: 10px 0 0; padding-left: 22px; }
.faq .answer li + li { margin-top: 4px; }

/* ---------- 13. Contact block ---------- */
.contact { display: grid; gap: 20px; }
.contact__email {
  font: 800 clamp(24px, 6vw, 34px)/1.1 var(--f-display); letter-spacing: -0.02em;
  user-select: all; -webkit-user-select: all; word-break: break-all;
  margin-top: 6px;
}
.contact__note { color: var(--ink-2); max-width: 52ch; }
.contact .btn { justify-self: start; }
.support-grid { display: grid; gap: 48px; }
.support-grid h2.block-title { font-size: 28px; line-height: 1.1; margin-bottom: 20px; }
@media (min-width: 900px) {
  .support-grid { grid-template-columns: 360px 1fr; gap: 56px; align-items: start; }
  .support-grid .contact { position: sticky; top: 24px; }
}

/* ---------- 14. Legal prose with sticky contents ---------- */
.legal { display: grid; gap: 32px; padding-top: 40px; padding-bottom: 80px; }
.toc {
  background: var(--white); border-radius: var(--r-card); box-shadow: var(--e1);
  padding: 20px 20px 16px;
}
.toc h2 { font: 700 13px/1.2 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; padding: 7px 0; min-height: 36px; align-items: baseline;
  color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35;
}
.toc a::before { content: counter(toc); font: 700 13px/1 var(--f-display); color: var(--teal); min-width: 18px; }
.toc a:hover { color: var(--teal); }
@media (min-width: 960px) {
  .legal { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding-top: 56px; }
  .toc { position: sticky; top: 24px; align-self: start; background: transparent; box-shadow: none; padding: 0; }
}

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 14px; }
.prose h2 {
  font-size: 26px; line-height: 1.15; letter-spacing: -0.015em;
  margin-top: 52px; padding-top: 28px; border-top: 1.5px solid var(--hair);
  scroll-margin-top: 24px;
}
.prose h2:first-of-type { margin-top: 40px; }
.prose h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; margin-top: 28px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--teal); }
.prose strong { font-weight: 700; }
.prose .meta { color: var(--ink-2); font-size: 15px; }

.summary-card { background: var(--white); border-radius: var(--r-card); box-shadow: var(--e1); padding: 22px 24px; }
.prose .summary-card h2 { font-size: 22px; margin: 0; padding: 0; border: 0; }
.summary-card ul { margin-top: 12px; }

.data-list { display: grid; gap: 12px; margin-top: 18px; }
.data-item { background: var(--white); border-radius: 20px; box-shadow: var(--e1); padding: 20px; }
.data-item h3 { margin: 0 0 6px; font-size: 18px; }
.data-item dl { margin: 6px 0 0; }
.data-item dt { margin-top: 14px; }
.data-item dt { font: 700 12px/1.2 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.data-item dd { margin: 4px 0 0; }
@media (min-width: 700px) {
  .data-item dl { display: grid; grid-template-columns: 150px 1fr; gap: 12px 20px; margin-top: 16px; }
  .data-item dt { margin: 3px 0 0; }
  .data-item dd { margin: 0; }
}

.todo {
  background: var(--yellow-tint); color: var(--ink);
  outline: 1.5px dashed #B58300; outline-offset: 1px;
  border-radius: 4px; padding: 0 4px; font-weight: 700;
}

/* ---------- 15. 404 ---------- */
.notfound { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 96px; align-items: center; }
.notfound img { width: 200px; transform: scaleX(-1); }
.notfound__text p { font-size: 18px; color: var(--ink-2); max-width: 40ch; }
.notfound .links { margin-top: 24px; }
.notfound .links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .notfound { grid-template-columns: 1fr auto; } .notfound img { width: 260px; } }

/* ---------- 16. Footer ---------- */
.site-footer { border-top: 1.5px solid var(--hair); padding: 32px 0 40px; margin-top: 24px; }
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer .brand { color: var(--ink); font-size: 20px; }
.site-footer .brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: none; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 4px; }
.site-footer ul a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--ink); text-decoration: none; font: 700 15px/1 var(--f-display);
  border-radius: 999px;
}
.site-footer ul li:first-child a { padding-left: 0; }
.site-footer ul a:hover { color: var(--teal); }
.site-footer small { color: var(--ink-2); font-size: 14px; }
@media (min-width: 768px) {
  .site-footer .wrap { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
  .site-footer ul { justify-content: center; }
  .site-footer ul li:first-child a { padding-left: 10px; }
}

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