/* ==========================================================================
   SOLARIS / DESIGN SYSTEM
   Built for Laravel + Blade. All tokens live here as CSS custom properties
   so {{ }} values from a Settings/Theme model can override them later
   without touching component files.
   ========================================================================== */

:root {
  /* ---- Color: Graphite + Gold (grounded in panel/inverter hardware, not eco-cliché) ---- */
  --color-ink:            #14171A;   /* graphite — primary dark surface */
  --color-ink-soft:       #1E2227;   /* secondary dark surface (cards on dark) */
  --color-paper:          #FAF8F4;   /* warm off-white — primary light surface */
  --color-paper-dim:      #F0EDE6;   /* light surface, recessed */
  --color-gold:           #F5A623;   /* solar-cell gold — primary accent, used sparingly */
  --color-gold-deep:      #C97F12;   /* pressed/hover state of gold */
  --color-circuit:        #3DD68C;   /* savings/data green — numbers only, never decoration */
  --color-line:           #2A2E33;   /* hairline on dark */
  --color-line-soft:      #E2DDD2;   /* hairline on light */
  --color-text-dim:       #9CA1A8;   /* muted text on dark */
  --color-text-dim-light: #6B6358;   /* muted text on light */
  --color-danger:         #E5484D;

  /* ---- Type ---- */
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif; /* geometric, technical */
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;    /* humanist, readable */
  --font-mono:    'IBM Plex Mono', 'SF Mono', monospace;            /* kWh, ₹, % — real numbers */

  --fs-display-xl: clamp(2.75rem, 5vw + 1rem, 5.5rem);
  --fs-display-lg: clamp(2.25rem, 3.5vw + 1rem, 3.75rem);
  --fs-display-md: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  --fs-display-sm: clamp(1.375rem, 1.2vw + 1rem, 1.75rem);
  --fs-body-lg:    1.1875rem;
  --fs-body:       1rem;
  --fs-body-sm:    0.875rem;
  --fs-mono-lg:    clamp(1.5rem, 2vw + 1rem, 2.25rem);
  --fs-mono:       0.9375rem;

  --lh-tight: 1.08;
  --lh-snug:  1.3;
  --lh-body:  1.65;

  /* ---- Spacing scale (8px base) ---- */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 6rem;
  --space-9: 9rem;

  /* ---- Layout ---- */
  --container-max: 1280px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-med: 360ms;

  /* ---- Elevation ---- */
  --shadow-card: 0 1px 2px rgba(20,23,26,0.04), 0 8px 24px -8px rgba(20,23,26,0.10);
  --shadow-card-dark: 0 1px 2px rgba(0,0,0,0.3), 0 12px 32px -8px rgba(0,0,0,0.45);
  --shadow-elevated: 0 24px 64px -16px rgba(20,23,26,0.28);
}

@media (prefers-color-scheme: dark) {
  /* Reserved hook — site is light-on-paper / dark-on-ink by section, not by OS theme.
     Left intentionally inert so Laravel theme toggle (if added later) can populate this. */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Utility: numerals everywhere should feel instrumented ---- */
.numeral {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1;
}

/* ---- Eyebrow label (used to tag sections, not decorate them) ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  flex-shrink: 0;
}
section.on-dark .eyebrow,
.on-dark .eyebrow { color: var(--color-gold); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-gold);
  color: var(--color-ink);
}
.btn-primary:hover { background: #FFB445; }

.btn-secondary {
  background: transparent;
  color: var(--color-paper);
  border-color: rgba(250,248,244,0.28);
}
.btn-secondary:hover { border-color: var(--color-paper); }

.btn-ghost-dark {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line-soft);
}
.btn-ghost-dark:hover { border-color: var(--color-ink); }

.btn-block { width: 100%; }

.btn-lg {
  padding: 1.05rem 2rem;
  font-size: 1rem;
}

/* ---- Section rhythm ---- */
.section {
  padding-block: var(--space-8);
}
.section.on-dark {
  background: var(--color-ink);
  color: var(--color-paper);
}
.section-head {
  max-width: 640px;
  margin-bottom: var(--space-6);
}
.section-head h2 {
  font-size: var(--fs-display-md);
  margin-top: var(--space-2);
}
.section-head p {
  margin-top: var(--space-3);
  font-size: var(--fs-body-lg);
  color: var(--color-text-dim-light);
}
.on-dark .section-head p { color: var(--color-text-dim); }

@media (max-width: 720px) {
  .section { padding-block: var(--space-7); }
}
