/* ============================================================
   eService – District Secretariat Anuradhapura
   Modern government portal stylesheet
   ============================================================ */

:root {
  --forest-950: #06231a;
  --forest-900: #0f3d2e;
  --forest-800: #14523d;
  --forest-700: #1a6a4f;
  --forest-600: #1f8560;
  --forest-100: #dcefe7;
  --forest-50: #effaf5;

  --gold-500: #e9b52f;
  --gold-400: #f2c94c;
  --gold-300: #f7dc86;

  --ink: #0b1f18;
  --slate-700: #33413b;
  --slate-500: #64746e;
  --slate-400: #94a39d;
  --line: #e4ebe8;
  --bg: #ffffff;
  --bg-soft: #f5f9f7;

  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(6, 35, 26, 0.06), 0 4px 14px rgba(6, 35, 26, 0.05);
  --shadow-md: 0 10px 30px rgba(6, 35, 26, 0.1);
  --shadow-lg: 0 24px 60px rgba(6, 35, 26, 0.16);
  --font: 'Plus Jakarta Sans', 'Noto Sans Sinhala', 'Noto Sans Tamil', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }

.container {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

.ico { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ============================================================
   Top government bar
   ============================================================ */
.topbar {
  background: var(--forest-950);
  color: var(--forest-100);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 38px;
  flex-wrap: wrap;
  padding-block: 0.3rem;
}
.topbar-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-500);
}
.topbar-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-300);
  text-decoration: none;
}
.topbar-link:hover { color: var(--gold-400); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-width: 0;
}
.brand-emblem {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(6, 35, 26, 0.18));
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--forest-900);
}
.brand-sub {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.nav-link {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-700);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover {
  background: var(--forest-50);
  color: var(--forest-800);
}

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.lang-switch {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-btn {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-500);
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn:hover { color: var(--forest-800); }
.lang-btn.is-active {
  background: var(--forest-900);
  color: #fff;
  box-shadow: 0 3px 10px rgba(15, 61, 46, 0.3);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--forest-900);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(31, 133, 96, 0.5), transparent 60%),
    linear-gradient(155deg, var(--forest-950) 0%, var(--forest-900) 55%, #0b4a37 100%);
  color: #fff;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
}
.blob-1 { width: 460px; height: 460px; background: var(--forest-600); top: -160px; right: -80px; }
.blob-2 { width: 380px; height: 380px; background: rgba(233, 181, 47, 0.35); bottom: -180px; left: 8%; }
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 85%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
  padding-block: clamp(3rem, 6vw, 5rem);
  max-width: 62rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(242, 201, 76, 0.14);
  border: 1px solid rgba(242, 201, 76, 0.4);
  color: var(--gold-300);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin-top: 1.25rem;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero-title .accent {
  background: linear-gradient(92deg, var(--gold-300), var(--gold-500) 55%, var(--gold-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 1.15rem;
  max-width: 34rem;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: rgba(255, 255, 255, 0.82);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.97rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--forest-950);
  box-shadow: 0 12px 30px rgba(233, 181, 47, 0.32);
}
.btn-gold:hover { box-shadow: 0 16px 38px rgba(233, 181, 47, 0.42); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 70px; display: block; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.section-alt { background: var(--bg-soft); }

.section-head { max-width: 46rem; margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forest-600);
}
.eyebrow-light { color: var(--gold-400); }

.section-title {
  margin-top: 0.7rem;
  font-size: clamp(1.65rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--forest-950);
}
.section-sub {
  margin-top: 0.9rem;
  color: var(--slate-500);
  font-size: 1.02rem;
}

/* ============================================================
   Service tiles
   ============================================================ */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.8rem;
  max-width: 900px;
  margin-inline: auto;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, border-color 0.25s;
}
.tile::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--forest-700), var(--gold-500));
  opacity: 0;
  transition: opacity 0.25s;
}
.tile-live:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--forest-600);
}
.tile-live:hover::before { opacity: 1; }
.tile-live:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

