/* ==========================================================================
   home.css - home page composition (site.css provides the shared system)
   ========================================================================== */

/* ---------- Hero ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: -1; }
}
.hero-content h1 { max-width: 24ch; }
.hero-content .lead { font-size: 1.18rem; }
.hero-note { margin: 14px 0 0; }

.hero-visual { position: relative; }
.hero-frame {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-alt));
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 26px;
  padding: 10px;
  box-shadow: var(--shadow-float);
}
.hero-frame picture, .hero-frame img { display: block; width: 100%; height: auto; border-radius: 17px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-frame {
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-alt));
    border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  }
}

.hero-badge-card {
  position: absolute;
  left: -18px;
  bottom: -24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 20px;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 320px;
}
.hero-badge-card .badge-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent2) 12%, transparent);
  color: var(--accent2-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.hero-badge-card strong { display: block; font-size: 14.5px; font-weight: 720; }
.hero-badge-card span { font-size: 13px; color: var(--muted); line-height: 1.4; display: block; }
@media (max-width: 1024px) { .hero-badge-card { left: 12px; bottom: -18px; } }
@media (max-width: 460px) { .hero-badge-card { position: static; margin-top: 14px; max-width: none; } }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 640;
  color: var(--muted);
  margin-bottom: 4px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent2-text);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-rise { animation: hero-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-rise-d1 { animation-delay: 0.08s; }
  .hero-rise-d2 { animation-delay: 0.16s; }
  .hero-rise-d3 { animation-delay: 0.24s; }
  .hero-rise-d4 { animation-delay: 0.32s; }
  @keyframes hero-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Stats band ---------- */
.stats-band { margin-top: 28px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.stat { text-align: center; padding: 10px 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat-n {
  display: block;
  font-size: 2rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-n sup { font-size: 0.55em; font-weight: 640; }
.stat-t { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.4; margin-top: 4px; }
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .stat:nth-child(4) { border-left: none; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: none; }
  .stat-n { font-size: 1.6rem; }
}

/* ---------- Trust strip ---------- */
.trust-strip {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.trust-strip-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 26px 8px;
  max-width: 380px;
}
.trust-item .check {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--badge-win-text) 12%, transparent);
  color: var(--badge-win-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.trust-item strong { display: block; font-size: 15.5px; font-weight: 700; }
.trust-item span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Ledger ---------- */
.ledger { max-width: 960px; margin: 0 auto; }
.ledger-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 34px;
  align-items: start;
  padding: 34px 4px;
  border-bottom: 1px solid var(--line);
}
.ledger-row:first-child { border-top: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: none; }
.ledger-num {
  font-size: 3rem;
  font-weight: 240;
  letter-spacing: -0.04em;
  color: var(--accent2-text);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.ledger-body h3 { margin: 2px 0 8px; font-size: 1.28rem; font-weight: 700; color: var(--text); }
.ledger-body p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 64ch; }
@media (max-width: 860px) {
  .ledger-row { grid-template-columns: 56px 1fr; gap: 18px; padding: 24px 0; }
  .ledger-num { font-size: 2.2rem; }
}

/* ---------- Timeline ---------- */
.timeline { max-width: 860px; margin: 0 auto; }
.timeline-step {
  position: relative;
  padding: 0 0 42px 72px;
}
.timeline-step:before {
  content: "";
  position: absolute;
  left: 20px;
  top: 34px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}
.timeline-step:last-child:before { display: none; }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--accent);
  font-size: 15px;
  font-weight: 740;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 5px var(--bg);
  font-variant-numeric: tabular-nums;
}
.section-alt .timeline-marker { box-shadow: 0 0 0 5px var(--bg-alt); }
.timeline-step h3 { margin: 7px 0 8px; font-size: 1.18rem; }
.timeline-step p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 62ch; }

/* ---------- Split panel ---------- */
.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 992px) { .split-panel { grid-template-columns: 1fr; gap: 40px; } }
.split-main h2 { max-width: 20ch; }
.split-main > p { color: var(--muted); font-size: 16px; }
.split-side { display: grid; gap: 20px; }
.split-media {
  margin: 0;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-alt));
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: var(--r-panel);
  padding: 10px;
  box-shadow: var(--shadow-float);
}
.split-media img { display: block; width: 100%; height: auto; border-radius: calc(var(--r-panel) - 10px); }
.split-media figcaption { padding: 12px 8px 4px; font-size: 13px; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .split-media {
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-alt));
    border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  }
}

