:root {
  color-scheme: dark;
  --bg: #09100e;
  --surface: #111a17;
  --surface-raised: #17221e;
  --text: #f5f1e8;
  --muted: #a9b4ae;
  --border: rgba(245, 241, 232, .13);
  --accent: #e9b967;
  --accent-ink: #171109;
  --green: #7aaa8c;
  --max: 1160px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f2e9;
  --surface: #fffdf8;
  --surface-raised: #ebe7dc;
  --text: #15201c;
  --muted: #5d6963;
  --border: rgba(21, 32, 28, .14);
  --accent: #b47818;
  --accent-ink: #fffdf8;
  --green: #3f7553;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Satoshi", system-ui, sans-serif;
  line-height: 1.5;
}
button, textarea { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  width: min(calc(100% - 32px), var(--max));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand img, footer img {
  display: block;
  width: 78px;
  height: 52px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}
.theme-toggle {
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

main { min-height: 70vh; }
.portal { padding-bottom: 80px; }
.hero-copy, .render-frame, .offer-card, .quote-panel, .features, .final-cta {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}
.hero-copy {
  padding: 64px 0 36px;
  max-width: 920px;
  margin-left: max(16px, calc((100% - var(--max)) / 2));
}
.eyebrow, .offer-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: "General Sans", system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-family: "General Sans", system-ui, sans-serif;
  letter-spacing: -.035em;
  line-height: 1.04;
}
h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  font-weight: 600;
}
.address {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.render-frame {
  position: relative;
  margin-top: 8px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.render-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.render-frame figcaption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: .78rem;
}

.offer-card {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 44px);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.offer-card h2, .quote-panel h2, .section-heading h2, .final-cta h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 600;
}
.offer-card p:not(.offer-kicker) {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
}
.offer-deadline {
  min-width: 150px;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--border);
}
.offer-deadline span { color: var(--muted); font-size: .8rem; }
.offer-deadline strong { font-size: 1.35rem; }

.quote-panel {
  margin-top: 24px;
  padding: clamp(24px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 7vw, 88px);
  background: var(--surface-raised);
  border-radius: 20px;
}
.quote-intro > p:last-child { max-width: 480px; color: var(--muted); }
form { display: grid; align-content: center; gap: 12px; }
label { font-size: .9rem; font-weight: 600; }
label span { color: var(--muted); font-weight: 400; }
textarea {
  width: 100%;
  min-height: 104px;
  padding: 14px;
  resize: vertical;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.primary-button, .secondary-button {
  min-height: 50px;
  padding: 13px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.primary-button {
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
}
.secondary-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.features { padding-top: 96px; }
.section-heading { max-width: 740px; }
.feature-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.feature-grid article {
  min-height: 250px;
  padding: 24px;
  border-right: 1px solid var(--border);
}
.feature-grid article:last-child { border-right: 0; }
.feature-number { color: var(--green); font-size: .8rem; }
.feature-grid h3 { margin: 54px 0 12px; font-size: 1.35rem; }
.feature-grid p { margin: 0; color: var(--muted); }

.final-cta {
  margin-top: 96px;
  padding: clamp(32px, 7vw, 80px);
  text-align: center;
  background: var(--surface);
  border-radius: 20px;
}
.final-cta h2 { max-width: 800px; margin-inline: auto; }
.final-cta .primary-button { margin-top: 28px; }

.loading-state, .invalid-state {
  width: min(calc(100% - 32px), 680px);
  margin: 12vh auto;
  text-align: center;
}
.loading-state { color: var(--muted); }
.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  display: block;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.invalid-state h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); }
.invalid-state > p:not(.eyebrow) { max-width: 520px; margin: 20px auto 28px; color: var(--muted); }
.invalid-state .primary-button, .invalid-state .secondary-button { margin: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
}

footer {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 40px 0 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
footer > div { display: flex; align-items: center; gap: 16px; }
footer nav { display: flex; align-items: center; gap: 24px; }
.attribution { grid-column: 1 / -1; margin: 0; font-size: .72rem; opacity: .65; }

@media (max-width: 820px) {
  .hero-copy { padding-top: 40px; }
  .offer-card { flex-direction: column; }
  .offer-deadline { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .quote-panel { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid article:nth-child(2) { border-right: 0; }
  .feature-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 520px) {
  .site-header { height: 72px; }
  .brand img { width: 64px; height: 44px; }
  .theme-label { display: none; }
  .hero-copy { padding-bottom: 28px; }
  .render-frame img { aspect-ratio: 1 / 1; }
  .offer-card, .quote-panel, .final-cta, .render-frame { border-radius: 14px; }
  .features { padding-top: 72px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article {
    min-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .feature-grid article:last-child { border-bottom: 0; }
  .feature-grid h3 { margin-top: 36px; }
  .final-cta { margin-top: 72px; }
  footer { grid-template-columns: 1fr; }
  footer nav { align-items: flex-start; flex-direction: column; gap: 8px; }
  .attribution { grid-column: 1; }
}
