/* ── LumaGrid Design Tokens ── */
:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Switzer', 'Helvetica Neue', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;
}

/* ── Light Mode (LumaGrid palette: deep navy + warm gold accent) ── */
:root,
[data-theme='light'] {
  --color-bg: #f8f9fb;
  --color-surface: #ffffff;
  --color-surface-2: #f1f3f7;
  --color-surface-offset: #e8ecf2;
  --color-divider: #d0d5de;
  --color-border: #c2c8d4;
  --color-text: #0c1a2e;
  --color-text-muted: #536075;
  --color-text-faint: #94a0b4;
  --color-text-inverse: #f8f9fb;
  --color-primary: #0f2b4a;
  --color-primary-hover: #183d66;
  --color-accent: #c8962e;
  --color-accent-hover: #a97b1f;
  --color-accent-light: #f5ecd6;
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 240 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 240 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 240 / 0.12);
}

/* ── Dark Mode ── */
[data-theme='dark'] {
  --color-bg: #0a111d;
  --color-surface: #0f1926;
  --color-surface-2: #152232;
  --color-surface-offset: #1a2940;
  --color-divider: #1e3250;
  --color-border: #263d5c;
  --color-text: #d8dfe8;
  --color-text-muted: #8a9bb4;
  --color-text-faint: #4e6281;
  --color-text-inverse: #0c1a2e;
  --color-primary: #4a8fd4;
  --color-primary-hover: #6da8e6;
  --color-accent: #daa740;
  --color-accent-hover: #e8be64;
  --color-accent-light: #2a2214;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0a111d;
    --color-surface: #0f1926;
    --color-surface-2: #152232;
    --color-surface-offset: #1a2940;
    --color-divider: #1e3250;
    --color-border: #263d5c;
    --color-text: #d8dfe8;
    --color-text-muted: #8a9bb4;
    --color-text-faint: #4e6281;
    --color-text-inverse: #0c1a2e;
    --color-primary: #4a8fd4;
    --color-primary-hover: #6da8e6;
    --color-accent: #daa740;
    --color-accent-hover: #e8be64;
    --color-accent-light: #2a2214;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ── Global ── */
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: box-shadow 0.3s var(--ease-out);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .header-inner {
    padding-inline: var(--space-8);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.nav {
  display: none;
  gap: var(--space-8);
  list-style: none;
}
@media (min-width: 768px) {
  .nav {
    display: flex;
  }
}
.nav a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav a:hover {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-text-muted);
}
@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}
.mobile-menu-btn:hover {
  color: var(--color-text);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-bg);
  padding: var(--space-8) var(--space-4);
  flex-direction: column;
  gap: var(--space-6);
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none;
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    oklch(from var(--color-bg) l c h / 0.97) 0%,
    oklch(from var(--color-bg) l c h / 0.85) 35%,
    oklch(from var(--color-bg) l c h / 0.55) 70%,
    oklch(from var(--color-bg) l c h / 0.25) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-16) var(--space-4) var(--space-12);
  width: 100%;
}
@media (min-width: 768px) {
  .hero-content {
    padding: var(--space-16) var(--space-8) var(--space-16);
  }
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  background: oklch(from var(--color-bg) l c h / 0.7);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}
.hero-label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: 1.05;
  color: var(--color-text);
  max-width: 16ch;
  margin-bottom: var(--space-6);
}
.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text);
  max-width: 52ch;
  line-height: 1.65;
  margin-bottom: var(--space-8);
  opacity: 0.85;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
.btn-primary {
  background: var(--color-accent);
  color: #0c1a2e;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.2);
}
.btn-secondary:hover {
  background: var(--color-surface-2);
  border-color: oklch(from var(--color-text) l c h / 0.3);
}

