/* ==========================================================================
   DELPHIN T8 – Shared Design System
   Source of truth: Design.md (derived from index.html)
   ========================================================================== */

/* Reset & tokens */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --dark: #0a0e17;
  --dark-2: #111827;
  --dark-3: #1a2235;
  --blue: #0066cc;
  --blue-light: #3b9eff;
  --blue-glow: #0088ff;
  --accent: #00d4ff;
  --gold: #d4a853;
  --white: #ffffff;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--gray-200);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ==========================================================================
   NAVIGATION (fixed top, blur on scroll)
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  transition: all 0.4s ease;
  background: transparent;
}
.nav.scrolled {
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.8rem 2rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: height 0.4s ease;
}
.nav.scrolled .nav-logo img { height: 32px; }
.nav-logo span {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 2px;
  color: var(--white);
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--gray-300);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: var(--white) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: transform 0.3s, box-shadow 0.3s !important;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 136, 255, 0.4);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 5px;
}
.menu-toggle span {
  width: 28px; height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
  display: block;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white);
  padding: 1rem 2.2rem;
  border-radius: 60px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-light), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 136, 255, 0.4);
}
.btn-primary > * { position: relative; z-index: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.05);
  color: var(--white);
  padding: 1rem 2.2rem;
  border-radius: 60px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-3px);
}

.btn-large { padding: 1.2rem 3rem; font-size: 1.1rem; }

/* ==========================================================================
   SECTION TYPE SCALE
   ========================================================================== */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  max-width: 800px;
  margin: 0 auto 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto 4rem;
  line-height: 1.7;
}

/* ==========================================================================
   ARTICLE PAGE LAYOUT
   ========================================================================== */
.article-hero {
  padding: 10rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--dark), var(--dark-2));
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,136,255,0.08), transparent 70%);
  pointer-events: none;
}
.article-hero .section-label {
  background: rgba(0, 212, 255, 0.08);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  border: 1px solid rgba(0, 212, 255, 0.15);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}
.article-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
}
.article-hero .subtitle {
  font-size: 1.1rem;
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 2rem 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}
.breadcrumb a {
  color: var(--gray-400);
  transition: color 0.3s;
}
.breadcrumb a:hover { color: var(--accent); }

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}
.article-body h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  margin: 3rem 0 1.2rem;
  line-height: 1.3;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--blue-light);
  margin: 2rem 0 0.8rem;
}
.article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-300);
  margin-bottom: 1.5rem;
}
.article-body ul {
  list-style: none;
  margin: 0 0 2rem 0;
  padding: 0;
}
.article-body ul li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gray-300);
}
.article-body ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.article-body .con li::before { content: '\2717'; color: #ff6b6b; }

.info-box {
  background: linear-gradient(135deg, rgba(0,136,255,0.08), rgba(0,212,255,0.04));
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}
.info-box h3 {
  color: var(--accent);
  margin-top: 0;
}

.article-img {
  border-radius: 16px;
  overflow: hidden;
  margin: 2.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}
.article-img img { width: 100%; display: block; }

/* Article CTA banner */
.article-cta {
  background: linear-gradient(135deg, var(--dark-3), var(--dark-2));
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  margin: 3rem 0;
}
.article-cta h3 {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.8rem;
}
.article-cta p {
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}

/* Compare table inside article-body */
.compare-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.compare-table th {
  background: rgba(0, 136, 255, 0.12);
  color: var(--white);
  padding: 1rem;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
}
.compare-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--gray-300);
  font-size: 0.95rem;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }
.compare-table .highlight-row td {
  background: rgba(0, 212, 255, 0.06);
  color: var(--white);
  font-weight: 600;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: var(--dark-2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 3rem 2rem;
  text-align: center;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--gray-500);
  letter-spacing: 1px;
  font-size: 0.9rem;
}
.footer-logo img {
  height: 28px;
  filter: brightness(0) invert(1);
  opacity: 0.6;
  border-radius: 6px;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.85rem;
}
.footer-links a {
  color: var(--gray-500);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--gray-500);
  opacity: 0.7;
}

