/* ============================================================
   DvSum Website — Base Styles
   Reset, typography defaults, utility classes
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  transition: background var(--transition-theme), color var(--transition-theme);
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
h1 { font-size: var(--text-hero); font-weight: 800; }
h2 { font-size: var(--text-3xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); font-weight: 700; }
h4 { font-size: var(--text-xl);  font-weight: 600; }
p  { color: var(--text-secondary); line-height: 1.7; }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.section {
  padding: var(--section-py) 0;
}
.section--surface {
  background: var(--bg-surface);
}
.section--inverse {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.section--inverse h1,
.section--inverse h2,
.section--inverse h3,
.section--inverse h4 {
  color: var(--text-inverse);
}
.section--inverse p {
  color: rgba(240,240,240,0.7);
}

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Flex utilities ── */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-2       { gap: var(--space-2); }
.gap-3       { gap: var(--space-3); }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-101%);
  transition: transform var(--transition-base);
}
.btn:hover::before { transform: translateX(0); }

.btn-primary {
  background: var(--dv-orange);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(240,80,0,0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(240,80,0,0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--dv-orange);
  color: var(--dv-orange);
}
.btn-ghost {
  background: transparent;
  color: var(--dv-orange);
  padding: 14px 0;
}
.btn-ghost:hover { gap: var(--space-2); }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--dv-orange);
}

/* ── Eyebrow label ── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dv-orange);
}

/* ── Section header ── */
.section-header {
  max-width: 640px;
  margin-bottom: var(--space-10);
}
.section-header.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-header h2 { margin-top: var(--space-2); }
.section-header p  { margin-top: var(--space-3); font-size: var(--text-lg); }

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* ── Orange accent line ── */
.accent-line {
  width: 40px;
  height: 3px;
  background: var(--dv-orange);
  border-radius: 2px;
  margin-bottom: var(--space-3);
}

/* ── Scroll animations ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Focus states (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--dv-orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--dv-orange); }

/* ── Text utilities ── */
.text-orange  { color: var(--dv-orange); }
.text-teal    { color: var(--dv-teal); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.text-sm      { font-size: var(--text-sm); }
.text-lg      { font-size: var(--text-lg); }

/* ── Responsive helpers ── */
@media (max-width: 768px) {
  .hide-mobile { display: none; }
  h1 { letter-spacing: -0.03em; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none; }
}

/* ── Button BEM variants (aliases for old camelCase) ── */
.btn--primary {
  background: var(--dv-orange);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(240,80,0,0.25);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(240,80,0,0.35);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--dv-orange);
  color: var(--dv-orange);
}

.btn--outline {
  background: transparent;
  color: var(--dv-orange);
  border: 1.5px solid var(--dv-orange);
}
.btn--outline:hover {
  background: var(--dv-orange);
  color: #ffffff;
}

.btn--lg { padding: 16px 32px; font-size: var(--text-base); }
.btn--sm { padding: 9px 18px; font-size: var(--text-sm); }

/* ── Type utility classes ── */
.text-hero { font-family: var(--font-display); font-size: var(--text-hero); font-weight: 800; letter-spacing: -0.03em; line-height:1.05; }
.text-4xl  { font-family: var(--font-display); font-size: var(--text-4xl);  font-weight: 700; letter-spacing: -0.02em; line-height:1.1; }
.text-3xl  { font-family: var(--font-display); font-size: var(--text-3xl);  font-weight: 700; letter-spacing: -0.02em; line-height:1.15; }
.text-2xl  { font-family: var(--font-display); font-size: var(--text-2xl);  font-weight: 600; letter-spacing: -0.01em; }
.text-secondary { color: var(--text-secondary); }

/* ── Section label (eyebrow above h2) ── */
.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dv-orange);
  margin-bottom: var(--space-2);
}

/* ── Reading progress bar ── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--dv-orange), var(--dv-teal));
  z-index: 9999;
  transition: width 0.1s linear, opacity 0.3s ease;
}

/* ── REVEAL: visible by default, animate only when JS adds .visible ──
   This prevents blank gaps if IntersectionObserver fires late          */
.reveal {
  opacity: 1 !important;  /* override the inline opacity:0 from JS */
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Override the inline style injected by the inline <script> in index.html */

/* ── Status badges (shared: network-operations, customer-experience) ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  margin-bottom: var(--space-2);
}
.status-badge--live {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}
.status-badge--live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
.status-badge--roadmap {
  background: rgba(40,180,200,0.1);
  color: var(--dv-teal);
  border: 1px solid rgba(40,180,200,0.2);
}

/* ── Button variant: teal outline ── */
.btn--teal-outline {
  background: transparent;
  color: var(--dv-teal);
  border: 1.5px solid var(--dv-teal);
}
.btn--teal-outline:hover {
  background: var(--dv-teal);
  color: #0D0D0D;
}

/* ── Card icon block (shared) ── */
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.card-icon svg { width: 20px; height: 20px; }
.card-icon--orange { background: var(--dv-orange-dim); color: var(--dv-orange); }
.card-icon--teal   { background: var(--dv-teal-dim);   color: var(--dv-teal);   }

/* ── Card label (eyebrow inside a card) ── */
.card-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.card-label--orange { color: var(--dv-orange); }
.card-label--teal   { color: var(--dv-teal);   }

/* ── Card hover variant: teal border ── */
.card:hover.card--teal-hover { border-color: var(--dv-teal); }

/* ── Outline button on a dark/inverse background ── */
.btn--outline-on-dark {
  color: var(--text-inverse);
  border-color: rgba(255,255,255,0.3);
}
.btn--outline-on-dark:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.5);
}

