/* TaeCondo — site stylesheet. No external fonts or frameworks. */

:root {
  /* Colours come from assets/css/theme.css, generated by build.py from config.json "theme"
     (two main colours plus black; see theme.py). This file has no colour literals except white. */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(var(--deep-rgb), .06), 0 6px 20px rgba(var(--deep-rgb), .06);
  --max: 72rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 700px) { .wrap { padding: 0 2rem; } }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--surface); color: var(--brand-strong); padding: .6rem 1rem;
  border-radius: 8px; box-shadow: var(--shadow); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--bg-rgb), .94);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }

.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1.2rem; color: var(--ink); text-decoration: none;
  margin-right: auto;
}
/* Horizontal lockup: pictogram + wordmark (assets/brand/taecondo-lockup*.svg), ratio 3.8:1. */
.brand img { width: auto; height: 2.5rem; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.site-nav a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 899px) { .site-nav { display: none; } }

.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 .7rem;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); background: var(--surface);
  font-weight: 600; font-size: .92rem; text-decoration: none;
}
.lang-switch:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.9rem; padding: .7rem 1.35rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; text-align: center; line-height: 1.25;
  border: 2px solid transparent;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn-secondary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--soft); }
.btn-small { min-height: 2.5rem; padding: .45rem 1rem; font-size: .95rem; }
@media (max-width: 479px) { .site-header .btn-small { display: none; } }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
@media (min-width: 900px) { section { padding: 5.5rem 0; } }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow {
  display: inline-block; margin-bottom: .8rem;
  font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}
.section-intro { max-width: 46rem; margin-bottom: 2.5rem; }
.section-intro p { color: var(--muted); font-size: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding: 3rem 0 4rem; }
@media (min-width: 900px) { .hero { padding: 5rem 0 6rem; } }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; gap: 4rem; } }
.hero h1 { max-width: 20em; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.2rem; }
.hero-note { font-size: .95rem; color: var(--muted); }
.hero-note a { overflow-wrap: anywhere; }
.hero-figure { margin: 0; }
.hero-figure svg { display: block; width: 100%; }

/* ---------- Problem ---------- */
.problem { max-width: 46rem; }
.problem p { font-size: 1.1rem; color: var(--muted); }

/* ---------- Features ---------- */
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.section-alt .feature { background: var(--bg); box-shadow: none; }
.feature-icon {
  display: inline-flex; width: 2.75rem; height: 2.75rem; border-radius: 12px;
  align-items: center; justify-content: center; background: var(--soft); color: var(--brand);
  margin-bottom: 1rem;
}
.feature-icon svg { width: 1.5rem; height: 1.5rem; }
.feature p, .feature li { color: var(--muted); font-size: 1rem; }
.feature ul { padding-left: 1.1rem; margin: 0; }
.feature p:last-child { margin-bottom: 0; }
.badge {
  display: inline-block; margin: 0 0 .7rem; padding: .15rem .65rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--badge-ink); font-size: .82rem; font-weight: 700;
}
.feature-optional { border-style: dashed; border-color: var(--optional-border); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; counter-increment: step;
}
.step::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 1rem;
}
.step p { color: var(--muted); margin-bottom: 0; }
.setup-time {
  margin-top: 1.8rem; display: inline-block;
  background: var(--accent-soft); padding: .7rem 1.2rem; border-radius: 14px; font-weight: 600;
}
.setup-time small { font-weight: 400; color: var(--muted); margin-left: .3rem; }

/* ---------- Privacy / trust ---------- */
.trust { background: var(--trust-bg); color: var(--trust-text); }
/* The focus ring sits on the dark background here, so it uses a light accent. */
.trust, .site-footer { --focus: var(--focus-on-dark); }
.trust h2, .trust h3 { color: #ffffff; }
.trust .eyebrow { color: var(--trust-accent); }
.trust .section-intro p { color: var(--trust-soft); }
.trust a { color: #ffffff; }
.trust .wrap > .trust-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) { .trust .wrap > .trust-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.trust-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; }
.trust-list svg { width: 1.4rem; height: 1.4rem; margin-top: .2rem; color: var(--accent); }
.trust-note {
  margin-top: 2rem; padding: 1.2rem 1.3rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
}
.trust-note p:last-child { margin-bottom: 0; }
.trust figure { margin: 0; }
.trust figure svg { display: block; width: 100%; }
.trust figcaption { font-size: .9rem; color: var(--trust-caption); margin-top: .6rem; }
.trust .btn-secondary { color: #ffffff; border-color: #ffffff; }
.trust .btn-secondary:hover { background: rgba(255, 255, 255, .1); }

/* ---------- FAQ ---------- */
.faq { max-width: 50rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: .8rem;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 3rem 1.1rem 1.3rem; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.3rem; top: 50%; width: .6rem; height: .6rem;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: translateY(-70%) rotate(45deg); transition: transform .15s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 1.3rem 1.2rem; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .wrap { max-width: 44rem; }
.cta-band p { color: var(--muted); font-size: 1.1rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { color: #ffffff; margin-bottom: .6rem; }
.site-footer h2 { font-size: .95rem; color: #ffffff; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer address { font-style: normal; }
.footer-legal {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: .85rem; color: var(--footer-legal);
}
.footer-legal p { margin-bottom: .4rem; }
.email { overflow-wrap: anywhere; }

/* ---------- Legal pages ---------- */
.legal { padding: 3rem 0 4rem; }
.legal .wrap { display: grid; gap: 2.5rem; }
@media (min-width: 1000px) { .legal .wrap { grid-template-columns: 16rem minmax(0, 1fr); gap: 4rem; } }
.legal-toc { font-size: .95rem; }
@media (min-width: 1000px) { .legal-toc nav { position: sticky; top: 5.5rem; } }
.legal-toc ol { padding-left: 1.2rem; margin: 0; display: grid; gap: .35rem; }
.legal-toc h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.legal-body { max-width: 48rem; min-width: 0; }
.legal-body h2 { font-size: 1.45rem; margin-top: 2.6rem; padding-top: .4rem; }
.legal-body h3 { margin-top: 1.6rem; }
.legal-body ul { padding-left: 1.3rem; }
.legal-body li { margin-bottom: .45rem; }
.legal-meta { color: var(--muted); }
.summary-box {
  background: var(--soft); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 1.5rem 0 1rem;
}
.summary-box h2 { margin-top: 0; font-size: 1.15rem; }
.summary-box ul { margin: 0; }
.table-scroll { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; vertical-align: top; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
@media (max-width: 699px) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { border-bottom: 1px solid var(--line); padding: .6rem 0; }
  tr:last-child { border-bottom: 0; }
  td { border: 0; padding: .3rem 1rem; }
  td::before { content: attr(data-label); display: block; font-weight: 700; font-size: .85rem; color: var(--ink); }
}

/* Owner-configurable values that are still missing are rendered as [TO COMPLETE: …] text. */

/* ---------- 404 ---------- */
.notfound { padding: 5rem 0; text-align: center; }
.notfound .wrap { max-width: 40rem; }
