/* Homepage Casa Full-Electric */
body.atlas-home {
  --paper: #101827;
  --ink: #f5f4fa;
  --home-surface: #19243a;
  --home-panel: #141e30;
  --home-on-accent: #151b2d;
  --accent: #b6a7ff;
  --accent-light: #202944;
  --pop: #f4dc85;
  --line: #52617c;
  --muted: #bdc8db;
  --rail: 0px;
  --top: 72px;
  --pad: clamp(20px, 5vw, 72px);
  --home-pad: max(var(--pad), calc((100% - 1240px) / 2));
}

body.atlas-home .atlas-rail { display: none; }
.atlas-home ::selection, .atlas-home .skip-link { color: var(--home-on-accent); }
.atlas-home .atlas-top { padding-inline: var(--home-pad); }
.atlas-home .atlas-top:has(.atlas-menu[open]) { z-index: 75; }
.atlas-home .atlas-name { gap: 10px; }
.atlas-home .atlas-name img {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 3px;
  border-radius: 7px;
  background: #f3ebe7;
}
.atlas-home .atlas-top > nav a { display: flex; align-items: center; min-height: 44px; }
.atlas-home .atlas-menu summary {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.start-hero {
  display: grid;
  gap: 20px;
  align-items: center;
  padding: 28px var(--home-pad) 26px;
  background: linear-gradient(156deg, var(--home-surface), var(--paper) 55%);
}

.start-hero h1 {
  max-width: 22ch;
  font-size: clamp(30px, 9vw, 54px);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -.055em;
  hyphens: none;
}

.start-lead {
  max-width: 39ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 3.8vw, 18px);
  line-height: 1.6;
}

.start-guide, .follow-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--home-on-accent);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.start-guide {
  margin-top: 16px;
}
.start-guide .arrow, .follow-bar .arrow { flex: none; width: 16px; }
.start-guide:hover, .follow-bar a:hover { text-decoration: underline; }

.start-evidence { min-width: 0; }
.start-photo { position: relative; }
.start-photo img {
  width: 100%;
  height: clamp(210px, 59vw, 375px);
  object-fit: cover;
  object-position: center 55%;
  border-radius: 10px 10px 0 0;
}
.start-photo figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
}
.start-measure {
  display: grid;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--home-surface);
}
.start-measure strong { display: block; font-size: clamp(20px, 5vw, 26px); line-height: 1.15; }
.start-measure small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.start-measure a { width: fit-content; color: var(--accent); font-size: 13px; font-weight: 700; }
.start-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.start-paths a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.start-paths .arrow { width: 12px; color: var(--accent); }

.atlas-home .situation {
  padding: 36px var(--home-pad);
  border-block: 1px solid var(--line);
  background: var(--home-panel);
  color: var(--ink);
}
.atlas-home .situation-tabs {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.atlas-home .situation-tabs button {
  min-height: 48px;
  padding: 10px 8px;
  border-color: var(--line);
  color: var(--ink);
  font-size: clamp(12px, 2.8vw, 16px);
  text-align: center;
}
.atlas-home .situation-tabs button:hover { background: var(--accent-light); }
.atlas-home .situation-tabs button[aria-selected=true] { background: var(--accent); color: var(--home-on-accent); }
.atlas-home .situation button:focus-visible { outline-color: var(--accent); }
.atlas-home .situation-panel { min-height: 0; padding-top: 24px; }
.atlas-home .situation-links a { min-height: 44px; border-color: var(--line); }
.atlas-home .situation-label { color: var(--muted); opacity: 1; }
.atlas-home :is(.cfe-questions, .data-explorer, .tool-invitation, .atlas-footer) {
  padding-inline: var(--home-pad);
}
.atlas-home :is(.data-explorer, .atlas-footer) {
  background: var(--home-panel);
  color: var(--ink);
}
.atlas-home .cfe-questions { border-color: var(--line); }
.atlas-home .comparison-preview {
  border-color: var(--line);
  background: var(--home-surface);
}
.atlas-home .tool-invitation .button {
  background: var(--accent);
  color: var(--home-on-accent);
}
.atlas-home .tool-invitation .button:hover { background: var(--ink); }
.start-topics { padding: 36px var(--home-pad); background: var(--accent-light); }
.start-topics h2 { margin-bottom: 20px; font-size: clamp(28px, 4vw, 44px); }
.start-topic-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
}
.start-topic-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--home-surface);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.start-topic-links .arrow { flex: none; width: 16px; color: var(--accent); }
.start-topic-links a:hover { text-decoration: underline; }
.atlas-home .hero-revision { padding: 16px var(--home-pad); color: var(--muted); font-size: 12px; }
.atlas-home .motion-toggle {
  position: static;
  min-height: 44px;
  margin: 12px var(--home-pad);
  border-color: var(--line);
  background: var(--home-surface);
  color: var(--ink);
  box-shadow: none;
}
.atlas-home .motion-toggle:focus-visible { outline-color: var(--accent); }
.atlas-home .motion-toggle[aria-pressed=true] {
  background: var(--accent);
  color: var(--home-on-accent);
}

