/* ==========================================================================
   Sonnen-Check — Design System
   Swiss editorial: ink + brass, hairlines instead of heavy shadows,
   Cormorant Garamond display over DM Sans UI.
   Replaces styles.css + landing-lux.css.
   ========================================================================== */

:root {
  /* Ink */
  --ink: #0b0e13;
  --ink-2: #11151d;
  --ink-3: #1a1f29;
  --ink-line: rgba(11, 14, 19, 0.12);
  --ink-line-soft: rgba(11, 14, 19, 0.07);

  /* Paper */
  --paper: #ffffff;
  --cream: #f7f4ee;
  --cream-2: #efeae0;

  /* Brass accent */
  --brass: #b48f5b;
  --brass-2: #d8b87f;
  --brass-ink: #8a6a3e;

  /* Signal */
  --sun: #d9822b;
  --shade: #3e8e8e;

  /* Text */
  --text: #12161e;
  --text-2: #4d5665;
  --text-3: #7d8695;

  /* On dark */
  --on-dark: #f7f4ee;
  --on-dark-2: rgba(247, 244, 238, 0.72);
  --on-dark-3: rgba(247, 244, 238, 0.48);
  --on-dark-line: rgba(247, 244, 238, 0.18);

  /* Type */
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Space + shape */
  --gutter: 24px;
  --measure: 68ch;
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 14px;

  /* Elevation — used sparingly */
  --lift: 0 1px 2px rgba(11, 14, 19, 0.04), 0 12px 32px rgba(11, 14, 19, 0.06);
  --lift-lg: 0 2px 4px rgba(11, 14, 19, 0.05), 0 28px 64px rgba(11, 14, 19, 0.1);
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { list-style: none; padding: 0; }

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

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ── Utilities ─────────────────────────────────────────────────────────── */

.hidden { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter) 64px;
}

/* Eyebrow / kicker — the recurring editorial label */
.lux-eyebrow,
.viz-kicker,
.hero-lead-kicker,
.lux-confirm-eyebrow,
.perspective-picker-label,
.viz-result-kicker,
.card-title,
.hero-house-title,
.lux-origin {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn,
.lux-btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--cream);
  --btn-line: var(--ink);
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid var(--btn-line);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.25s ease,
              color 0.25s ease, border-color 0.25s ease;
}

.btn:hover,
.lux-btn:hover { transform: translateY(-1px); }
.btn:active,
.lux-btn:active { transform: translateY(0); }
.btn:disabled,
.lux-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary,
.lux-btn--primary {
  --btn-bg: var(--brass);
  --btn-fg: var(--ink);
  --btn-line: var(--brass);
}
.btn-primary:hover,
.lux-btn--primary:hover {
  --btn-bg: var(--brass-2);
  --btn-line: var(--brass-2);
}

.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-line: var(--ink-line);
}
.btn-secondary:hover { --btn-line: var(--ink); }

.btn-ghost,
.lux-btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-2);
  --btn-line: var(--ink-line);
  text-transform: none;
  letter-spacing: 0.02em;
}
.btn-ghost:hover,
.lux-btn--ghost:hover { --btn-fg: var(--ink); --btn-line: var(--ink); }

/* ==========================================================================
   LANDING
   ========================================================================== */

.landing {
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding-top: 28px;
}

.lux-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink-line);
}

.lux-brand { display: flex; align-items: center; gap: 14px; }

.lux-brand-name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.lux-brand-line {
  width: 56px;
  height: 1px;
  background: var(--brass);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.lux-hero--visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.lux-eyebrow { margin-bottom: 20px; }

.lux-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.2rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.lux-title em {
  font-style: italic;
  color: var(--brass-ink);
}

.lux-lead {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--text-2);
  max-width: 34ch;
  margin-bottom: 32px;
}

.lux-hero-stat {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 10px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
}

.lux-hero-stat-num {
  font-family: var(--serif);
  font-size: 3.4rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.lux-hero-stat-unit {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--brass-ink);
}
.lux-hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-2);
  max-width: 18ch;
  line-height: 1.4;
}

