/* ============================================================
   Kavisandh Solar — base styles & design tokens
   ============================================================ */

:root {
  /* Color */
  --white: #ffffff;
  --navy: #0a2e5c;
  --navy-deep: #071f40;
  --blue: #1d63b8;
  --blue-light: #eaf2fb;
  --gold: #f2a93b;
  --ink: #16324f;
  --ink-soft: #4c6178;
  --line: #d9e6f4;

  /* Type */
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --max-w: 1180px;
  --radius: 10px;
  --gap: clamp(1.5rem, 3vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p {
  margin: 0 0 1em;
  max-width: 62ch;
  color: var(--ink-soft);
}

a {
  color: var(--blue);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.section-tint {
  background: var(--blue-light);
}

.eyebrow {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4em;
}

.lede {
  font-size: 1.1rem;
  max-width: 56ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

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

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--blue);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-ghost:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-on-navy {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-on-navy:hover {
  background: var(--white);
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

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

.brand img {
  height: 44px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-head);
  color: var(--navy);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand-text span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--blue);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-phone {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 880px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    gap: 16px;
    display: none;
  }
  .main-nav.open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .header-phone {
    display: none;
  }
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--white) 78%);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--gap);
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-copy p {
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 1.6em;
}

.hero-stats {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  margin-top: 2.4em;
  flex-wrap: wrap;
}

.hero-stats div strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--navy);
}

.hero-stats div span {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.hero-art {
  position: relative;
}

.hero-art svg {
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
    max-width: 420px;
    margin: 0 auto;
  }
}

/* ---------------- Logo strip ---------------- */
.trust-strip {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.4rem;
  align-items: center;
  justify-content: space-between;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
}

.trust-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--blue);
}

/* ---------------- Section heading block ---------------- */
.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------------- Services grid ---------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
}

.service-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--blue);
}

.service-card .icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin-bottom: 0.4em;
}

.service-card p {
  margin-bottom: 0.8em;
  font-size: 0.96rem;
}

.service-card a {
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------------- Why choose us ---------------- */
.why {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--gap);
  align-items: center;
}

@media (max-width: 900px) {
  .why { grid-template-columns: 1fr; }
}

.why-list {
  list-style: none;
  margin: 1.6em 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.why-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--ink);
}

.why-list svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.why-list strong {
  color: var(--navy);
  display: block;
}

.why-list span {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* ---------------- Subsidy callout ---------------- */
.subsidy {
  background: var(--navy);
  color: var(--white);
  border-radius: 18px;
  padding: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--gap);
  align-items: center;
}

@media (max-width: 880px) {
  .subsidy { grid-template-columns: 1fr; }
}

.subsidy h2, .subsidy p {
  color: var(--white);
}

.subsidy-tiers {
  display: grid;
  gap: 14px;
}

.subsidy-tier {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.subsidy-tier span:first-child {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
}

.subsidy-tier span:last-child {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.15rem;
}

.subsidy-note {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 10px;
  max-width: none;
}

/* ---------------- Process ---------------- */
.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}

@media (max-width: 980px) {
  .process-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-list { grid-template-columns: 1fr; }
}

.process-list li {
  counter-increment: step;
  position: relative;
  padding-top: 46px;
}

.process-list li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.process-list h3 {
  font-size: 1.02rem;
  margin-bottom: 0.3em;
}

.process-list p {
  font-size: 0.92rem;
}

/* ---------------- Testimonials ---------------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 880px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

.testimonial {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.testimonial p {
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 1em;
}

.testimonial strong {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.94rem;
}

.testimonial span {
  display: block;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

/* ---------------- Final CTA ---------------- */
.final-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  border-radius: 18px;
  padding: clamp(2.4rem, 5vw, 3.6rem);
  text-align: center;
}

.final-cta h2, .final-cta p {
  color: var(--white);
}

.final-cta p {
  margin-left: auto;
  margin-right: auto;
}

.final-cta .hero-actions {
  justify-content: center;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.82);
  padding-top: 3.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr 1fr;
  gap: 2.4rem;
}

@media (max-width: 880px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.98rem;
  margin-bottom: 1em;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand img {
  height: 38px;
}

.footer-brand strong {
  font-family: var(--font-head);
  color: var(--white);
  font-size: 1.05rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}
.footer-links a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 2.6rem;
  padding: 1.4rem 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------------- Reveal-on-load ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.in {
  animation: reveal-in 0.6s ease forwards;
}
@keyframes reveal-in {
  to { opacity: 1; transform: translateY(0); }
}
