/* Doc JS site styles. Shared by index.html and policies.html */

:root {
  --forest: #0c3b2a;
  --deep: #072a1d;
  --leaf: #2d6a4f;
  --mint: #e9f3ec;
  --paper: #fbfdfb;
  --ink: #10211a;
  --muted: #4a5d52;
  --on-dark: #b9d6c5;
  --gold: #f5b82e;
  --owe: #c8402a;
  --line: #d2e1d7;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font: 500 17px/1.6 var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: inherit; text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--deep); }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h2 { font-size: clamp(32px, 8vw, 54px); }
p { text-wrap: pretty; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--deep);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-dark { background: var(--forest); color: #fff; }
.btn-line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #ffc94d; }
  .btn-dark:hover { background: var(--deep); }
  .btn-line:hover { background: rgba(255, 255, 255, 0.1); }
}

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 22px/1 var(--display);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo-mark { display: block; width: 36px; height: 36px; object-fit: contain; }
.site-head nav { display: flex; align-items: center; gap: 4px; }
.site-head nav a:not(.btn) { padding: 12px; font-weight: 700; font-size: 15px; text-decoration: none; }
.site-head .btn { min-height: 44px; padding: 0 18px; font-size: 15px; background: var(--forest); color: #fff; }

/* Hero */
.hero { background: var(--forest); color: #fff; padding: 44px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; gap: 48px; }
.hero h1 { font-size: clamp(42px, 12vw, 88px); max-width: 12ch; }
.hero-lead { margin-top: 20px; max-width: 32ch; font-size: 20px; color: var(--on-dark); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 16px; font-size: 15px; color: var(--on-dark); }

/* Phone with live shop feed */
.phone-wrap { justify-self: center; width: min(320px, 100%); }
.phone { background: var(--deep); border-radius: 40px; padding: 10px; box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.55); }
.screen { background: var(--mint); color: var(--ink); border-radius: 31px; padding: 20px 16px 16px; min-height: 470px; }
.screen-title { font-weight: 800; font-size: 15px; color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 16px; }
.stats div { background: #fff; border-radius: 16px; padding: 12px 14px; }
.stats span { display: block; font-size: 13px; color: var(--muted); font-weight: 700; }
.stats b { display: block; font: 800 28px/1.15 var(--display); font-variant-numeric: tabular-nums; }
.stats .owed b { color: var(--owe); }

.feed { list-style: none; padding: 0; display: flex; flex-direction: column-reverse; gap: 8px; }
.feed li { display: grid; grid-template-columns: 46px 1fr; gap: 10px; background: #fff; border-radius: 14px; padding: 11px 12px; font-size: 14px; line-height: 1.4; font-weight: 700; }
.feed time { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.feed .tag { background: var(--gold); color: var(--deep); border-radius: 5px; padding: 1px 6px; font-weight: 800; font-size: 13px; }
.js .feed li { display: none; }
.js .feed li.in { display: grid; animation: arrive 500ms var(--ease); }
@keyframes arrive { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.phone-note { margin-top: 14px; text-align: center; font-size: 14px; color: var(--on-dark); }

/* What you get */
.know { padding: 80px 0; }
.know .wrap { display: grid; gap: 36px; }
.know ul { list-style: none; padding: 0; }
.know li { padding: 26px 0; border-top: 1px solid var(--line); }
.know li:last-child { border-bottom: 1px solid var(--line); }
.know h3 { font-size: clamp(26px, 6vw, 34px); }
.know li p { margin-top: 8px; max-width: 44ch; color: var(--muted); }

/* How it works */
.flow { background: var(--mint); padding: 80px 0; }
.flow ol { list-style: none; padding: 0; display: grid; gap: 28px; margin-top: 36px; }
.flow li { border-top: 3px solid var(--forest); padding-top: 16px; }
.flow h3 { font-size: 28px; }
.flow p { margin-top: 6px; max-width: 30ch; color: var(--muted); }

/* Closing call to action */
.join { padding: 80px 0 24px; }
.join-box { background: var(--forest); color: #fff; border-radius: 28px; padding: 44px 24px; }
.join-box h2 { font-size: clamp(40px, 11vw, 80px); }
.join-box p { margin: 16px 0 28px; max-width: 40ch; font-size: 19px; color: var(--on-dark); }

/* FAQ */
.faq { padding: 64px 0 72px; }
.faq h2 { margin-bottom: 20px; font-size: clamp(28px, 7vw, 40px); }
.faq details { border-top: 1px solid var(--line); max-width: 760px; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 28px; font-weight: 500; color: var(--leaf); transition: transform 200ms var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 20px; max-width: 58ch; color: var(--muted); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 15px; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; }

/* Policies page */
.policy { padding: 56px 0 72px; }
.policy-head { padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.policy-head h1 { font-size: clamp(36px, 9vw, 60px); }
.policy-head p { margin-top: 14px; max-width: 52ch; color: var(--muted); }
.policy-grid { display: grid; gap: 40px; }
.toc { display: none; }
.policy-body { max-width: 680px; }
.policy-body section { padding-bottom: 36px; }
.policy-body h2 { font-size: clamp(26px, 5vw, 32px); margin-bottom: 12px; }
.policy-body p { color: var(--muted); }
.policy-body p + p { margin-top: 12px; }
.policy-body .callout { margin-top: 16px; padding: 18px 20px; background: var(--mint); border-radius: 16px; color: var(--ink); font-size: 16px; }

/* Wider screens */
@media (min-width: 900px) {
  .hero { padding: 80px 0 104px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 64px; }
  .know, .flow { padding: 112px 0; }
  .know .wrap { grid-template-columns: 5fr 7fr; gap: 72px; }
  .flow ol { position: relative; grid-template-columns: repeat(3, 1fr); gap: 48px; }
  .flow ol::before,
  .flow ol::after { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
  .flow ol::after { background: var(--forest); transform-origin: left; }
  .flow li { position: relative; border-top: 0; padding-top: 44px; }
  .flow li::before { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 6px var(--mint); }
  .flow h3 { font-size: 32px; }
  .flow p { font-size: 18px; max-width: 28ch; }
  .join { padding: 112px 0 32px; }
  .join-box { padding: 72px; }
  .policy-grid { grid-template-columns: 240px 1fr; gap: 72px; align-items: start; }
  .toc { display: block; position: sticky; top: 96px; }
  .toc a { display: block; padding: 9px 0 9px 14px; border-left: 2px solid var(--line); font-weight: 700; font-size: 15px; color: var(--muted); text-decoration: none; }
  .toc a[aria-current="true"] { border-left-color: var(--forest); color: var(--ink); }
}

/* Scroll reveal. Hidden only when JS is running, so the page works without it. */
.js [data-reveal] { opacity: 0; transform: translateY(18px); }
.js [data-reveal].in {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 260ms);
}
.js .join-box[data-reveal]:not(.in) { transform: translateY(24px) scale(0.97); }

.js .know li { border-top-color: transparent; position: relative; }
.js .know li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms var(--ease);
}
.js .know li.in::before { transform: scaleX(1); }

.js.reveal-static [data-reveal],
.js.reveal-static .know li::before { transition: none; }

@media (min-width: 900px) {
  .js .flow ol::after { transform: scaleX(0); transition: transform 1400ms var(--ease); }
  .js .flow ol.in::after { transform: scaleX(1); }
  .js.reveal-static .flow ol::after { transition: none; }
}

@media (min-width: 600px) and (max-height: 500px) {
  .hero { padding: 16px 0 24px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 24px; }
  .hero h1 { max-width: 100%; font-size: clamp(40px, 5.5vw, 48px); }
  .hero-lead { margin-top: 12px; font-size: 17px; }
  .hero-cta { margin-top: 18px; }
  .hero-note { margin-top: 10px; }
  .phone-wrap { width: min(280px, 100%); }
}

@media (hover: hover) and (pointer: fine) {
  .site-head nav a:not(.btn):hover, .site-foot a:hover, .toc a:hover { text-decoration: underline; }
}

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