/* Simulation preview */

.lux-sim-preview {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--ink-3);
  box-shadow: var(--lift-lg);
}

.lux-sim-preview > .lux-sim-canvas,
.lux-sim-aerial,
.lux-sim-shadow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lux-sim-shadow { mix-blend-mode: multiply; opacity: 0.85; }

.lux-sim-parcel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.lux-sim-parcel polygon {
  fill: rgba(247, 244, 238, 0.06);
  stroke: rgba(247, 244, 238, 0.9);
  stroke-width: 0.6;
}

.lux-sim-terrace {
  position: absolute;
  left: 52%;
  top: 62%;
  width: 12%;
  height: 9%;
  border: 2px solid var(--brass-2);
  background: rgba(216, 184, 127, 0.2);
}

.lux-sim-ui {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lux-sim-time {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--on-dark);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.lux-sim-badge {
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(11, 14, 19, 0.55);
  color: var(--on-dark);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lux-sim-address {
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.lux-sim-caption {
  font-size: 0.76rem;
  color: var(--text-3);
}

/* ── Address form ──────────────────────────────────────────────────────── */

.lux-address {
  background: var(--paper);
  border: 1px solid var(--ink-line);
  border-radius: var(--r);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--lift);
}

.lux-address-head { margin-bottom: 28px; }

.lux-address-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.lux-address-sub {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-3);
}

.lux-form { display: grid; gap: 18px; }
.landing-step { display: grid; gap: 18px; }

.lux-field { display: block; }

.lux-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.lux-field-label--row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.lux-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-sm);
  background: var(--cream);
  font-size: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lux-input::placeholder { color: var(--text-3); }
.lux-input:focus {
  outline: none;
  border-color: var(--brass);
  background: var(--paper);
}

.lux-form-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
}

.landing-search-wrap { position: relative; }

.landing-search-status {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-ink);
}

.landing-suggestions {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--ink-line);
  border-radius: var(--r-sm);
  box-shadow: var(--lift-lg);
}

.landing-suggestion {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--ink-line-soft);
}
.landing-suggestion:last-child { border-bottom: 0; }
.landing-suggestion:hover,
.landing-suggestion.is-active { background: var(--cream); }

.landing-suggestion-line1 {
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.35;
}
.landing-suggestion-line2 {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.35;
}

.landing-suggestions-footer {
  padding: 9px 16px;
  border-top: 1px solid var(--ink-line-soft);
  background: var(--cream);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.landing-search-wrap.is-open .lux-input {
  border-color: var(--brass);
  background: var(--paper);
}

.landing-building-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  cursor: pointer;
}
.landing-building-option:has(input:checked) {
  border-color: var(--brass-2);
  background: rgba(180, 143, 91, 0.14);
}
.landing-building-option input { accent-color: var(--brass-2); }

.landing-status {
  font-size: 0.88rem;
  color: var(--text-2);
  text-align: center;
}
.landing-status.is-err { color: #a33d2b; }

/* Confirm step */

.lux-confirm {
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--r);
  padding: clamp(28px, 4vw, 44px);
}
.lux-confirm-eyebrow { color: var(--on-dark-3); }

.lux-confirm-address {
  margin: 10px 0 4px;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.lux-confirm-meta {
  font-size: 0.86rem;
  color: var(--on-dark-2);
}

.landing-building-picker {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}
.landing-building-picker label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  cursor: pointer;
}
.landing-building-picker label:has(input:checked) {
  border-color: var(--brass-2);
  background: rgba(180, 143, 91, 0.14);
}

.lux-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.lux-confirm .lux-btn--ghost {
  --btn-fg: var(--on-dark-2);
  --btn-line: var(--on-dark-line);
}
.lux-confirm .lux-btn--ghost:hover {
  --btn-fg: var(--on-dark);
  --btn-line: var(--on-dark);
}

