/* Shop Buddy: a sheet of plywood with the cuts marked, not a landing page.
   Colours come from the app (plywood cream, sawdust amber) and follow light/dark like the app does. */
:root {
  color-scheme: light dark;
  --bg: #faf6ef;
  --panel: #ffffff;
  --line: #e7dfd2;
  --ink: #1d1a16;
  --muted: #625a50;
  --amber: #a85600;          /* the app's accent (Theme.accent, light): 4.9:1 on --bg, white on it 5.3:1 */
  --amber-text: #a85600;
  --on-amber: #ffffff;
  --sheet: #f2e4cb;
  --grain: rgba(140, 100, 50, 0.18);
  --ok: #2f8f4e;
  --display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --panel: #1e1b18;
    --line: #322d27;
    --ink: #f3eee7;
    --muted: #b1a89c;
    --amber: #e37400;        /* the app's accent (dark): 6:1 on --bg */
    --amber-text: #e37400;
    --on-amber: #1d1a16;
    --sheet: #4a3e31;
    --grain: rgba(255, 255, 255, 0.07);
    --ok: #4fd27b;
  }
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber-text); text-underline-offset: 0.2em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
code { font: 0.92em ui-monospace, "SF Mono", Menlo, monospace; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0.05em 0.35em; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

/* top bar */
.bar { display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 0; }
.bar img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.bar a { color: var(--ink); text-decoration: none; font: 700 1.35rem/1 var(--display); }

/* hero: the marked-up sheet is the memorable thing, everything else stays quiet */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 2.5rem; padding: 2.5rem 0 4rem; }
.hero h1 { margin: 0 0 1rem; font: 800 clamp(2.6rem, 6.5vw, 4.4rem)/1 var(--display); letter-spacing: -0.02em; max-width: 14ch; text-wrap: balance; }
.hero p { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.15rem; max-width: 38ch; }
.status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }

.sheet-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(60, 35, 10, 0.18)); }
.sheet-art .sheet { fill: var(--sheet); }
.sheet-art .grain { stroke: var(--grain); stroke-width: 2; fill: none; }
.sheet-art .cut { stroke: var(--amber); stroke-width: 5; stroke-linecap: round; }
.sheet-art .mark circle { fill: var(--amber); }
.sheet-art .mark text { fill: var(--on-amber); font: 700 15px var(--display); text-anchor: middle; dominant-baseline: central; }
.sheet-art .part { fill: var(--muted); font: 600 11px var(--display); text-anchor: middle; opacity: 0.85; }

/* the saw goes through in cut order */
.cut { stroke-dasharray: 340; stroke-dashoffset: 340; animation: saw 0.55s ease-out forwards; }
.mark { opacity: 0; animation: show 0.25s ease-out forwards; }
.c1 { animation-delay: 0.3s; } .m1 { animation-delay: 0.55s; }
.c2 { animation-delay: 0.9s; } .m2 { animation-delay: 1.15s; }
.c3 { animation-delay: 1.5s; } .m3 { animation-delay: 1.75s; }
.c4 { animation-delay: 2.1s; } .m4 { animation-delay: 2.35s; }
@keyframes saw { to { stroke-dashoffset: 0; } }
@keyframes show { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cut { animation: none; stroke-dashoffset: 0; }
  .mark { animation: none; opacity: 1; }
}

/* sections */
section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
h2 { margin: 0 0 1.5rem; font: 800 2rem/1.1 var(--display); letter-spacing: -0.01em; }
.lede { color: var(--muted); max-width: 60ch; margin: -0.75rem 0 2rem; }

/* three steps: screenshot beside the text, alternating */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.5rem; }
.steps li { display: grid; grid-template-columns: 13.5rem 1fr; gap: 2.5rem; align-items: center; }
.steps li:nth-child(even) { grid-template-columns: 1fr 13.5rem; }
.steps li:nth-child(even) figure { order: 2; }
.steps figure { margin: 0; }
.steps img, .strip img { width: 100%; height: auto; border-radius: 1.2rem; border: 1px solid var(--line); display: block; background: var(--panel); }
.steps h3 { margin: 0.5rem 0; font: 800 1.7rem/1.1 var(--display); }
.steps p { margin: 0; color: var(--muted); max-width: 46ch; }
.num { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--amber); color: var(--amber-text); font: 800 1.1rem/1 var(--display); }

/* what else: tiles like the app's stat tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tiles div { background: var(--panel); padding: 1.4rem 1.4rem 1.6rem; }
.tiles h3 { margin: 0 0 0.4rem; font: 800 1.2rem/1.2 var(--display); }
.tiles p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.pro { display: inline-block; margin-left: 0.35rem; padding: 0 0.5rem; border: 1px solid var(--amber); border-radius: 999px; color: var(--amber-text); font: 700 0.72rem/1.5 var(--display); vertical-align: 0.2em; }

/* screenshot strip */
.strip { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; }
.strip figure { margin: 0; flex: 0 0 auto; width: 13.5rem; scroll-snap-align: start; }
.strip figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; }

/* questions */
.faq { max-width: 46rem; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 0.9rem 2rem 0.9rem 0; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.6rem; font-size: 1.4rem; font-weight: 400; color: var(--muted); }
details[open] summary::after { content: "−"; }
details > div { padding: 0 0 1rem; color: var(--muted); }
details p { margin: 0 0 0.75rem; }
details p:last-child { margin-bottom: 0; }

/* help */
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.help p { margin: 0 0 0.9rem; color: var(--muted); }
.help strong { color: var(--ink); font-weight: 600; }

footer { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* privacy page */
.doc { max-width: 40rem; padding: 2rem 0 4rem; }
.doc h1 { font: 800 clamp(2.4rem, 6vw, 3.4rem)/1 var(--display); letter-spacing: -0.02em; margin: 1rem 0 1.5rem; }
.doc h2 { font-size: 1.3rem; margin: 2rem 0 0.5rem; }
.doc p { color: var(--muted); }
.doc .badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 0.95rem; margin-bottom: 1rem; }
.doc .badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.meta { color: var(--muted); font-size: 0.9rem; margin-top: 2.5rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 1rem; gap: 2rem; }
  .help, .tiles { grid-template-columns: 1fr; }
  .steps li, .steps li:nth-child(even) { grid-template-columns: 1fr; gap: 1.25rem; }
  .steps li:nth-child(even) figure { order: 0; }
  .steps figure { width: min(70%, 15rem); }
}
