/* ==========================================================================
   BTC Mate — stylesheet
   Neutral, premium, Apple-like. Bitcoin orange only as a restrained accent.
   System font stack (no web fonts) for speed. Light + dark via tokens.
   ========================================================================== */

:root {
  --bg: #FAFAF8;
  --bg-elev: #FFFFFF;
  --bg-sunken: #F1F1EE;
  --fg: #111113;
  --fg-2: #4A4A52;
  --fg-3: #7A7A84;
  --line: rgba(17, 17, 19, 0.09);
  --line-strong: rgba(17, 17, 19, 0.16);
  --accent: #F7931A;
  --accent-ink: #9A5200;
  --accent-soft: rgba(247, 147, 26, 0.12);
  --ok: #1F8A4C;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.05), 0 24px 60px rgba(0,0,0,.12);
  --radius: 16px;
  --radius-lg: 24px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B0D;
    --bg-elev: #141417;
    --bg-sunken: #0F0F12;
    --fg: #F3F3F1;
    --fg-2: #B7B7BE;
    --fg-3: #80808A;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #F7931A;
    --accent-ink: #FFB765;
    --accent-soft: rgba(247, 147, 26, 0.14);
    --ok: #4CC47F;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.55);
  }
}

/* ---------- reset -------------------------------------------------------- */
*, *::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;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--accent-ink); }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
strong { font-weight: 650; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-sunken); padding: 0.1em 0.4em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--fg); color: var(--bg); padding: .6rem 1rem; border-radius: 10px; }
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
@media (min-width: 720px) { .container { width: min(100% - 4rem, var(--max)); } }

/* ---------- buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; line-height: 1.1;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--fg); color: var(--bg); box-shadow: var(--shadow); }
.btn--primary:hover { color: var(--bg); }
.btn--secondary { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--fg); color: var(--fg); }
.btn--small { padding: .55rem 1rem; font-size: .9375rem; }
.btn--large { padding: 1rem 1.6rem; font-size: 1.0625rem; }
.btn svg { flex: none; }

/* ---------- header ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--fg); }
.brand__icon { border-radius: 8px; }
.brand__name { font-size: 1.05rem; }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.site-nav__list a:not(.btn) {
  display: block; padding: .5rem .8rem; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--fg-2); font-size: .95rem;
}
.site-nav__list a:not(.btn):hover, .site-nav__list a[aria-current="page"] { color: var(--fg); background: var(--bg-sunken); }
.site-nav__cta { margin-left: .5rem; }
.nav-toggle { display: none; }

@media (max-width: 799px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--fg);
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bar::before { top: -6px; } .nav-toggle__bar::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav__list {
    display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; gap: .25rem;
    padding: .75rem 1.25rem 1.25rem; background: var(--bg-elev); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .site-nav__list.is-open { display: flex; }
  .site-nav__list a:not(.btn) { padding: .8rem .9rem; font-size: 1.05rem; }
  .site-nav__cta { margin: .5rem 0 0; }
  .site-nav__cta .btn { width: 100%; }
}

/* ---------- hero --------------------------------------------------------- */
.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2rem, 5vw, 4rem); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto 0 0 50%; transform: translateX(-50%);
  width: min(900px, 120vw); height: 60%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, var(--accent-soft), transparent 65%);
  opacity: .9;
}
.hero__inner { position: relative; display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero__inner { grid-template-columns: 1.1fr .9fr; gap: 3rem; } }
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .muted { color: var(--fg-3); font-weight: 600; }
.hero__lead { font-size: clamp(1.125rem, 2vw, 1.3rem); color: var(--fg-2); max-width: 34rem; margin-bottom: 1.75rem; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.hero__meta { margin-top: 1.25rem; color: var(--fg-3); font-size: .9375rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.hero__meta li { list-style: none; }
.hero__meta ul { margin: 0; padding: 0; display: contents; }
.hero__visual { display: flex; justify-content: center; }
.hero__phone { width: min(300px, 78vw); }

/* ---------- phone frame -------------------------------------------------- */
.shot__frame, .phone {
  position: relative; border-radius: 9.5% / 4.35%; overflow: hidden;
  background: #000; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.06);
  aspect-ratio: 640 / 1404;
}
.shot__frame img, .phone img { width: 100%; height: 100%; object-fit: cover; }
.shot__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; height: 100%;
  border: 2px dashed var(--line-strong); border-radius: inherit; color: var(--fg-3); font-size: .9rem; background: var(--bg-sunken);
}
.shot__empty small { font-family: var(--mono); font-size: .75rem; }

/* ---------- sections ----------------------------------------------------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--bg-sunken); }
.section--tight { padding-top: 0; }
.section__head { max-width: 40rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section__head h2 { margin-bottom: .75rem; }
.section__lead { color: var(--fg-2); font-size: 1.125rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent-ink); margin-bottom: .75rem; }

/* flow diagram */
.flow { display: grid; gap: .5rem; justify-items: center; text-align: center; margin: 0 auto; max-width: 44rem; }
.flow__node {
  width: 100%; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev);
  font-weight: 600; letter-spacing: .02em; box-shadow: var(--shadow);
}
.flow__node--accent { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: linear-gradient(180deg, var(--accent-soft), transparent); }
.flow__node small { display: block; font-weight: 400; color: var(--fg-3); letter-spacing: 0; margin-top: .2rem; font-size: .9rem; }
.flow__arrow { color: var(--fg-3); line-height: 1; padding: .2rem 0; }
.flow__out { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.flow__out span { padding: .5rem .9rem; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line); font-size: .9rem; font-weight: 600; }
.flow__note { margin-top: 1.25rem; color: var(--fg-3); font-size: .95rem; }