/* ── Card title (used inside act/feature cards as non-heading title) ── */
.card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
}

/* ============================================================
   PAGE HERO — shared inner-page dark hero
   Used by: network-operations, customer-experience, and all
   future inner pages. Home page uses its own .hero component.
   ============================================================ */
.page-hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--bg-hero);
  overflow: hidden;
  padding: var(--space-16) 0 var(--space-12);
}

/* Background layer */
.page-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.page-hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(40,180,200,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40,180,200,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Glow blobs — position and color set per-page */
.page-hero__bg-glow {
  position: absolute;
  border-radius: 50%;
  animation: page-hero-glow 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes page-hero-glow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.08); }
}

/* Floating dot nodes — size/color/position set per-page */
.page-hero__dot {
  position: absolute;
  border-radius: 50%;
  animation: page-hero-float 6s ease-in-out infinite alternate;
}
@keyframes page-hero-float {
  from { transform: translateY(0); }
  to   { transform: translateY(-12px); }
}

/* Inner 2-col layout */
.page-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

/* Eyebrow pill */
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  margin-bottom: var(--space-5);
}
.page-hero__eyebrow--orange {
  background: rgba(240,80,0,0.12);
  border: 1px solid rgba(240,80,0,0.25);
}
.page-hero__eyebrow--teal {
  background: rgba(40,180,200,0.12);
  border: 1px solid rgba(40,180,200,0.25);
}
.page-hero__eyebrow-text {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page-hero__eyebrow--orange .page-hero__eyebrow-text { color: var(--dv-orange); }
.page-hero__eyebrow--teal   .page-hero__eyebrow-text { color: var(--dv-teal); }

/* H1 */
.page-hero__h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text-hero-color);
  margin-bottom: var(--space-5);
}
/* Hero sections are ALWAYS on dark backgrounds — override section--inverse
   which would set h1 to --text-inverse (#0E0E0E) in dark mode, making
   hero headings invisible. The page-hero class wins via specificity. */
.page-hero .page-hero__h1,
.section--inverse .page-hero__h1 {
  color: var(--text-hero-color) !important;
}
.page-hero .page-hero__sub,
.section--inverse .page-hero__sub {
  color: var(--text-hero-dim) !important;
}
.page-hero .page-hero__eyebrow-text {
  color: inherit;
}
.page-hero__h1 .h1-mobile  { display: none; }
.page-hero__h1 .h1-desktop { display: block; }

/* Subhead */
.page-hero__sub {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-hero-dim);
  max-width: 520px;
  margin-bottom: var(--space-8);
}

/* CTA row */
.page-hero__ctas {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Right: stat card cluster */
.page-hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.page-hero__stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-hero);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  backdrop-filter: blur(8px);
  transition: border-color var(--transition-base), background var(--transition-base);
}
.page-hero__stat-card:hover {
  border-color: rgba(240,80,0,0.3);
  background: rgba(240,80,0,0.05);
}
.page-hero__stat-card--teal:hover {
  border-color: rgba(40,180,200,0.3);
  background: rgba(40,180,200,0.05);
}
.page-hero__stat-card--orange:hover {
  border-color: rgba(240,80,0,0.3);
  background: rgba(240,80,0,0.05);
}
.page-hero__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1;
  color: var(--dv-orange);
  margin-bottom: var(--space-1);
}
.page-hero__stat-card--teal   .page-hero__stat-value { color: var(--dv-teal); }
.page-hero__stat-card--orange .page-hero__stat-value { color: var(--dv-orange); }
.page-hero__stat-label {
  font-size: var(--text-sm);
  color: var(--text-hero-dim);
  line-height: 1.4;
}
.page-hero__stat-scope {
  font-size: var(--text-xs);
  color: var(--text-hero-mute);
  margin-top: 4px;
  display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .page-hero__inner { grid-template-columns: 1fr; }
  .page-hero__stats { display: none; }
  .page-hero { min-height: auto; padding: var(--space-12) 0 var(--space-10); }
}
@media (max-width: 480px) {
  .page-hero__h1 .h1-desktop { display: none; }
  .page-hero__h1 .h1-mobile  { display: block; }
  .page-hero__ctas { flex-direction: column; }
  .page-hero__ctas .btn { width: 100%; justify-content: center; }
}