/* ── Pillars ───────────────────────────────────────────────────────────── */

.lux-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-top: 48px;
  border-top: 1px solid var(--ink-line);
}

.lux-pillar-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--brass);
  margin-bottom: 12px;
}
.lux-pillar-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.lux-pillar-text {
  font-size: 0.92rem;
  color: var(--text-2);
}

.lux-demo {
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-3);
}
.lux-demo a {
  color: var(--brass-ink);
  text-underline-offset: 4px;
}

/* ── Footers ───────────────────────────────────────────────────────────── */

.site-footer,
.lux-footer {
  display: grid;
  gap: 8px;
  padding: 40px 0 0;
  border-top: 1px solid var(--ink-line);
  font-size: 0.76rem;
  line-height: 1.6;
  color: var(--text-3);
}
.site-footer a { color: var(--brass-ink); }
.lux-footer-note { color: var(--text-3); }

body.report-mode .site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
}

/* ==========================================================================
   LOADING + ERROR
   ========================================================================== */

.loading {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  min-height: 60vh;
  color: var(--text-3);
  font-size: 0.9rem;
  text-align: center;
  padding-inline: 24px;
}

.loading p { margin: 0; }

.loading-bar {
  width: min(260px, 70vw);
  height: 2px;
  background: var(--ink-line);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--brass-2), var(--brass));
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink-line);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  max-width: 44ch;
  margin: 14vh auto;
  text-align: center;
}
.error-state h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.error-state p { color: var(--text-2); }
.error-actions { margin-top: 28px; }

/* ==========================================================================
   REPORT — full-bleed house hero
   ========================================================================== */

body.report-mode { background: var(--ink); }
body.report-mode .page { max-width: none; padding: 0; }

body.report-mode #viz-section,
body.report-mode .report-details,
body.report-mode .cta-section {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hero-aerial {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  --hero-glow: 0.12;
}

.hero-aerial--house { min-height: 100dvh; }

.hero-aerial-sim,
.hero-aerial--house .hero-stage--bleed,
.hero-aerial--house #day-stage {
  min-height: 100dvh;
}

.day-stage {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

#day-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  pointer-events: none;
}

/* Warm tint follows the simulated time of day (--hero-glow set by app.js). */
.hero-stage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 50% at 76% 18%,
      rgba(217, 130, 43, var(--hero-glow, 0.12)) 0%, transparent 62%),
    radial-gradient(120% 80% at 70% 30%, transparent 40%, rgba(11, 14, 19, 0.5) 100%);
  transition: background 1.2s ease;
}

/* Overlay chrome */

.hero-house-chrome {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  pointer-events: none;
  padding:
    max(20px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  background:
    linear-gradient(180deg, rgba(11, 14, 19, 0.7) 0%, transparent 24%),
    linear-gradient(0deg, rgba(11, 14, 19, 0.92) 0%, rgba(11, 14, 19, 0.5) 32%, transparent 66%);
}

.hero-house-inner {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.hero-house-inner > * { pointer-events: auto; }

.hero-house-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-brand {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--on-dark);
  text-decoration: none;
}

.hero-house-back {
  appearance: none;
  border: 1px solid var(--on-dark-line);
  border-radius: 999px;
  background: rgba(11, 14, 19, 0.4);
  color: var(--on-dark-2);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hero-house-back:hover { color: var(--on-dark); border-color: var(--on-dark); }

/* Main overlay block: address + lead, bottom-anchored */

.hero-house-main {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  align-items: end;
  gap: clamp(24px, 5vw, 64px);
  padding-bottom: 22px;
}

/* ch would be measured against the body sans font, which is far too narrow
   for the serif address — size the column in rem instead. */
.hero-house-copy { max-width: 32rem; }

/* Bootstrapped address: photo only, no hourly simulation to drive. */
.hero-aerial.is-pending .hero-house-controls { display: none; }
.hero-aerial.is-pending .hero-house-stat {
  color: var(--brass-2);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-house-address {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--on-dark);
  text-shadow: 0 2px 30px rgba(11, 14, 19, 0.55);
}

.hero-house-title {
  margin-top: 10px;
  color: var(--on-dark-2);
}

.hero-house-stat {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--on-dark-line);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--brass-2);
  letter-spacing: -0.01em;
  text-shadow: 0 1px 16px rgba(11, 14, 19, 0.85);
}

