/* ============================================================
   Studio Design System — components.css
   Shared chrome for all 6 sites. Requires tokens.css.
   NO inline styles in HTML. NO card hover lift. Motion = feedback only.
   ============================================================ */

/* ---- reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; font-weight: 600; }
h1 { font-size: clamp(2.75rem, 5.2vw, var(--t-60)); line-height: 1.05; letter-spacing: -0.02em;
     text-wrap: balance; max-width: 16ch; }
h2 { font-size: var(--t-36); line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
h3 { font-size: var(--t-24); line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s-4); max-width: 68ch; }
a { color: var(--accent-deep); }
img, svg { max-width: 100%; height: auto; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-5); }
.section { padding: var(--s-9) 0; }
.section-soft { background: var(--bg-soft); }

.eyebrow {
  font-size: var(--t-12); font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-4);
}
.lede { font-size: var(--t-21); line-height: 1.55; color: var(--ink-soft); max-width: 620px; }
.fineprint { font-size: var(--t-14); color: var(--muted); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(20, 20, 30, 0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent);
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 19px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: var(--t-18); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: var(--s-6); list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: var(--t-16); font-weight: 500; }
.nav-links a:hover { color: var(--accent-deep); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  width: 42px; height: 42px; cursor: pointer; color: var(--ink); font-size: 20px; }

/* ---- hero ---- */
.hero { padding: var(--s-10) 0 var(--s-9); }
.hero .eyebrow { margin-bottom: var(--s-4); }
.hero h1 { margin-bottom: var(--s-5); }
.hero .lede { margin-bottom: var(--s-6); }
.hero-cta { display: flex; gap: var(--s-4); flex-wrap: wrap; align-items: center; }
.hero-badges { display: flex; gap: var(--s-4); margin-top: var(--s-6); flex-wrap: wrap; }
.hero-badge { font-size: var(--t-14); color: var(--muted); display: flex; align-items: center; gap: var(--s-2); }
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---- buttons / links: exactly 3 kinds ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-size: var(--t-16); font-weight: 700; letter-spacing: 0.01em; text-decoration: none;
  padding: 14px 28px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.text-link { color: var(--accent-deep); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.text-link::after { content: "\2192"; transition: transform 0.2s var(--ease); }
.text-link:hover::after { transform: translateX(4px); }

/* ---- cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-5); }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s-6); text-decoration: none; color: inherit; display: block;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.card:hover { border-color: var(--accent); box-shadow: var(--shadow-card); }
.card h3 { margin: 0 0 var(--s-3); font-size: var(--t-21); }
.card p { font-size: var(--t-16); color: var(--muted); margin: 0; }
.card-icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: var(--s-4);
}

/* ---- tool page pattern: brief -> input -> action -> results ---- */
.tool-shell { max-width: 860px; margin: 0 auto; }
.tool-brief { margin-bottom: var(--s-7); }
.tool-panel {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s-6); box-shadow: var(--shadow-card); margin-bottom: var(--s-5);
}
.field { margin-bottom: var(--s-5); }
.field label { display: block; font-weight: 600; font-size: var(--t-16); color: var(--ink); margin-bottom: var(--s-2); }
.field .hint { font-size: var(--t-14); color: var(--muted); margin-top: var(--s-2); }
input[type="text"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; font: inherit; font-size: var(--t-16); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--bg);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; }
.result-panel { background: var(--bg-soft); border-radius: var(--radius); padding: var(--s-6); }
.score-ring { font-family: var(--font-display); font-size: var(--t-60); font-weight: 700; color: var(--accent-deep); line-height: 1; }

/* ---- share block (growth hook, static links only) ---- */
.share-block {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: var(--s-5); margin-top: var(--s-6); text-align: center;
}
.share-block p { font-size: var(--t-14); color: var(--muted); margin: 0 0 var(--s-3); }
.share-row { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none;
  font-size: var(--t-14); font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; background: var(--bg);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.share-btn:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---- FAQ (details) ---- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s-4) 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: var(--t-18); color: var(--ink); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: var(--t-24); font-weight: 400; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin: var(--s-3) 0 0; }

/* ---- ad slot: reserved, unobtrusive ---- */
.ad-slot { margin: var(--s-7) auto; text-align: center; min-height: 90px; }
.ad-slot .ad-label { font-size: var(--t-12); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: var(--s-2); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: var(--s-8) 0 var(--s-6); margin-top: var(--s-9); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s-7); margin-bottom: var(--s-7); }
.footer-grid h4 { font-family: var(--font-body); font-size: var(--t-14); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-4); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: var(--s-3); }
.footer-grid a { color: var(--ink-soft); text-decoration: none; font-size: var(--t-16); }
.footer-grid a:hover { color: var(--accent-deep); }
.footer-brand p { font-size: var(--t-14); color: var(--muted); max-width: 34ch; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: var(--s-5); display: flex;
  justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.footer-bottom p { font-size: var(--t-14); color: var(--faint); margin: 0; }

/* ---- reveal (one-time, subtle) ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  h2 { font-size: 1.875rem; }
  .section { padding: var(--s-8) 0; }
  .hero { padding: var(--s-8) 0 var(--s-7); }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: var(--s-2) var(--s-5) var(--s-4);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { border-bottom: none; }
  .site-header { position: sticky; }
  .header-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .tool-panel { padding: var(--s-5); }
}

/* ---- reduced motion: kill everything ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
