/* ============================================================
   SGEDCS — Sivagangai Electricity Distribution Circle Employees
   Co-op. Thrift and Credit Society Ltd., Sivagangai
   ============================================================ */

:root {
  --primary: #005657;
  --primary-dark: #004546;
  --primary-deep: #00393a;
  --primary-light: #e0f2f2;
  --accent: #00838f;
  --gold: #d4a54a;
  --gold-dark: #b8893a;
  --ink: #16302f;
  --muted: #5b7170;
  --bg: #ffffff;
  --bg-soft: #f3f9f8;
  --border: #d9e8e7;
  --shadow-sm: 0 1px 3px rgba(0, 57, 58, 0.08);
  --shadow-md: 0 6px 24px rgba(0, 57, 58, 0.10);
  --shadow-lg: 0 16px 48px rgba(0, 57, 58, 0.16);
  --radius: 14px;
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--primary); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 86, 87, 0.35);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-gold {
  background: var(--gold);
  color: var(--primary-deep);
  box-shadow: 0 4px 14px rgba(212, 165, 74, 0.35);
}
.btn-gold:hover { background: var(--gold-dark); color: #fff; }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  padding: 7px 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.topbar-inner p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-contact { display: flex; gap: 20px; flex-shrink: 0; }
.topbar-contact a { color: var(--gold); font-weight: 500; white-space: nowrap; }
.topbar-contact a:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  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 { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  font-size: 21px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.brand-text small { font-size: 11.5px; color: var(--muted); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav > a {
  padding: 9px 15px;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  border-radius: 8px;
}
.site-nav > a:hover { background: var(--primary-light); color: var(--primary); }
.site-nav > a.active { color: var(--primary); font-weight: 700; }
.site-nav .nav-cta { margin-left: 12px; padding: 11px 22px; }
.site-nav .nav-cta:hover { background: var(--gold-dark); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(0, 131, 143, 0.35), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(212, 165, 74, 0.18), transparent 55%),
    linear-gradient(150deg, var(--primary-deep) 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: #fff;
  padding: 92px 0 72px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(212, 165, 74, 0.16);
  border: 1px solid rgba(212, 165, 74, 0.5);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.22;
  max-width: 900px;
  margin: 0 auto 18px;
}
.hero-subtitle {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 14px;
}
.hero-desc {
  max-width: 640px;
  margin: 0 auto 34px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Stats band ---------- */
.stats {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 34px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat h3 {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}
.stat p { color: var(--muted); font-size: 14px; font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-header h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  color: var(--primary-deep);
  margin-bottom: 12px;
}
.section-header p { color: var(--muted); font-size: 17px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: center;
}
.about-visual {
  background: linear-gradient(160deg, var(--primary-light), #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.about-visual img { max-height: 240px; object-fit: contain; }
.about-text h3 { font-size: 24px; font-weight: 800; color: var(--primary-deep); margin-bottom: 16px; }
.about-text p { color: var(--muted); margin-bottom: 14px; }
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-top: 24px;
}
.feature-item { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.feature-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---------- Mission / vision ---------- */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 56px; }
.mv-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.mv-card.gold { border-top-color: var(--gold); }
.mv-card h3 { font-size: 20px; font-weight: 800; color: var(--primary-deep); margin: 14px 0 10px; }
.mv-card p { color: var(--muted); }
.mv-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mv-icon svg { width: 26px; height: 26px; stroke-width: 2; }
.mv-card.gold .mv-icon { background: #faf3e3; color: var(--gold-dark); }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 131, 143, 0.4);
}
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; stroke-width: 1.8; }
.service-card h4 { font-size: 19px; font-weight: 800; color: var(--primary-deep); }
.service-subtitle { color: var(--accent); font-size: 13.5px; font-weight: 700; margin: 3px 0 12px; }
.service-card > p:not(.service-subtitle) { color: var(--muted); font-size: 15px; flex-grow: 1; }
.service-highlight {
  margin-top: 18px;
  align-self: flex-start;
  background: #faf3e3;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
}

/* ---------- Membership ---------- */
.membership-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.info-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 38px;
  box-shadow: var(--shadow-sm);
}
.info-box h3 { font-size: 21px; font-weight: 800; color: var(--primary-deep); margin-bottom: 16px; }
.info-box h4 { font-size: 16px; font-weight: 700; color: var(--primary-deep); margin: 24px 0 12px; }
.info-box p { color: var(--muted); margin-bottom: 10px; }
.check-list { list-style: none; }
.check-list li {
  position: relative;
  padding: 8px 0 8px 34px;
  color: var(--ink);
  font-size: 15.5px;
  border-bottom: 1px dashed var(--border);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 8px; }
.step-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.step-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card h4 { font-size: 16px; font-weight: 700; color: var(--primary-deep); margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 18px 24px; color: var(--muted); font-size: 15.5px; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(212, 165, 74, 0.25), transparent 60%),
    linear-gradient(140deg, var(--primary-deep), var(--primary));
  color: #fff;
  border-radius: 20px;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(22px, 2.8vw, 30px); font-weight: 800; margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.82); max-width: 560px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-cards { display: flex; flex-direction: column; gap: 18px; }
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.contact-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-card .icon svg { width: 24px; height: 24px; stroke-width: 1.8; }
.contact-card h4 { font-size: 15px; font-weight: 700; color: var(--primary-deep); margin-bottom: 4px; }
.contact-card p, .contact-card a { color: var(--muted); font-size: 15.5px; }
.contact-card a:hover { color: var(--primary); }

.contact-form-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.contact-form-box h3 { font-size: 22px; font-weight: 800; color: var(--primary-deep); margin-bottom: 6px; }
.contact-form-box > p { color: var(--muted); margin-bottom: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-deep);
  margin-bottom: 7px;
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-soft);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 22px;
}
.alert-success { background: #e6f6ec; color: #14683a; border: 1px solid #b9e4c9; }
.alert-error { background: #fdeceb; color: #a4271e; border: 1px solid #f5c6c2; }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(700px 300px at 85% -20%, rgba(0, 131, 143, 0.4), transparent 60%),
    linear-gradient(150deg, var(--primary-deep), var(--primary));
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { font-size: clamp(26px, 3.6vw, 40px); font-weight: 800; margin-bottom: 10px; }
.page-hero p { color: rgba(255, 255, 255, 0.82); max-width: 640px; margin: 0 auto; font-size: 17px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal-updated {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 36px;
}
.legal h2 { font-size: 22px; font-weight: 800; color: var(--primary-deep); margin: 38px 0 14px; }
.legal h3 { font-size: 17px; font-weight: 700; color: var(--primary-deep); margin: 26px 0 10px; }
.legal p { color: var(--muted); margin-bottom: 14px; }
.legal ul { margin: 0 0 16px 22px; color: var(--muted); }
.legal ul li { margin-bottom: 8px; }
.legal a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.75);
  padding-top: 64px;
  border-top: 4px solid var(--gold);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 44px;
  padding-bottom: 48px;
}
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
}
.footer-logo strong { color: #fff; font-size: 19px; font-weight: 800; letter-spacing: 0.02em; }
.footer-brand p { font-size: 14px; margin-bottom: 12px; }
.footer-reg { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); }
.footer-col h4 {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: rgba(255, 255, 255, 0.75); font-size: 14.5px; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: 14.5px; margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.footer-credit { margin-top: 6px; }
.footer-credit a { color: var(--gold); font-weight: 600; }
.footer-credit a:hover { color: #fff; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 4px;
  }
  .nav-open .site-nav { display: flex; }
  .site-nav > a { padding: 13px 14px; }
  .site-nav .nav-cta { margin: 10px 0 0; text-align: center; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-visual { max-width: 420px; margin: 0 auto; }
  .mv-grid, .membership-grid, .contact-grid, .form-row { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .topbar-inner p { display: none; }
  .topbar-inner { justify-content: center; }
}

@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 56px; }
  .steps-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 28px; }
  .contact-form-box { padding: 28px 22px; }
}