/* ── Stats Bar ── */
.stats-bar {
  background: var(--color-primary);
  padding: var(--space-8) var(--space-4);
}
.stats-bar .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  text-align: center;
}
@media (min-width: 640px) {
  .stats-bar .container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .stats-bar .container {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat-item {
  padding: var(--space-2);
}
.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-accent);
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

[data-theme='dark'] .stat-value {
  color: var(--color-accent);
}

.stat-label {
  font-size: var(--text-xs);
  color: oklch(from #f8f9fb l c h / 0.7);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Section ── */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-4);
}
@media (min-width: 768px) {
  .section {
    padding-inline: var(--space-8);
  }
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  max-width: 20ch;
}
.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.65;
  margin-bottom: var(--space-10);
}

/* ── About Split ── */
.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  max-width: var(--content-wide);
  margin-inline: auto;
  align-items: center;
}
@media (min-width: 768px) {
  .about-split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* ── Investment Cards ── */
.invest-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: var(--content-wide);
  margin-inline: auto;
}
@media (min-width: 640px) {
  .invest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .invest-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.invest-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition:
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}
.invest-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.invest-card-icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.invest-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}
.invest-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Full Bleed Image Break ── */
.image-break {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.image-break img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
}
.image-break-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    oklch(from var(--color-bg) l c h / 0.85) 0%,
    oklch(from var(--color-bg) l c h / 0.3) 60%,
    transparent 100%
  );
  display: flex;
  align-items: center;
  padding-inline: var(--space-8);
}
.image-break-text {
  max-width: 420px;
}
.image-break-text blockquote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}
.image-break-text cite {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── How It Works ── */
.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: var(--content-wide);
  margin-inline: auto;
}
@media (min-width: 768px) {
  .how-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.how-step {
  position: relative;
  padding-left: var(--space-10);
}
.how-step-num {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-accent);
  line-height: 1;
  opacity: 0.5;
}
.how-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.how-step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── Tax Credit Section (accent bg) ── */
.section-accent {
  background: var(--color-primary);
  color: #f8f9fb;
}
.section-accent .section-label {
  color: var(--color-accent);
}
.section-accent .section-title {
  color: #f8f9fb;
}
.section-accent .section-desc {
  color: oklch(from #f8f9fb l c h / 0.7);
}
.tax-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  max-width: var(--content-wide);
  margin-inline: auto;
}
@media (min-width: 768px) {
  .tax-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.tax-card {
  background: oklch(from #f8f9fb l c h / 0.06);
  border: 1px solid oklch(from #f8f9fb l c h / 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-8);
}
.tax-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.tax-card p {
  font-size: var(--text-sm);
  color: oklch(from #f8f9fb l c h / 0.75);
  line-height: 1.6;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-12) var(--space-4);
}
@media (min-width: 768px) {
  .footer {
    padding-inline: var(--space-8);
  }
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer-brand {
  max-width: 360px;
}
.footer-brand .logo {
  margin-bottom: var(--space-4);
}
.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--color-text);
}
.footer-bottom {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-top: var(--space-8);
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ── Scroll Reveal ── */
.fade-in {
  opacity: 1;
}
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ── CTA Section ── */
.cta-section {
  text-align: center;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) var(--space-4);
  background: var(--color-surface-2);
}
.cta-section .section-label {
  justify-content: center;
}
.cta-section .section-title {
  margin-inline: auto;
  max-width: 18ch;
}
.cta-section .section-desc {
  margin-inline: auto;
}
.cta-section .hero-cta-row {
  justify-content: center;
}

/* ── Contact Form ── */
.contact-form {
  max-width: 560px;
  margin: var(--space-8) auto 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.form-field input,
.form-field textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text);
  font-family: inherit;
  width: 100%;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.form-field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--color-text-faint);
}
.form-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.form-submit .btn {
  min-width: 200px;
}
.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin: 0;
}
.form-success {
  max-width: 480px;
  margin: var(--space-8) auto 0;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--color-accent);
}
.form-success svg {
  margin: 0 auto var(--space-4);
  color: var(--color-accent);
}
.form-success h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.form-success p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 auto;
  max-width: none;
}

/* ── Disclaimer ── */
.disclaimer {
  padding: var(--space-6) var(--space-4);
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-divider);
}
.disclaimer p {
  max-width: var(--content-default);
  margin-inline: auto;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.5;
  text-align: center;
}