/* feature grid */
.features { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features--3 { grid-template-columns: repeat(3, 1fr); } }
.feature {
  padding: 1.5rem; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.feature__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 1rem; }
.feature h3 { margin-bottom: .5rem; font-size: 1.125rem; }
.feature p { color: var(--fg-2); font-size: .975rem; }
.feature a { font-weight: 600; }

/* steps */
.steps { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 1.5rem; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--line); }
.step__num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--fg); color: var(--bg); font-weight: 700; margin-bottom: 1rem; font-size: .95rem; }
.step h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.step p { color: var(--fg-2); font-size: .975rem; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.pill { padding: .5rem .95rem; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .45rem; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
table { border-collapse: collapse; width: 100%; font-size: .975rem; min-width: 520px; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; color: var(--fg-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-sunken); }
tr:last-child td { border-bottom: 0; }
td .yes { color: var(--ok); font-weight: 650; }
td .no { color: var(--fg-3); font-weight: 650; }

/* split (text + image) */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } .split--reverse > :first-child { order: 2; } }
.split__visual { display: flex; justify-content: center; }
.split__visual .phone { width: min(280px, 70vw); }
.split h2 { margin-bottom: 1rem; }
.split p { color: var(--fg-2); }
.split ul { color: var(--fg-2); }

/* screenshots strip */
.shots { display: flex; gap: 1.25rem; overflow-x: auto; padding: .5rem max(1.25rem, calc((100vw - var(--max)) / 2)) 1.5rem; scroll-snap-type: x mandatory; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.shot { flex: 0 0 auto; width: min(240px, 66vw); margin: 0; scroll-snap-align: start; }
.shot figcaption { margin-top: .75rem; font-size: .9rem; color: var(--fg-2); text-align: center; }

/* FAQ */
.faq { display: grid; gap: .5rem; }
.faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); padding: 0 1.25rem; }
.faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.faq__icon { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; transition: transform .2s ease; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: var(--fg); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.faq__icon::before { width: 12px; height: 2px; } .faq__icon::after { width: 2px; height: 12px; transition: opacity .2s ease; }
.faq__item[open] .faq__icon::after { opacity: 0; }
.faq__item[open] .faq__icon { transform: rotate(180deg); }
.faq__answer { padding: 0 0 1.25rem; color: var(--fg-2); max-width: 62ch; }
.faq__more { margin-top: 1.5rem; }

/* callouts */
.callout { border-radius: var(--radius-lg); padding: 1.5rem 1.75rem; border: 1px solid var(--line); background: var(--bg-elev); margin: 2rem 0; }
.callout--facts { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: linear-gradient(180deg, var(--accent-soft), var(--bg-elev) 70%); }
.callout__title { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); margin-bottom: .6rem; }
.callout--note { background: var(--bg-sunken); }
.callout--note strong { display: block; margin-bottom: .25rem; }

