:root {
  --deep: #0E3444;
  --deep-2: #0A2530;
  --ocean: #015871;
  --wave-hi: #57BBC1;
  --gold: #FFC800;
  --cream: #FFFEEA;
  --aqua: #B7E8EB;
  --text-hi: #FFFEEA;
  --text-lo: #8FC3C9;
  --line: rgba(183,232,235,0.18);
  --error: #FF9B7A;
  --ok: #8FE3B0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 100%);
  color: var(--text-hi);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

/* Hero background image pinned to top */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: max(300px, 36vw);
  background: url("/assets/dpdp_india.png") center top / cover no-repeat;
  opacity: .6;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}

/* Header Component */
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 48px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10,37,48,.55), transparent);
}
header img { width: 64px; height: 64px; flex: none; }
header .brand { font-family: 'Lora', serif; font-size: 20px; color: var(--text-hi); text-decoration: none; }
header .tag { font-size: 12.5px; color: var(--text-lo); margin-top: 2px; }
header .back { margin-left: auto; font-size: 13px; color: var(--text-lo); text-decoration: none; }
header .back:hover { color: var(--gold); }

/* Main Layout Wrapper */
main {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 48px 64px;
  width: 100%;
  flex: 1;
}

h1 {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: clamp(24px, 4vw, 34px);
  margin-bottom: 10px;
  color: var(--cream);
}
.sub {
  color: var(--text-lo);
  font-size: 14.5px;
  margin-bottom: 32px;
  max-width: 720px;
}

/* Content Container Cards (Policy / Article Container) */
.policy, .article-body {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(10,37,48,0.55);
  padding: 28px 36px 36px;
  margin-bottom: 28px;
}
.policy h2, .article-body h2 {
  font-family: 'Lora', serif;
  font-weight: 500;
  font-size: 20px;
  margin-top: 28px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--aqua);
}
.policy p, .policy ul, .policy ol, .article-body p, .article-body ul, .article-body ol {
  font-size: 14.5px;
  line-height: 1.75;
  margin-bottom: 16px;
  color: var(--text-hi);
}
.policy ul, .policy ol, .article-body ul, .article-body ol { padding-left: 1.25rem; }
.policy li, .article-body li { margin-bottom: 8px; }
.policy strong, .article-body strong { color: var(--aqua); font-weight: 600; }
.policy a, .article-body a { color: var(--gold); text-decoration: none; }
.policy a:hover, .article-body a:hover { text-decoration: underline; }

/* Banners and CTAs */
.action-banner {
  border: 1px solid rgba(255,200,0,0.28);
  border-radius: 4px;
  background: rgba(255,200,0,0.05);
  padding: 22px 24px;
  margin: 0 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.action-banner strong { font-family: 'Lora', serif; font-weight: 500; font-size: 18px; color: var(--text-hi); }
.action-banner p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-lo); line-height: 1.5; }

/* Dynamic Grid / Cards (from index) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}
.card .kind { font-size: 11.5px; color: var(--gold); letter-spacing: 0.06em; font-weight: 600; margin-bottom: 10px; }
.card h3 { font-family: 'Lora', serif; font-size: 18px; font-weight: 500; line-height: 1.4; margin-bottom: 18px; }

/* Buttons */
.btn, .card button, .card a.dl {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 10px 18px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  align-self: flex-start;
}
.btn:hover, .card button:hover, .card a.dl:hover { background: var(--gold); color: var(--deep-2); }
.btn.solid { background: var(--gold); color: var(--deep-2); padding: 11px 22px; font-size: 14px; }
.btn.solid:hover { opacity: .9; }
.btn:disabled { opacity: .6; cursor: default; }

/* Code Diagram Box */
.diagram-box {
  background: rgba(10,25,32,0.85);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.25rem;
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--aqua);
  overflow-x: auto;
  margin: 1.5rem 0;
  white-space: pre;
  line-height: 1.4;
}

/* Comparison Tables */
.table-responsive { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: rgba(1,88,113,0.3); color: var(--gold); font-family: 'Lora', serif; font-weight: 500; }
td strong { color: var(--aqua); }