.tile-soon {
  background: repeating-linear-gradient(135deg, #fbfdfc, #fbfdfc 14px, #f6faf8 14px, #f6faf8 28px);
  border-style: dashed;
}
.tile-soon .tile-action { color: var(--slate-400); }

.tile-badge {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.badge-live {
  background: var(--forest-50);
  color: var(--forest-700);
  border: 1px solid var(--forest-100);
  box-shadow: 0 0 0 4px rgba(31, 133, 96, 0.08);
}
.badge-soon { background: #eef2f0; color: var(--slate-500); border: 1px solid var(--line); }

.tile-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  font-size: 1.6rem;
}
.icon-green {
  background: linear-gradient(140deg, var(--forest-800), var(--forest-600));
  color: var(--gold-300);
  box-shadow: 0 10px 24px rgba(26, 106, 79, 0.32);
}
.icon-muted { background: #e9efec; color: var(--slate-500); }

.tile-title {
  margin-top: 1.3rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--forest-950);
}
.tile-desc {
  margin-top: 0.6rem;
  font-size: 0.94rem;
  color: var(--slate-500);
  flex-grow: 1;
}
.tile-meta {
  margin-top: 1.1rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest-600);
}
.tile-soon .tile-meta { color: var(--slate-400); }

.tile-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--forest-700);
}
.tile-live:hover .tile-action { gap: 0.75rem; }
.tile-action .ico { transition: transform 0.25s; }
.tile-live:hover .tile-action .ico { transform: translate(2px, -2px); }

/* ============================================================
   Steps
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.8rem;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 2rem 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.step-num {
  position: absolute;
  top: 1.5rem;
  right: 1.6rem;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--forest-100);
}
.step-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 1.4rem;
  border: 1px solid var(--forest-100);
}
.step-title {
  margin-top: 1.2rem;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--forest-950);
}
.step-desc { margin-top: 0.5rem; font-size: 0.93rem; color: var(--slate-500); }

/* ============================================================
   Contact
   ============================================================ */
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  padding: clamp(2rem, 4vw, 3.25rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(31, 133, 96, 0.5), transparent 65%),
    linear-gradient(140deg, var(--forest-950), var(--forest-900));
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.contact-card > * { min-width: 0; }
.contact-title {
  margin-top: 0.7rem;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.contact-sub { margin-top: 0.8rem; color: rgba(255, 255, 255, 0.78); }

.contact-list { display: grid; gap: 1rem; align-content: center; }
.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  transition: background 0.2s;
}
.contact-list li:hover { background: rgba(255, 255, 255, 0.12); }
.contact-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(242, 201, 76, 0.16);
  color: var(--gold-300);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.contact-list strong {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-300);
}
.contact-list a,
.contact-list li > span:not(.contact-ico) {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.96rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-list a:hover { color: var(--gold-300); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--forest-950);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-block: 3.25rem 2.5rem;
}
.brand-footer .brand-title { color: #fff; }
.brand-footer .brand-sub { color: rgba(255, 255, 255, 0.6); }
.footer-about { margin-top: 1rem; font-size: 0.92rem; max-width: 24rem; }

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 1rem;
}
.footer-col a,
.footer-muted {
  display: block;
  padding: 0.32rem 0;
  font-size: 0.92rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold-300); }
.footer-muted { color: rgba(255, 255, 255, 0.45); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-secure { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--gold-300); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    margin: 0;
    padding: 0.85rem 1.25rem 1.15rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-link { padding: 0.75rem 0.9rem; border-radius: 12px; }
  .nav-toggle { display: inline-flex; }
  .header-inner { position: relative; flex-wrap: wrap; min-height: 68px; padding-block: 0.5rem; }
  .brand-emblem { width: 44px; height: 44px; }
  .brand-title { font-size: 1.15rem; }
  .contact-card { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar-link { margin-left: 0; }
  .topbar-sep { display: none; }
  .hero-title { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .tiles { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .lang-btn { padding: 0.35rem 0.6rem; }
}
