/* Namakkal Connect — namakkalconnect.online
   Brand palette mirrors lib/core/constants/app_colors.dart. */

:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent: #60a5fa;
  --gold: #ffc107;

  --ink: #0f172a;
  --body: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f8fafc;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 48px rgba(37, 99, 235, 0.28);
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }

p { margin: 0 0 1.1em; }

ul { padding-left: 1.25rem; }
li { margin-bottom: 0.5em; }

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

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }

.logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  flex: 0 0 auto;
}

.logo--xl {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  font-size: 2.25rem;
  margin: 0 auto 28px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
  font-weight: 600;
}
.nav a { color: var(--body); }
.nav a:hover { color: var(--primary); text-decoration: none; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--primary-dark), var(--primary) 55%, #4f46e5);
  color: #fff;
  text-align: center;
  padding: 88px 0 96px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 55%;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 0.35em; }

.tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  margin: 0 0 1.1em;
}

.hero-copy {
  max-width: 620px;
  margin: 0 auto 2.2em;
  color: rgba(255, 255, 255, 0.85);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  border: 1px solid transparent;
  cursor: default;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}
.btn--primary:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.34);
}

.btn__sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}
.btn__main { display: block; font-size: 1.02rem; line-height: 1.25; }
.btn__labels { text-align: left; }

.badge {
  display: inline-block;
  margin-top: 20px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

/* -------------------------------------------------------------- sections */

.section { padding: 76px 0; }
.section--tint { background: var(--surface); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}
.card h3 { margin-bottom: 0.35em; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  background: rgba(37, 99, 235, 0.1);
}
.card--gold .card__icon { background: rgba(255, 193, 7, 0.18); }

/* ----------------------------------------------------------- legal pages */

.page-head {
  background: linear-gradient(150deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 62px 0 56px;
}
.page-head h1 { color: #fff; margin-bottom: 0.2em; }
.page-head p { margin: 0; color: rgba(255, 255, 255, 0.85); }

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  margin: -34px auto 76px;
  box-shadow: var(--shadow);
  max-width: 860px;
  position: relative;
  z-index: 1;
}
.prose h2 { margin-top: 2em; font-size: 1.4rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul { margin: 0 0 1.2em; }

.callout {
  border-left: 4px solid var(--primary);
  background: rgba(37, 99, 235, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 0 0 1.6em;
}
.callout p:last-child { margin-bottom: 0; }

.callout--warn {
  border-left-color: var(--gold);
  background: rgba(255, 193, 7, 0.12);
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.6em; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  margin-bottom: 20px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}

.email-link { font-weight: 700; word-break: break-all; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.6em;
  font-size: 0.96rem;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th { color: var(--ink); font-weight: 700; background: var(--canvas); }
.table-scroll { overflow-x: auto; }

.updated { color: var(--muted); font-size: 0.92rem; margin-bottom: 2em; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.68);
  padding: 52px 0 40px;
  font-size: 0.95rem;
}
.site-footer .brand { color: #fff; margin-bottom: 18px; }

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-weight: 600;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a { color: rgba(255, 255, 255, 0.86); }
.footer-links a:hover { color: #fff; }

.copyright {
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 62px 0 68px; }
  .section { padding: 56px 0; }
  .nav { gap: 16px; font-size: 0.9rem; }
  .btn { width: 100%; }
  .footer-grid { flex-direction: column; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