.atlas-home .follow-social {
  padding: 32px var(--home-pad);
  background: var(--accent-light);
}
.follow-social h2 { margin-bottom: 18px; font-size: clamp(29px, 4vw, 44px); }
.follow-social .follow-intro { margin: 0 0 18px; }
.follow-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.follow-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--home-surface);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}
.follow-links .arrow { flex: none; width: 14px; color: var(--accent); }
.follow-links a:hover { text-decoration: underline; }
.follow-social > p { margin-top: 16px; color: var(--muted); font-size: 13px; }
.follow-social .follow-message { display: inline-flex; align-items: center; min-height: 44px; }
.follow-social blockquote {
  max-width: 66ch;
  margin-top: 18px;
  padding: 10px 0 10px 14px;
  border-left: 2px solid var(--accent);
}
.follow-social blockquote footer { margin-top: 6px; color: var(--muted); font-size: 13px; }

html:has(.follow-bar) { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
html[data-motion=off]:has(.follow-bar) { scroll-behavior: auto; }
body.atlas-home:has(.follow-bar) { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.follow-bar {
  position: fixed;
  z-index: 70;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}
.follow-bar a {
  border-color: var(--pop);
  background: var(--pop);
  box-shadow: 0 4px 18px #0005;
}

@media screen and (max-width: 780px) {
  .atlas-home .menu-panel {
    max-height: calc(100dvh - var(--top) - 65px - env(safe-area-inset-bottom, 0px));
  }
  .follow-bar {
    inset: auto 0 0;
    display: flex;
    justify-content: center;
    padding: 8px var(--pad) calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--paper);
  }
  .follow-bar a { width: min(100%, 420px); box-shadow: none; }
}

@media print {
  .follow-bar { display: none; }
}

@media (max-width: 650px) {
  .atlas-home .atlas-top { --top: 60px; gap: 10px; }
  .atlas-home .atlas-top > nav { gap: 12px; }
  .atlas-home .atlas-top > nav a:nth-child(n+3) { display: none; }
  .atlas-home .atlas-name { font-size: 14px; }
  .atlas-home .section-heading h2 { font-size: 32px; }
  .start-hero { padding-top: 24px; }
  .start-lead { margin-top: 10px; }
}

@media (max-width: 360px) {
  .atlas-home .atlas-top > nav a:nth-child(2) { display: none; }
}

@media (min-width: 920px) {
  .start-hero {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: clamp(36px, 5vw, 76px);
    padding-block: 48px 24px;
  }
  .start-hero h1 { max-width: 19ch; font-size: clamp(46px, 4.4vw, 70px); }
  .start-photo img { height: clamp(330px, 35vw, 510px); }
  .start-measure { padding-inline: 20px; }
  .start-paths { grid-column: 1 / -1; }
  .atlas-home .situation { padding-block: 52px; }
}