/* Lead card */

.hero-lead {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r);
  background: rgba(11, 14, 19, 0.5);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.hero-lead-kicker { color: var(--on-dark-3); }

.hero-lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hero-lead-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-sm);
  background: rgba(11, 14, 19, 0.4);
  color: var(--on-dark);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.hero-lead-field input::placeholder { color: var(--on-dark-3); }
.hero-lead-field input:focus {
  outline: none;
  border-color: var(--brass-2);
  background: rgba(11, 14, 19, 0.65);
}

.hero-lead-btn {
  appearance: none;
  min-height: 52px;
  margin-top: 2px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--brass);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}
.hero-lead-btn:hover { background: var(--brass-2); }
.hero-lead-btn:disabled { opacity: 0.55; cursor: wait; }

.hero-lead-status {
  min-height: 1.3em;
  font-size: 0.8rem;
  color: var(--on-dark-2);
}
.hero-lead-status.is-ok { color: #9ec89a; }
.hero-lead-status.is-err { color: #e0a58f; }

/* Timeline controls */

.hero-house-controls {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--on-dark-line);
}

.day-overlay--minimal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.day-time {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--on-dark);
  min-width: 3.4ch;
}

.day-mode-pills {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--on-dark-line);
  border-radius: 999px;
  background: rgba(11, 14, 19, 0.4);
}

.day-pill {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--on-dark-2);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.day-pill:hover { color: var(--on-dark); }
.day-pill.is-active {
  background: var(--on-dark);
  color: var(--ink);
}

.day-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  pointer-events: none;
  transition: background 0.4s ease, color 0.4s ease;
}
.day-badge--sun { background: rgba(217, 130, 43, 0.9); color: #fff; }
.day-badge--shade { background: rgba(62, 142, 142, 0.85); color: #fff; }
.day-badge--night { background: rgba(247, 244, 238, 0.14); color: var(--on-dark-2); }

.hero-play-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-play {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--on-dark-line);
  background: rgba(247, 244, 238, 0.1);
  color: var(--on-dark);
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.hero-play:hover { background: rgba(247, 244, 238, 0.2); }
.hero-play:active { transform: scale(0.95); }
.hero-play[aria-pressed="true"] {
  background: var(--on-dark);
  color: var(--ink);
  border-color: var(--on-dark);
}
.hero-play-icon { font-size: 0.85rem; line-height: 1; margin-left: 2px; }
.hero-play[aria-pressed="true"] .hero-play-icon { margin-left: 0; }

.hero-scrubber-col { flex: 1; min-width: 0; }

.day-scrubber-wrap {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
}

.day-scrubber {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.day-scrubber-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--on-dark-line);
}

.day-scrubber-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--brass-2);
  transition: width 0.15s ease-out;
  pointer-events: none;
}

.day-scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  background: var(--on-dark);
  border-radius: 50%;
  transition: left 0.15s ease-out, transform 0.15s ease;
  pointer-events: none;
}
.day-scrubber-wrap:active .day-scrubber-thumb { transform: scale(1.25); }

.day-timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}

.hero-pergola-toggle--hidden { display: none; }

.shadow-pending-banner {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 18px;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  background: rgba(11, 14, 19, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   REPORT — sections below the hero
   ========================================================================== */

body.report-mode #content > *:not(.hero-aerial) {
  color: var(--text);
}

.viz-section,
.report-details,
.cta-section {
  background: var(--cream);
}

body.report-mode #content {
  background: var(--cream);
}

.viz-section {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 64px);
}

.viz-header { margin-bottom: 32px; }
.viz-kicker { display: block; margin-bottom: 12px; }

