/* ============================================================
   Summa OS — shared design system
   Two pages, one system, two moods (dark / light)
   ============================================================ */

:root {
  --font-head: "Space Grotesk", "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1160px;
  --pad: clamp(16px, 4vw, 40px);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --shadow: 0 12px 40px rgba(2, 6, 23, 0.12);

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --tap: 44px;
}

/* ---------- Theme scopes ---------- */
body.theme-dark {
  --bg: #0A0E1A;
  --bg-soft: #0F1527;
  --card: #101729;
  --card-2: #131C32;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --accent: #22D3EE;
  --accent-ink: #06222B;
  --heading: #FFFFFF;
  --border: rgba(148, 163, 184, 0.16);
  --header-bg: rgba(10, 14, 26, 0.88);
  color-scheme: dark;
}

body.theme-light {
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --card: #FFFFFF;
  --card-2: #F8FAFC;
  --text: #0F172A;
  --text-muted: #475569;
  --primary: #1E3A8A;
  --primary-ink: #FFFFFF;
  --accent: #0EA5E9;
  --accent-ink: #FFFFFF;
  --heading: #1E3A8A;
  --border: #E2E8F0;
  --header-bg: rgba(255, 255, 255, 0.92);
  color-scheme: light;
}

/* ---------- Base ---------- */
* { 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(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img, svg, video { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.65em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

.light-theme h1,
.light-theme h2,
.light-theme h3,
.light-theme h4 { color: var(--primary); }

::selection { background: var(--accent); color: var(--accent-ink); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section { padding: clamp(56px, 9vw, 104px) 0; }

.section--soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 720px;
}

.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }

.section-head h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); margin-bottom: 12px; }

.muted { color: var(--text-muted); }

/* accent usage stays restrained (< ~10% of viewport) */
.accent { color: var(--accent); }

/* ---------- Skip link & focus ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Reveal-on-scroll (subtle, JS-gated) ----------
   Content is only hidden when JS is available (`.js` class on <html>).
   Without JS, everything stays visible — no blank sections. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--accent:hover { filter: brightness(1.06); }

.btn--primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--lg { padding: 15px 28px; font-size: 1.06rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--heading);
  text-decoration: none;
}

.brand span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--text); }

.nav a[aria-current="page"] {
  color: var(--heading);
  border-bottom-color: var(--accent);
}

.header-cta {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-family: var(--font-head);
  text-decoration: none;
}

body.theme-light .header-cta { background: var(--primary); color: var(--primary-ink); }

@media (max-width: 760px) {
  .header-inner { padding-bottom: 12px; }
  .nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    gap: 26px;
    padding-top: 4px;
  }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 8vw, 96px); }

.hero h1 {
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  max-width: 18ch;
  margin-bottom: 18px;
}

.hero .lead { margin-bottom: 28px; }

.hero-note { font-size: 0.95rem; color: var(--text-muted); margin-top: 22px; }

/* wave motif */
.motif-wave {
  width: min(320px, 100%);
  height: 54px;
  color: var(--accent);
  opacity: 0.9;
  margin: 30px 0 0;
}

/* ---------- Sticky mobile call bar (umbrella only) ---------- */
.mobile-callbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.mobile-callbar .btn { width: 100%; }

@media (max-width: 760px) {
  .mobile-callbar { display: block; }
  body { padding-bottom: 78px; }
}

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }

.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
}

.card h3 { font-size: 1.4rem; }

.card .pill {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* power steps */
.power { position: relative; overflow: hidden; }

.power .num {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

/* vertical cards */
.vertical .domain {
  display: block;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 14px;
}

.vertical .price {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--heading);
  margin: 6px 0 16px;
}

.vertical .card-link {
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Proof ---------- */
.proof-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-2);
  padding: clamp(24px, 4vw, 40px);
  text-align: left;
}

.placeholder {
  display: block;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px;
  color: var(--accent);
  font-size: 0.92rem;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

/* ---------- Stats ---------- */
.stat { padding: 4px 0; }

.stat-value {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--heading);
  margin-bottom: 12px;
}

body.theme-dark .stat-value { color: var(--accent); }

.stat-source {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* quote */
.pull-quote {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.35;
  color: var(--heading);
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  max-width: 760px;
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; }

.step {
  position: relative;
  padding-left: 66px;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--accent);
  background: var(--card);
}

/* hard rules */
.rule {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.rule-tag {
  flex: 0 0 auto;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
}

/* housing inspection motif */
.motif-inspect {
  width: min(220px, 100%);
  height: auto;
  color: var(--primary, #1E3A8A);
}

body.theme-dark .motif-inspect { color: var(--accent); }

.check-list { list-style: none; margin: 18px 0 0; padding: 0; }

.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  color: var(--text);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- FAQ accordion ---------- */
.accordion { display: grid; gap: 12px; max-width: 820px; }

.acc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}

.acc-btn {
  width: 100%;
  min-height: var(--tap);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  background: none;
  color: var(--heading);
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.acc-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  position: relative;
  transition: transform 0.2s var(--ease);
}

.acc-icon::before,
.acc-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 18px;
  height: 2px;
  background: var(--accent);
}

.acc-icon::after { transform: rotate(90deg); }

.acc-item.open .acc-icon { transform: rotate(45deg); }

.acc-panel {
  display: none;
  padding: 0 20px 18px;
  color: var(--text-muted);
  max-width: 680px;
}

.acc-item.open .acc-panel { display: block; }

/* ---------- Split layout (phase 2) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- Offer band ---------- */
.offer-band {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card-2);
  padding: clamp(26px, 5vw, 52px);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  align-items: center;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.footer-links a { text-decoration: none; }
