/* =========================================================================
   SOLAR ENERGY — base: tokens, reset, typography, buttons, motion
   ========================================================================= */

/* =========================================================================
   SOLAR ENERGY — Kannur, Kerala
   Electricity from the Sun
   -------------------------------------------------------------------------
   1.  Design tokens
   2.  Reset & base
   3.  Layout primitives
   4.  Typography
   5.  Buttons & icons
   6.  Reveal / motion system
   7.  Preloader
   8.  Header & navigation
   9.  Hero (video, sun, glass cards)
   10. Marquee
   11. Stats
   12. About
   13. Services
   14. Calculator
   15. Showcase band
   16. Process
   17. Subsidy
   18. Projects & lightbox
   19. Testimonials
   20. FAQ
   21. CTA band
   22. Contact & form
   23. Footer
   24. Responsive
   25. Reduced motion & print
   ========================================================================= */

/* ============================ 1. DESIGN TOKENS ============================ */
:root {
  /* Brand — sampled from the company logo */
  --brand:        #0E803B;
  --brand-600:    #0B6B31;
  --brand-700:    #085726;
  --brand-400:    #17A34D;
  --brand-300:    #46C578;
  --brand-100:    #DCF3E5;
  --brand-50:     #F1FAF4;

  /* Sun — the energy accent */
  --sun:          #FFB020;
  --sun-400:      #FFC53D;
  --sun-300:      #FFD669;
  --sun-200:      #FFE7A6;
  --sun-deep:     #F08A15;
  --sun-ink:      #A35400;   /* amber that passes on white and on --paper-2 */

  /* Ink & paper */
  --ink:          #0A140E;
  --ink-2:        #0F1F16;
  --ink-3:        #16301F;
  --paper:        #FFFFFF;
  --paper-2:      #F5F9F6;
  --paper-3:      #EDF4EF;

  --text:         #14261B;
  --text-muted:   #5A6D61;
  --text-light:   rgba(255,255,255,.78);
  --text-light-2: rgba(255,255,255,.58);

  --line:         rgba(10,20,14,.10);
  --line-2:       rgba(10,20,14,.06);
  --line-light:   rgba(255,255,255,.14);

  /* Gradients */
  --grad-sun:     linear-gradient(100deg, var(--sun-deep) 0%, var(--sun) 38%, var(--sun-300) 100%);
  --grad-brand:   linear-gradient(135deg, var(--brand-400) 0%, var(--brand) 50%, var(--brand-700) 100%);
  --grad-dark:    linear-gradient(170deg, var(--ink) 0%, #0C1C13 55%, #071009 100%);

  /* Shadows */
  --sh-sm:   0 1px 2px rgba(10,20,14,.06), 0 2px 8px rgba(10,20,14,.05);
  --sh-md:   0 4px 12px rgba(10,20,14,.07), 0 12px 32px rgba(10,20,14,.07);
  --sh-lg:   0 12px 28px rgba(10,20,14,.09), 0 32px 72px rgba(10,20,14,.11);
  --sh-sun:  0 8px 24px rgba(255,176,32,.32), 0 18px 48px rgba(240,138,21,.24);
  --sh-brand:0 8px 24px rgba(14,128,59,.24), 0 18px 48px rgba(14,128,59,.18);

  /* Geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  /* Type */
  --font-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-io:  cubic-bezier(.65,.05,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);

  --header-h: 84px;
}

/* ============================ 2. RESET & BASE ============================ */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img, video, canvas, svg { display: block; max-width: 100%; }
/* <picture> is a wrapper only — let the <img> be the layout box */
picture { display: contents; }
img, video { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--sun-300); color: var(--ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 999;
  padding: .75rem 1.25rem;
  background: var(--ink); color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform .25s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ============================ 3. LAYOUT ============================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

/* two classes so a page-level section background cannot outrank it */
.section.section--dark {
  background: var(--grad-dark);
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.section--dark .h2 { color: #fff; }
.section--dark .lead { color: var(--text-light); }

/* soft coloured light-blooms used in dark sections */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  pointer-events: none;
  z-index: -1;
}
.glow-orb--a { width: 640px; height: 640px; top: -220px; right: -180px;
  background: radial-gradient(circle, rgba(255,176,32,.42), transparent 68%); }
.glow-orb--b { width: 560px; height: 560px; bottom: -240px; left: -200px;
  background: radial-gradient(circle, rgba(23,163,77,.40), transparent 68%); }
.glow-orb--c { width: 720px; height: 720px; top: 40%; left: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(255,176,32,.24), transparent 66%); }

/* ============================ 4. TYPOGRAPHY ============================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.022em;
  color: var(--text);
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.028em;
}

.lead {
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 60ch;
  text-wrap: pretty;
}
.lead--light { color: var(--text-light); }
.h2 + .lead { margin-top: 1.15rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.1rem;
}
.eyebrow span {
  width: 34px; height: 2px;
  background: var(--grad-sun);
  border-radius: 2px;
}
.eyebrow--light { color: var(--sun-400); }

.grad-sun {
  background: var(--grad-sun);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* keeps the descender of "g" from being clipped */
  padding-bottom: .06em;
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
/* headline on one side, controls on the other */
.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: none;
}
.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.section-head--center .h2 { max-width: 20ch; }
.section-head__lead {
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 58ch;
  margin-top: 1.1rem;
}
.section--dark .section-head__lead { color: var(--text-light); }
.section-head--center .section-head__lead { text-align: center; }

/* ============================ 5. BUTTONS & ICONS ============================ */
.icon {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none;
  stroke-width: inherit;
}
.icon--sun { color: var(--sun); width: 1.4em; height: 1.4em; }

.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .95rem 1.6rem;
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border-radius: var(--r-pill);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease-spring), box-shadow .35s var(--ease-out), color .25s;
  will-change: transform;
}
.btn .icon { transition: transform .35s var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.985); }