/* Modal Engine */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,20,27,0.8);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, #123B4D 0%, #0A2530 100%);
  border: 1px solid rgba(255,200,0,0.28); border-radius: 4px;
  padding: 30px 28px 26px; position: relative; color: var(--cream);
}
.modal h3 { font-family: 'Lora', serif; font-weight: 600; font-size: 21px; margin-bottom: 18px; padding-right: 28px; color: var(--cream); }
.close-btn { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text-lo); font-size: 20px; cursor: pointer; line-height: 1; padding: 4px; }
.close-btn:hover { color: var(--gold); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11.5px; color: var(--text-lo); margin-bottom: 6px; letter-spacing: 0.02em; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(183,232,235,0.25);
  border-radius: 2px; padding: 10px 12px; color: var(--cream); font-size: 14px; font-family: inherit;
}
.form-group select option { background: #0A2530; color: var(--cream); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(143,195,201,0.6); }

.alert { padding: 10px 12px; border-radius: 2px; font-size: 13px; margin-bottom: 14px; display: none; }
.alert-success { color: var(--ok); border: 1px solid rgba(143,227,176,0.4); background: rgba(143,227,176,0.08); }
.alert-error { color: var(--error); border: 1px solid rgba(255,155,122,0.4); background: rgba(255,155,122,0.08); }

#site-footer { margin-top: auto; }

/* Responsive adjustments */
@media (max-width: 720px) {
  header { padding: 20px 22px; }
  header .brand { font-size: 17px; }
  main { padding: 32px 22px 48px; }
  .policy, .article-body { padding: 20px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 480px) {
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: 8px 8px 0 0; max-height: 85vh; padding: 24px 20px 20px; }
}
@media (max-width: 380px) {
  header img { width: 30px; height: 30px; }
  header .brand { font-size: 15px; }
  header .tag { font-size: 11px; }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .arch-grid {
    grid-template-columns: 1fr;
  }
}


/* Architecture Visual Diagram */
.architecture-diagram {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.arch-card {
  width: 100%;
  background: rgba(10, 37, 48, 0.85);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.arch-card.arch-top {
  border-color: rgba(183, 232, 235, 0.3);
  text-align: center;
}

.arch-card.arch-bottom {
  border-color: rgba(255, 200, 0, 0.35);
  background: linear-gradient(180deg, rgba(14, 52, 68, 0.95) 0%, rgba(10, 37, 48, 0.95) 100%);
}

.arch-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-lo);
  margin-bottom: 8px;
}

.arch-header .gold-text {
  color: var(--gold);
  font-weight: 600;
}

.arch-icon {
  width: 18px;
  height: 18px;
  stroke: var(--aqua);
}

.arch-icon.gold {
  stroke: var(--gold);
}

.arch-title {
  font-family: 'Lora', serif;
  font-size: 18px;
  color: var(--cream);
  font-weight: 500;
}

/* Connector Line & Badge */
.arch-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0;
  width: 100%;
}

.arch-line {
  width: 2px;
  height: 16px;
  background: linear-gradient(180deg, var(--aqua), var(--gold));
}

.arch-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 200, 0, 0.08);
  border: 1px solid rgba(255, 200, 0, 0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
}

.flow-icon {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
}

/* Module Grid inside SaaS Layer */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.arch-module {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(183, 232, 235, 0.15);
  border-radius: 4px;
  padding: 14px 16px;
  transition: border-color 0.2s ease;
}

.arch-module:hover {
  border-color: var(--aqua);
}

.mod-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--aqua);
  margin-bottom: 4px;
}

.mod-desc {
  font-size: 11.5px;
  color: var(--text-lo);
  line-height: 1.4;
}

/* Clickable Article Gate Card Element */
a.articlegate {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(10, 37, 48, 0.55);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  text-decoration: none;
  color: var(--text-hi);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  min-height: 220px;
}

a.articlegate:hover {
  border-color: var(--gold);
  background: rgba(10, 37, 48, 0.85);
  transform: translateY(-2px);
}

a.articlegate .kind {
  font-size: 11.5px;
  color: var(--gold);
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 12px;
}

a.articlegate h3 {
  font-family: 'Lora', serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--cream);
}

a.articlegate .summary {
  font-size: 13.5px;
  color: var(--text-lo);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

a.articlegate .read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--aqua);
  display: inline-block;
  margin-top: auto;
}

a.articlegate:hover .read-more {
  color: var(--gold);
}