/* ==========================================================================
   LEGAL MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 1.5rem;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: linear-gradient(180deg, #141b2d, #0f1629);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  max-width: 680px;
  width: 100%;
  padding: 3rem 2.5rem;
  position: relative;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 80px rgba(0, 136, 255, 0.08);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gray-400);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}
.modal-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.modal-header h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.legal-modal .modal {
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem 2.5rem 2rem;
}
.legal-modal .modal::-webkit-scrollbar { width: 6px; }
.legal-modal .modal::-webkit-scrollbar-track { background: transparent; }
.legal-modal .modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
.legal-modal .modal-header { margin-bottom: 1.5rem; text-align: left; }
.legal-modal .modal-header h3 { font-size: 1.4rem; }
.legal-body {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.8;
}
.legal-body h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin: 1.8rem 0 0.6rem;
}
.legal-body h4:first-child { margin-top: 0; }
.legal-body p { margin-bottom: 0.8rem; }
.legal-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-body a:hover { color: var(--blue-light); }
.legal-notice {
  margin-top: 2rem;
  padding: 1.2rem 1.5rem;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--gray-300);
  line-height: 1.7;
  font-style: normal;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }
  .nav.scrolled { padding: 0.8rem 1.5rem; }
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.2rem; }
  .menu-toggle { display: flex; }

  .article-hero { padding: 8rem 1.5rem 3rem; }
  .article-body { padding: 2rem 1.5rem 4rem; }
  .article-cta { padding: 2rem; }
  .breadcrumb { padding: 1rem 1.5rem 0; }

  .footer-content { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }

  .compare-table { font-size: 0.85rem; }
  .compare-table th, .compare-table td { padding: 0.6rem; }
}

@media (max-width: 600px) {
  .legal-modal .modal { padding: 1.8rem 1.2rem 1.5rem; }
}

/* ==========================================================================
   SHARED CONTENT COMPONENTS (article-body children)
   All use the canonical cyan/blue palette – no per-page color drift.
   ========================================================================== */

/* Stat grid (3-up boxes with big numbers) */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 2.5rem 0;
}
.stat-box {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(0, 136, 255, 0.02));
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}
.stat-box .number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
}
.stat-box .label {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-top: 0.4rem;
}

/* Two-up card grids (cause-grid / step-grid) – unified as .card-grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin: 2rem 0;
}
.card-grid .card {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(0, 136, 255, 0.02));
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
}
.card-grid .card .num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.card-grid .card h3 {
  font-size: 1.1rem;
  color: var(--white);
  margin: 0.5rem 0 0.4rem;
  font-weight: 700;
}
.card-grid .card p {
  font-size: 0.95rem;
  color: var(--gray-400);
  line-height: 1.6;
  margin: 0;
}

/* Pro/Con grid */
.procon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}
.procon-box {
  border-radius: 16px;
  padding: 1.8rem;
  border: 1px solid;
}
.procon-box.pro {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 136, 255, 0.03));
  border-color: rgba(0, 212, 255, 0.2);
}
.procon-box.con {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 107, 107, 0.02));
  border-color: rgba(255, 107, 107, 0.2);
}
.procon-box h3 { margin-top: 0; font-size: 1.2rem; }
.procon-box.pro h3 { color: var(--accent); }
.procon-box.con h3 { color: #ff6b6b; }
.procon-box ul { margin: 0.8rem 0 0; padding: 0; list-style: none; }
.procon-box ul li {
  position: relative;
  padding-left: 1.8rem;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
  color: var(--gray-300);
}
.procon-box.pro ul li::before { content: '\2713'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.procon-box.con ul li::before { content: '\2717'; position: absolute; left: 0; color: #ff6b6b; font-weight: 700; }

/* Pull-quote box */
.quote-box {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gray-300);
  border-radius: 0 12px 12px 0;
}
.quote-box .author {
  display: block;
  margin-top: 0.6rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* 16:9 video embed frame (matches .article-img visual) */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  margin: 2.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}
.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

@media (max-width: 768px) {
  .stat-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .procon-grid { grid-template-columns: 1fr; }
}