/* sheen sweep */
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.42) 50%, transparent 68%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
  z-index: -1;
}
.btn:hover::after { transform: translateX(120%); }

.btn--sun   { --btn-bg: var(--grad-sun); --btn-fg: #2A1803; box-shadow: var(--sh-sun); }
.btn--sun:hover { box-shadow: 0 12px 30px rgba(255,176,32,.42), 0 24px 60px rgba(240,138,21,.3); }

.btn--brand { --btn-bg: var(--grad-brand); box-shadow: var(--sh-brand); }
.btn--brand:hover { box-shadow: 0 12px 30px rgba(14,128,59,.32), 0 24px 60px rgba(14,128,59,.22); }

.btn--ink   { --btn-bg: var(--ink); --btn-fg: #fff; box-shadow: var(--sh-md); }

.btn--glass {
  --btn-bg: rgba(255,255,255,.10);
  --btn-fg: #fff;
  border: 1px solid rgba(255,255,255,.26);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.btn--glass:hover { --btn-bg: rgba(255,255,255,.18); }

.btn--outline-ink {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid rgba(10,20,14,.28);
}
.btn--outline-ink:hover { --btn-bg: rgba(10,20,14,.06); }

.btn--sm { padding: .65rem 1.15rem; font-size: .9rem; }
.btn--lg { padding: 1.12rem 2.05rem; font-size: 1.03rem; }
.btn--block { width: 100%; }

/* ============================ 6. REVEAL SYSTEM ============================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .85s var(--ease-out) var(--reveal-delay, 0ms),
    transform .85s var(--ease-out) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Without JS the .js class is never set, so content simply stays visible. */



/* ---------------- responsive token overrides ---------------- */
@media (max-width: 980px) {
  :root { --header-h: 74px; }
}

@media (max-width: 700px) {
  :root { --section-y: clamp(3.5rem, 11vw, 5rem); }
}

/* ============================ 25. MOTION & PRINT ============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__video, .showcase__video { animation: none; }
  .split-word { transform: none !important; opacity: 1 !important; }
  .js [data-reveal="mask"] img { clip-path: none !important; }
  .cursor-glow, .veil { display: none !important; }
  .hero__motes { display: none; }
}

@media print {
  .header, .preloader, .hero__media, .scroll-cue, .trust,
  .showcase__video, .lightbox, .footer__social { display: none !important; }
  body { color: #000; background: #fff; }
  .section--dark, .calc__results, .footer { background: #fff !important; color: #000 !important; }
  a { text-decoration: underline; }
}

/* =========================================================================
   MOTION SYSTEM — added for the multi-page build
   ========================================================================= */

/* ---------------- reveal variants ---------------- */
.js [data-reveal="left"]  { transform: translateX(-34px); }
.js [data-reveal="right"] { transform: translateX(34px); }
.js [data-reveal="scale"] { transform: scale(.92); }
.js [data-reveal="blur"]  { filter: blur(10px); transform: translateY(18px); }
.js [data-reveal="left"].is-in,
.js [data-reveal="right"].is-in,
.js [data-reveal="scale"].is-in { transform: none; }
.js [data-reveal="blur"].is-in  { filter: none; transform: none; }

/* Image mask wipe. The clip sits on the <img>, never on the observed
   element — an element that clips itself away is never reported as
   intersecting, so the reveal class would never arrive. */
.js [data-reveal="mask"] { opacity: 1; transform: none; }
.js [data-reveal="mask"] img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-io) var(--reveal-delay, 0ms);
}
.js [data-reveal="mask"].is-in img { clip-path: inset(0 0 0 0); }

/* ---------------- split text ---------------- */
/* core.js wraps each word; the mask makes them rise out of a hidden line */
.split-line { display: block; overflow: hidden; padding-bottom: .08em; }
.split-word {
  display: inline-block;
  transform: translateY(105%) rotate(3deg);
  opacity: 0;
}
.is-in .split-word,
.split-ready.is-in .split-word {
  transform: none;
  opacity: 1;
  transition: transform .9s var(--ease-out), opacity .7s var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 45ms + var(--reveal-delay, 0ms));
}

/* ---------------- magnetic buttons ---------------- */
.magnetic { will-change: transform; }
.magnetic > * { display: inline-flex; align-items: center; gap: inherit; }

/* ---------------- 3D helpers ---------------- */
.scene   { perspective: 1200px; perspective-origin: 50% 40%; }
.layer-3d { transform-style: preserve-3d; }
[data-tilt] { transform-style: preserve-3d; }
[data-tilt-depth] { transform: translateZ(var(--depth, 40px)); }

/* ---------------- pointer glow ---------------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  z-index: 9998;
  width: 420px; height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,176,32,.16), transparent 62%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s var(--ease-out);
  will-change: transform;
}
.cursor-glow.is-on { opacity: 1; }

/* ---------------- page transition veil ---------------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: var(--grad-dark);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .42s var(--ease-out), visibility .42s;
}
.veil.is-out { opacity: 1; visibility: visible; }

/* ---------------- scroll-linked helpers ---------------- */
[data-parallax] { will-change: transform; }

.u-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