.fact-list { list-style: none; margin: 20px 0 26px; padding: 0; }
.fact-list li {
  position: relative;
  padding: 13px 0 13px 34px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--muted);
}
.fact-list li:first-child { border-top: 1px solid var(--line); }
.fact-list li:before {
  content: "";
  position: absolute;
  left: 6px;
  top: 20px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  transform: rotate(45deg);
  background: var(--accent2);
}
.fact-list strong { color: var(--text); font-weight: 680; }

.split-aside {
  background: color-mix(in srgb, var(--accent) 4%, var(--bg-alt));
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: var(--r-card);
  padding: 26px 28px;
}
.split-aside h2, .split-aside h3 { margin: 0 0 10px; font-size: 1.12rem; }
.split-aside p { color: var(--muted); font-size: 14.5px; margin: 0 0 10px; line-height: 1.58; }
.split-aside p:last-child { margin-bottom: 0; }

/* ---------- Decisions table ---------- */
.table-decisions td .badge { margin-right: 10px; }
.case-link { color: var(--link); font-weight: 650; text-decoration: none; }
.case-link:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .table-decisions thead { display: none; }
  .table-decisions tr { display: block; border-bottom: 1px solid var(--line); padding: 18px 20px; }
  .table-decisions tr:hover td { background: transparent; }
  .table-decisions td {
    display: block;
    border: none;
    padding: 4px 0;
    white-space: normal;
  }
  .table-decisions td[data-label]:not(.case-cell):before {
    content: attr(data-label);
    display: inline-block;
    font-size: 12px;
    font-weight: 720;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-right: 8px;
  }
  .table-decisions td.case-cell { font-size: 17px; font-weight: 700; padding-bottom: 6px; }
}

/* ---------- Tariff table ---------- */
.table-tariffs th:last-child, .table-tariffs td:last-child {
  background: color-mix(in srgb, var(--accent2) 6%, var(--surface));
  font-weight: 740;
}
@media (max-width: 720px) {
  .table-tariffs thead { display: none; }
  .table-tariffs tr { display: block; border-bottom: 1px solid var(--line); padding: 16px 20px; }
  .table-tariffs tr:last-child { border-bottom: none; }
  .table-tariffs tr:hover td { background: transparent; }
  .table-tariffs td { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; border: none; padding: 5px 0; }
  .table-tariffs td[data-label]:before {
    content: attr(data-label);
    font-size: 12.5px;
    font-weight: 720;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
  }
  .table-tariffs td:last-child { font-weight: 750; background: transparent; border-radius: 8px; }
  .table-tariffs td:last-child[data-label]:before { color: var(--accent2-text); }
}

/* ---------- Identity panel ---------- */
.identity-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 860px) { .identity-panel { grid-template-columns: 1fr; gap: 32px; } }
.identity-facts { list-style: none; margin: 18px 0 0; padding: 0; }
.identity-facts li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.identity-facts li:first-child { border-top: 1px solid var(--line); }
.identity-facts .fact-k { color: var(--muted); font-weight: 620; }
.identity-facts .fact-v { font-weight: 640; color: var(--text); }
@media (max-width: 480px) { .identity-facts li { grid-template-columns: 1fr; gap: 2px; } }
.identity-bounds {
  background: color-mix(in srgb, var(--accent2) 5%, var(--bg-alt));
  border: 1px solid color-mix(in srgb, var(--accent2) 16%, transparent);
  border-radius: var(--r-card);
  padding: 28px 30px;
}
.identity-bounds h3 { margin: 0 0 14px; font-size: 1.05rem; }
.identity-bounds ul { margin: 0; padding-left: 20px; font-size: 14.5px; color: var(--muted); }
.identity-bounds li { margin-bottom: 9px; }
.identity-bounds li:last-child { margin-bottom: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .identity-bounds { background: color-mix(in srgb, var(--accent2) 8%, var(--bg-alt)); border-color: color-mix(in srgb, var(--accent2) 24%, transparent); }
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  margin-bottom: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  padding: 19px 24px;
  font-weight: 680;
  font-size: 16px;
  list-style: none;
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-hover); }
.faq summary .faq-toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 520;
  transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.faq details[open] summary .faq-toggle {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.faq details > .faq-body { padding: 0 24px 22px; }
.faq details > .faq-body p { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; }
.faq details > .faq-body p:last-child { margin-bottom: 0; }