/* article pages */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-hero h1 { margin-bottom: 1rem; max-width: 22ch; }
.page-hero__lead { font-size: clamp(1.125rem, 2vw, 1.3rem); color: var(--fg-2); max-width: 40rem; text-wrap: pretty; }
.page-hero__answer { font-size: 1.15rem; max-width: 42rem; padding: 1.25rem 1.5rem; border-left: 4px solid var(--accent); background: var(--bg-elev); border-radius: 0 var(--radius) var(--radius) 0; margin-top: 1.5rem; box-shadow: var(--shadow); }
.page-hero__answer p { margin: 0; }
.prose { max-width: 44rem; }
.prose h2 { margin: 2.5rem 0 .9rem; font-size: clamp(1.5rem, 2.8vw, 1.9rem); }
.prose h3 { margin: 1.75rem 0 .5rem; }
.prose p, .prose li { color: var(--fg-2); }
.prose li { margin-bottom: .35rem; }
.prose strong { color: var(--fg); }
.prose .table-wrap { margin: 1.25rem 0; }
.prose table { min-width: 0; }
.related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.related h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.related a { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .95rem; }
.related a:hover { border-color: var(--fg); }
.legal { max-width: 44rem; }
.legal h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.legal .meta { color: var(--fg-3); font-size: .9rem; }
.legal address { font-style: normal; }
.todo { display: inline-block; background: #FFF1B8; color: #5C4200; font-weight: 600; padding: .1em .5em; border-radius: 6px; font-family: var(--mono); font-size: .85em; }
@media (prefers-color-scheme: dark) { .todo { background: #4A3A00; color: #FFE08A; } }

/* CTA */
.cta { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--bg-sunken); border-top: 1px solid var(--line); }
.cta__inner { text-align: center; max-width: 40rem; display: grid; justify-items: center; gap: 1rem; }
.cta__icon { border-radius: 18px; box-shadow: var(--shadow-lg); }
.cta h2 { margin-top: .5rem; }
.cta p { color: var(--fg-2); font-size: 1.1rem; }
.cta__actions { display: grid; gap: .75rem; justify-items: center; margin-top: .5rem; }
.cta__note { color: var(--fg-3); font-size: .9rem; }

/* footer */
.site-footer { padding: 3.5rem 0 2.5rem; border-top: 1px solid var(--line); font-size: .95rem; }
.site-footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 800px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; } }
.site-footer__about p { color: var(--fg-2); margin: 1rem 0 1.25rem; max-width: 34rem; }
.site-footer__heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-3); margin-bottom: .9rem; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer__col a { text-decoration: none; color: var(--fg-2); }
.site-footer__col a:hover { color: var(--fg); }
.site-footer__bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--fg-3); font-size: .85rem; }
.site-footer__bottom p { max-width: 70rem; }

/* reveal animation (progressive: elements are visible without JS) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* 404 */
.notfound { text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.notfound h1 { margin-bottom: 1rem; }

/* intent block directly under the hero */
.section--intent { padding-top: 0; }
.intent { padding: 2rem 2rem 2.25rem; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 52rem; }
.intent h2 { margin-bottom: .75rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.intent__text { color: var(--fg-2); font-size: 1.1rem; max-width: 46rem; }
.intent__links { margin-top: .75rem; font-weight: 600; }
.intent__links span { color: var(--fg-3); margin: 0 .35rem; }