#viz-title,
.cta-section h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

/* Perspective picker */

.perspective-picker { margin-bottom: 28px; }
.perspective-picker-label { display: block; margin-bottom: 12px; }

.perspective-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.perspective-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-sm);
  background: var(--paper);
  cursor: pointer;
  text-align: left;
  font-size: 0.82rem;
  transition: border-color 0.2s ease;
}
.perspective-card:hover { border-color: var(--brass); }
.perspective-card.is-active {
  border-color: var(--brass);
  box-shadow: inset 0 0 0 1px var(--brass);
}
.perspective-thumb {
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  background: var(--cream-2);
}
.perspective-card-body {
  display: grid;
  gap: 2px;
  font-size: 0.82rem;
  line-height: 1.35;
}
.perspective-card-body strong { font-weight: 500; }
.perspective-card-body span { color: var(--text-3); font-size: 0.74rem; }

.perspective-tip {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-3);
}

/* Upload panel */

.viz-panel {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 32px);
  background: var(--paper);
  border: 1px solid var(--ink-line);
  border-radius: var(--r);
}

.viz-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.viz-upload-area { position: relative; }

.viz-dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 48px 20px;
  border: 1px dashed var(--ink-line);
  border-radius: var(--r-sm);
  background: var(--cream);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.viz-dropzone:hover,
.viz-dropzone.is-dragover {
  border-color: var(--brass);
  background: var(--cream-2);
}

.viz-drop-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass);
  border-radius: 50%;
  color: var(--brass-ink);
  font-size: 1.3rem;
  line-height: 1;
}
.viz-drop-title { font-weight: 500; }
.viz-drop-hint { font-size: 0.78rem; color: var(--text-3); }

.viz-preview-wrap { display: grid; gap: 10px; justify-items: start; }
.viz-preview-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.viz-preview-name { font-size: 0.8rem; color: var(--text-3); }

.viz-status {
  font-size: 0.85rem;
  color: var(--text-2);
}
.viz-status.is-err { color: #a33d2b; }

.viz-form { display: grid; gap: 16px; }
.viz-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.viz-input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--ink-line);
  border-radius: var(--r-sm);
  background: var(--cream);
  font-size: 1rem;
}
.viz-input:focus { outline: none; border-color: var(--brass); background: var(--paper); }

.viz-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.5;
}
.viz-consent input { margin-top: 3px; accent-color: var(--brass); }

.viz-submit { width: 100%; }
.viz-submit.is-busy,
.btn.is-busy { opacity: 0.6; cursor: wait; pointer-events: none; }

/* Loading */

.viz-loading { justify-items: center; text-align: center; }

.viz-loading-orbit {
  position: relative;
  width: 64px;
  height: 64px;
}
.viz-orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--ink-line);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}
.viz-orbit-core {
  position: absolute;
  inset: 26px;
  background: var(--brass);
  border-radius: 50%;
}

.viz-loading-title { font-weight: 500; }

.viz-loading-steps { display: grid; gap: 8px; font-size: 0.85rem; }
.viz-step { color: var(--text-3); transition: color 0.3s ease; }
.viz-step.is-active { color: var(--brass-ink); font-weight: 500; }
.viz-step.is-done { color: var(--text-2); }

.viz-loading-sub { font-size: 0.8rem; color: var(--text-3); max-width: 40ch; }

/* Result / compare */

.viz-result { justify-items: stretch; }
.viz-result-kicker { display: block; }

.viz-demo-banner {
  padding: 10px 14px;
  border-left: 2px solid var(--brass);
  background: var(--cream);
  font-size: 0.82rem;
  color: var(--text-2);
}

.viz-compare-frame {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink);
}

.viz-compare {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  background: var(--ink-3);
}

.viz-compare-before,
.viz-compare-after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viz-compare-after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

.viz-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--on-dark);
  pointer-events: none;
}
.viz-compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background: var(--on-dark);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.viz-compare-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}

