/* Peridot site — same look as the app: paper cream, thin borders, charcoal-olive buttons, hand-drawn strike-through. */
:root {
  --bg: #eff0d8; --fg: #1b2112; --muted: #596040; --border: #d6d9b0; --soft: rgba(51, 66, 26, .06);
  --primary: #33421a; --on-primary: #f8f9ec; --accent: #62820f; --accent-soft: rgba(98, 130, 15, .15);
  --glow: rgba(181, 211, 52, .16);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a0e; --fg: #f1f3e0; --muted: #a6ab8c; --border: #2d3520; --soft: rgba(241, 243, 224, .06);
    --primary: #c3dd3c; --on-primary: #151a0e; --accent: #b5d334; --accent-soft: rgba(181, 211, 52, .16);
    --glow: rgba(181, 211, 52, .10); color-scheme: dark;
  }
}
* { box-sizing: border-box; margin: 0; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg);
  background: radial-gradient(60% 40% at 90% -8%, var(--glow), transparent 70%) no-repeat; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* paper grain, light theme only */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .28 0 0 0 0 .16 0 0 0 .9 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E") 0 0 / 260px;
}
@media (prefers-color-scheme: dark) { body::before { display: none; } }
a { color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1080px, 100% - 2rem); margin-inline: auto; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.5vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
.eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; text-wrap: pretty; }
.muted { color: var(--muted); }

/* header */
header.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: 1.15rem; text-decoration: none; }
.brand img { width: 1.9rem; height: 1.9rem; }
nav.links { display: flex; align-items: center; gap: 1.4rem; font-size: .95rem; }
nav.links a:not(.btn) { text-decoration: none; color: var(--muted); }
nav.links a:not(.btn):hover { color: var(--fg); }
nav.links a.btn { text-decoration: none; }
@media (max-width: 640px) { nav.links a.hide-sm { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.9rem; padding: 0 1.4rem; border-radius: .6rem; border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn.ghost:hover { background: var(--soft); }
.btn.small { min-height: 2.4rem; padding: 0 1rem; font-size: .92rem; }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* hero */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 3rem; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 1rem; }
.hero h1 { margin: .8rem 0 1.2rem; }
.fine { font-size: .9rem; color: var(--muted); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* app frame + chips */
.frame { border: 1px solid var(--border); border-radius: 1rem; background: var(--bg); overflow: hidden; box-shadow: 0 1px 0 var(--soft); }
.frame img { display: block; width: 100%; height: auto; }
.frame .bar { display: flex; gap: .4rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); }
.frame .bar i { width: .65rem; height: .65rem; border-radius: 50%; background: var(--border); }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.chip { position: relative; min-height: 2.4rem; padding: 0 .9rem; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: .5rem; font-size: .92rem; font-variant-numeric: tabular-nums; }
.chip svg { position: absolute; left: .55rem; top: 50%; width: calc(100% - 1.1rem); height: .8rem; transform: translateY(-50%); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; opacity: .75; pointer-events: none; }
.chip svg path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.chip.done { animation: tint 7s infinite; animation-delay: var(--d, 0s); color: var(--accent); }
.chip.done svg path { animation: scribble 7s infinite; animation-delay: var(--d, 0s); }
@keyframes scribble { 0%, 6% { stroke-dashoffset: 1; } 14%, 86% { stroke-dashoffset: 0; } 94%, 100% { stroke-dashoffset: 1; } }
@keyframes tint { 0%, 6% { background: transparent; border-color: var(--border); } 14%, 86% { background: var(--accent-soft); border-color: var(--accent); } 94%, 100% { background: transparent; border-color: var(--border); } }
.chip.static svg path { stroke-dashoffset: 0; }
.chip.static { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* sections */
section { padding: clamp(3rem, 7vw, 5rem) 0; }
.sec-head { max-width: 38rem; margin-bottom: 2.5rem; display: grid; gap: .8rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--border); border-radius: .9rem; padding: 1.4rem; display: grid; gap: .6rem; align-content: start; }
.card p { color: var(--muted); font-size: .98rem; }
.ico { width: 2.4rem; height: 2.4rem; border-radius: .6rem; background: var(--soft); display: grid; place-items: center; color: var(--accent); }
.ico svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 2px solid var(--accent); padding-top: 1rem; display: grid; gap: .5rem; }
.step::before { counter-increment: s; content: "0" counter(s); font-size: .85rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.step p { color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.band { border: 1px solid var(--border); border-radius: 1.2rem; padding: clamp(1.6rem, 4vw, 3rem); background: var(--soft); display: grid; gap: 1rem; }
.band ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.band li::before { content: "—  "; color: var(--accent); }

/* faq: animated height (native) */
details.faq { border-bottom: 1px solid var(--border); interpolate-size: allow-keywords; }
details.faq summary { cursor: pointer; padding: 1.1rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; transition: rotate .3s; }
details.faq[open] summary::after { rotate: 45deg; }
details.faq::details-content { block-size: 0; overflow: hidden; transition: block-size .45s cubic-bezier(.65, 0, .35, 1), content-visibility .45s allow-discrete; }
details.faq[open]::details-content { block-size: auto; }
details.faq p { color: var(--muted); padding-bottom: 1.1rem; max-width: 42rem; }

/* download page */
.os { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .os { grid-template-columns: 1fr; } }
.os ol { padding-left: 1.2rem; color: var(--muted); display: grid; gap: .35rem; font-size: .98rem; }
kbd, code { font: .88em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); border: 1px solid var(--border); border-radius: .35rem; padding: .08em .4em; }
pre { font: .88rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); border: 1px solid var(--border); border-radius: .7rem; padding: 1rem 1.2rem; overflow-x: auto; }
.stores { display: flex; flex-wrap: wrap; gap: .8rem; }
.soon { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--border); border-radius: 99px; padding: .1rem .55rem; margin-left: .3rem; color: var(--muted); }

footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; margin-top: 2rem; color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer nav { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .chip.done svg path { stroke-dashoffset: 0; } .chip.done { background: var(--accent-soft); border-color: var(--accent); } }

/* language switcher */
header.top nav.lang { width: min(1080px, 100% - 2rem); margin-inline: auto; display: flex; justify-content: flex-end; gap: .4rem; font-size: .85rem; }
nav.lang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .6rem; color: var(--muted); text-decoration: none; }
nav.lang a[href]:hover { color: var(--fg); text-decoration: underline; }
nav.lang a[aria-current="true"] { color: var(--fg); font-weight: 600; }
