/* ============================================================
   Gateway to Assam 7 — shared stylesheet
   Clean, modern blue-and-white theme
   ============================================================ */

:root {
  --blue-950: #071f47;
  --blue-900: #0a2a5e;
  --blue-800: #0f3d85;
  --blue-700: #134f9e;
  --blue-600: #1a63c4;
  --blue-500: #2377e8;
  --blue-100: #e8f1fc;
  --blue-50:  #f4f8fd;
  --ink:      #1c2b3a;
  --muted:    #52657c;
  --line:     #d8e4f5;
  --white:    #ffffff;
  --radius:   14px;
  --shadow:   0 2px 10px rgba(10, 42, 94, 0.07);
  --shadow-lg:0 10px 30px rgba(10, 42, 94, 0.12);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16.5px;
}

img { max-width: 100%; }

a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--blue-900);
  font-weight: 700;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1em; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  color: var(--blue-900);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--blue-50);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.15rem;
  color: var(--blue-800);
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}

.site-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--blue-700);
  background: var(--blue-50);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--blue-700);
  background: var(--blue-100);
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 0.6rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 0.95rem; }
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(35, 119, 232, 0.35), transparent 60%),
    linear-gradient(150deg, var(--blue-950), var(--blue-800));
  color: #fff;
  padding: 4.5rem 1.25rem 4rem;
}

.hero-inner { max-width: 1180px; margin: 0 auto; }

.hero h1 { color: #fff; max-width: 21ch; }

.hero .kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bcd6f8;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.hero .lede {
  font-size: 1.12rem;
  color: #d7e6fa;
  max-width: 62ch;
}

.hero .cta-row { margin-top: 1.75rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.3rem;
  border-radius: 10px;
  transition: transform 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: #fff; color: var(--blue-800); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.45); }

/* ---------- Layout ---------- */

.section { padding: 3.25rem 1.25rem; }
.section.alt { background: var(--blue-50); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section-inner.narrow { max-width: 860px; }

.section .eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: 0.4rem;
}

.section-sub {
  color: var(--muted);
  max-width: 68ch;
  margin-bottom: 2rem;
}

/* ---------- Cards & grids ---------- */

.card-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: var(--shadow);
}

.card h3 { margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.4rem; }
.card .card-link { font-size: 0.9rem; font-weight: 700; }

.card .icon {
  font-size: 1.4rem;
  display: inline-block;
  margin-bottom: 0.6rem;
}

/* ---------- Stats ---------- */

.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 1.8rem 0;
}

.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-500);
  border-radius: 10px;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow);
}

.stat .num {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--blue-800);
  letter-spacing: -0.02em;
  display: block;
}

.stat .label { font-size: 0.86rem; color: var(--muted); }

/* ---------- Callouts ---------- */

.callout {
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin: 1.6rem 0;
  border: 1px solid var(--line);
  background: var(--blue-50);
}

.callout.deep {
  background: linear-gradient(140deg, var(--blue-900), var(--blue-700));
  border: none;
  color: #e6effc;
}
.callout.deep h3, .callout.deep strong { color: #fff; }
.callout.deep a { color: #bcd6f8; }

.callout .callout-title {
  font-weight: 800;
  color: var(--blue-800);
  display: block;
  margin-bottom: 0.35rem;
}

/* ---------- Prose ---------- */

.prose { max-width: 800px; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--blue-500); font-weight: 700; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.3rem;
  border-left: 4px solid var(--blue-500);
  background: var(--blue-50);
  border-radius: 0 10px 10px 0;
  color: var(--blue-900);
  font-style: italic;
}

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.4rem 0; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--blue-100);
  color: var(--blue-900);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--blue-50); }

/* ---------- Timeline ---------- */

.timeline { list-style: none; margin: 1.8rem 0; padding: 0; position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--line);
  border-radius: 3px;
}

.timeline li { position: relative; padding: 0 0 1.6rem 2.4rem; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--blue-500);
  border: 3px solid var(--blue-100);
}

.timeline .phase {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-500);
}

.timeline h3 { margin: 0.15rem 0 0.35rem; }
.timeline p { color: var(--muted); font-size: 0.95rem; max-width: 70ch; }

/* ---------- Pills / tags ---------- */

.pill-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0 1.4rem; }

.pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-800);
  background: var(--blue-100);
  border: 1px solid var(--line);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

/* ---------- References ---------- */

.refs {
  border-top: 2px solid var(--line);
  margin-top: 3rem;
  padding-top: 1.4rem;
}

.refs h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.refs ol { font-size: 0.86rem; color: var(--muted); padding-left: 1.3rem; }
.refs li { margin-bottom: 0.35rem; }

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  background:
    radial-gradient(800px 300px at 90% -20%, rgba(35, 119, 232, 0.3), transparent 60%),
    linear-gradient(150deg, var(--blue-950), var(--blue-800));
  color: #fff;
  padding: 3.25rem 1.25rem 2.75rem;
}
.page-hero .hero-inner { max-width: 1180px; margin: 0 auto; }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: #d7e6fa; max-width: 66ch; font-size: 1.05rem; }
.page-hero .kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bcd6f8;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--blue-950);
  color: #a9c3e6;
  padding: 2.5rem 1.25rem;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.footer-inner { max-width: 1180px; margin: 0 auto; }
.site-footer strong { color: #fff; }
.site-footer .footer-note { color: #7d9cc7; margin-top: 0.4rem; }
.site-footer nav { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.site-footer nav a { color: #bcd6f8; font-size: 0.85rem; }

/* ---------- Utility ---------- */

.two-col {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}

.diagram-box {
  background: var(--blue-950);
  color: #cfe2fa;
  border-radius: var(--radius);
  padding: 1.4rem;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre;
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