.viz-compare-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(11, 14, 19, 0.7);
  color: var(--on-dark);
  font-size: 0.72rem;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.viz-compare-hint.is-hidden { opacity: 0; }

.viz-compare-labels {
  position: absolute;
  inset: auto 14px 14px;
  display: flex;
  justify-content: space-between;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  pointer-events: none;
}

.viz-result-lead { font-size: 0.95rem; color: var(--text-2); }

.viz-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.viz-error {
  padding: 18px;
  border-left: 2px solid #a33d2b;
  background: var(--paper);
  display: grid;
  gap: 12px;
  justify-items: start;
}

.viz-fallback {
  margin-top: 18px;
  font-size: 0.82rem;
  text-align: center;
  color: var(--text-3);
}
.viz-fallback a { color: var(--brass-ink); }

/* ── Details: heatmap + curve ──────────────────────────────────────────── */

.report-details {
  padding-bottom: clamp(40px, 6vw, 64px);
}

.report-details-summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.report-details-summary::-webkit-details-marker { display: none; }
.report-details-summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--brass);
}
.report-details[open] .report-details-summary::after { content: "−"; }

.report-details-grid { padding-top: 28px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--ink-line);
  border-radius: var(--r);
  padding: 22px;
}
.card--flat { box-shadow: none; }
.card-title { display: block; margin-bottom: 14px; }

.heatmap-wrap {
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--cream-2);
}
.heatmap-wrap img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.heatmap-caption {
  margin-top: 12px;
  font-size: 0.76rem;
  color: var(--text-3);
}

.sun-curve { width: 100%; }

.curve-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.curve-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.55;
}

/* ── CTA ───────────────────────────────────────────────────────────────── */

.cta-section {
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(48px, 7vw, 80px);
  border-top: 1px solid var(--ink-line);
  text-align: center;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 28px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Wide screens: side scrim so the copy column stays readable over the photo. */
@media (min-width: 900px) {
  .hero-house-chrome {
    background:
      linear-gradient(180deg, rgba(11, 14, 19, 0.6) 0%, transparent 20%),
      linear-gradient(90deg, rgba(11, 14, 19, 0.92) 0%, rgba(11, 14, 19, 0.6) 26%,
        rgba(11, 14, 19, 0.12) 50%, transparent 64%),
      linear-gradient(0deg, rgba(11, 14, 19, 0.85) 0%, rgba(11, 14, 19, 0.32) 24%, transparent 50%);
  }
}

@media (max-width: 900px) {
  .lux-hero--visual { grid-template-columns: 1fr; gap: 40px; }
  .lux-pillars { grid-template-columns: 1fr; gap: 28px; }
  .hero-house-main { grid-template-columns: 1fr; align-items: stretch; }
  .hero-house-copy { max-width: none; }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .landing { gap: 52px; }
  .grid-2 { grid-template-columns: 1fr; }
  .lux-form-row { grid-template-columns: 1fr; }
  .hero-lead-row { grid-template-columns: 1fr; }
  .day-mode-pills { display: none; }
  .day-badge { margin-left: 0; }
  /* Keep the overlay tight — every pixel saved here is house on screen. */
  .hero-house-main { padding-bottom: 12px; gap: 14px; }
  .hero-lead { padding: 14px; gap: 7px; }
  .hero-lead-kicker { font-size: 0.62rem; letter-spacing: 0.1em; }
  .hero-lead-field input { min-height: 42px; font-size: 0.9rem; }
  .hero-lead-btn { min-height: 46px; }
  .hero-lead-status:empty { display: none; }
  .hero-house-title { margin-top: 5px; font-size: 0.66rem; }
  .hero-house-stat { margin-top: 10px; padding-top: 10px; font-size: 1.05rem; }
  .hero-house-controls { padding-top: 12px; gap: 8px; }
  .day-timeline-labels { margin-top: 6px; }
  .cta-buttons .btn { width: 100%; }
}

@media (max-width: 420px) {
  .hero-house-address { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero-house-stat { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
