/* ============================================================
   KOSENTIA  main.css
   Shared across index.html, blog.html, and all inner pages
   ============================================================ */

/* ─── TOKENS ─── */
:root {
  --ink:       #0f1419;
  --ink-80:    #2d3748;
  --ink-60:    #4a5568;
  --ink-40:    #718096;
  --ink-20:    #a0aec0;
  --ink-10:    #e2e8f0;
  --ink-05:    #f5f7fa;
  --white:     #ffffff;
  --slate:     #1A2332;
  --slate-mid: #2E3A52;
  --accent:    #00D4FF;   /* Electric Cyan  used sparingly */

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius:  4px;
  --radius-lg: 8px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* ─── FOCUS STATES (WCAG AA) ─── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── NAV ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--ink-10); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: opacity 0.25s var(--ease);
}
.nav-brand:hover { opacity: 0.75; }
.nav-logo {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-60);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  background: var(--slate-mid) !important;
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: background 0.2s !important;
}
.nav-cta:hover, .nav-cta:active { background: var(--accent) !important; color: var(--ink) !important; }

/* ─── HAMBURGER ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s, background-color 0.25s var(--ease);
  transform-origin: center;
}
.nav.menu-open .nav-hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.menu-open .nav-hamburger span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 13px 28px;
  border: none;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost {
  background: none; border: none; padding: 0;
  color: var(--ink-60); font-size: 13px; font-weight: 400;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--ink); }
.btn-ghost::after { content: '→'; font-size: 13px; }

/* ─── SECTION UTILITIES ─── */
.section { padding: 100px 60px; }
.section-sm { padding: 72px 60px; }
.section-dark { background: var(--slate); color: var(--white); }
.section-muted { background: var(--ink-05); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-40);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink-40);
  flex-shrink: 0;
}
.section-dark .eyebrow { color: rgba(255,255,255,0.35); }
.section-dark .eyebrow::before { background: var(--accent); }

.display {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-dark .display { color: var(--white); }

.lead {
  font-size: 16px;
  font-weight: 300;
  color: var(--ink-60);
  line-height: 1.75;
}
.section-dark .lead { color: rgba(255,255,255,0.55); }

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: var(--ink-10);
  border: none;
  margin: 0;
}

/* ─── ANIMATIONS ─── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

/* ─── FOOTER ─── */
.footer {
  background: var(--slate);
  color: var(--white);
  padding: 64px 60px 36px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 32px;
}
.footer-brand { font-family: var(--font-mono); font-size: 15px; color: var(--white); margin-bottom: 12px; }
.footer-tagline { font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.38); line-height: 1.65; max-width: 220px; }
.footer-social { display: flex; gap: 4px; margin-top: 20px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: rgba(255,255,255,0.55);
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--accent); }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.22); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-legal a:hover { color: var(--accent); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .nav { padding: 0 32px; }
  .section { padding: 80px 32px; }
  .section-sm { padding: 56px 32px; }
  .footer { padding: 56px 32px 32px; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  /* Nav bar becomes transparent so the overlay behind it shows through */
  .nav.menu-open {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
  }
  /* Hamburger turns white over the dark overlay */
  .nav.menu-open .nav-hamburger span { background-color: var(--white); }

  /* Full-screen overlay: sits behind the nav bar content (z-index:-1)
     but spans the full viewport via position:absolute + height:100vh */
  .nav-links {
    display: flex !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding-top: 64px;
    background: rgba(15, 20, 25, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }
  .nav.menu-open .nav-links {
    opacity: 1;
    pointer-events: auto;
  }

  /* Link items */
  .nav-links li { border-bottom: none; width: 100%; text-align: center; }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links li a {
    display: block;
    padding: 14px 40px;
    font-size: 20px !important;
    font-weight: 300 !important;
    color: rgba(255, 255, 255, 0.72) !important;
    background: none !important;
    border-radius: 0 !important;
    letter-spacing: 0.01em;
    transition: color 0.2s !important;
  }
  .nav-links li a:hover { color: var(--white) !important; }
  .nav-links li a.nav-cta {
    display: inline-block !important;
    color: var(--white) !important;
    background: var(--slate-mid) !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 11px 28px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-top: 4px !important;
  }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav { padding: 0 20px; }
  .section { padding: 60px 20px; }
  .section-sm { padding: 44px 20px; }
  .footer { padding: 48px 20px 28px; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════
   SCROLL EXPERIENCE  ANIMATIONS, REVEALS & INTERACTIONS
   ════════════════════════════════════════════════════════ */

/* ─── SCROLL PROGRESS BAR ─── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, #00B8A9 60%, #5B73A8 100%);
  z-index: 9999;
  pointer-events: none;
}

/* ─── EXTENDED STAGGER DELAYS ─── */
.d5 { transition-delay: 0.40s; }
.d6 { transition-delay: 0.48s; }

/* ─── DIRECTIONAL REVEAL VARIANTS ─── */
.fade-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.fade-left.visible { opacity: 1; transform: translateX(0); }

.fade-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.fade-right.visible { opacity: 1; transform: translateX(0); }

.scale-in {
  opacity: 0;
  transform: scale(0.93);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.scale-in.visible { opacity: 1; transform: scale(1); }

/* ─── HERO: ANIMATED DOT GRID ─── */
#hero { position: relative; }
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,212,255,0.11) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0;
  animation: hero-dots-in 2.5s 0.6s ease forwards;
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; }
.hero-stats-bar { position: relative; z-index: 1; }
@keyframes hero-dots-in {
  to { opacity: 1; }
}

/* ─── HERO CARD: SHIMMER SWEEP ─── */
.hero-card { position: relative; overflow: hidden; }
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.06), transparent);
  transition: left 0.55s ease;
  pointer-events: none;
  z-index: 0;
}
.hero-card:hover::before { left: 160%; }

/* ─── HERO STATS BAR: PAGE-LOAD STAGGER ─── */
.hero-stat {
  opacity: 0;
  transform: translateY(10px);
  animation: hero-stat-in 0.5s var(--ease) forwards;
}
.hero-stat:nth-child(1) { animation-delay: 0.75s; }
.hero-stat:nth-child(2) { animation-delay: 0.90s; }
.hero-stat:nth-child(3) { animation-delay: 1.05s; }
.hero-stat:nth-child(4) { animation-delay: 1.20s; }
@keyframes hero-stat-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── TRUTH STRIP: STAGGERED SCROLL REVEAL ─── */
.truth-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.truth-item.visible { opacity: 1; transform: translateY(0); }
.truth-item:nth-child(1) { transition-delay: 0.00s; }
.truth-item:nth-child(2) { transition-delay: 0.10s; }
.truth-item:nth-child(3) { transition-delay: 0.20s; }
.truth-item:nth-child(4) { transition-delay: 0.30s; }

/* ─── TRUTH STRIP: ICON ─── */
.truth-icon {
  font-size: 18px;
  color: rgba(0,212,255,0.45);
  margin-bottom: 6px;
  display: block;
}

/* ─── NAV LINK: UNDERLINE DRAW ─── */
.nav-links li a:not(.nav-cta) {
  position: relative;
}
.nav-links li a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s var(--ease);
}
.nav-links li a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ─── PRINCIPLE: HOVER SLIDE ─── */
.principle {
  transition: padding-left 0.3s var(--ease);
  cursor: default;
}
.principle:hover { padding-left: 8px; }
.principle-n { transition: color 0.3s var(--ease); }
.principle:hover .principle-n { color: var(--accent); }

/* ─── ENGAGE LIST: VISIBLE CHECKMARKS ─── */
.engage-list li::before {
  content: '✓';
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}
.engage-card.dark-card .engage-list li::before { color: rgba(0,212,255,0.7); }

/* ─── ENGAGE CARD: LIFT ON HOVER ─── */
.engage-card {
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s var(--ease);
}
.engage-card:not(.dark-card):hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.09);
  border-color: var(--ink-20);
}

/* ─── SERVE TICKER: EDGE FADE ─── */
.serve-ticker::before,
.serve-ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.serve-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--slate) 0%, transparent 100%);
}
.serve-ticker::after {
  right: 0;
  background: linear-gradient(-90deg, var(--slate) 0%, transparent 100%);
}

/* ─── CAPACITY NUMBER: CYAN GLOW PULSE ─── */
@keyframes cyan-pulse {
  0%, 100% { text-shadow: 0 0 20px rgba(0,212,255,0.35), 0 0 40px rgba(0,212,255,0.10); }
  50%       { text-shadow: 0 0 55px rgba(0,212,255,0.65), 0 0 90px rgba(0,212,255,0.20); }
}
.capacity-n { animation: cyan-pulse 3.5s ease-in-out infinite; }

/* ─── FAQ TOGGLE ─── */
.faq-question h4 { transition: color 0.2s; }

/* ─── FOOTER SOCIAL: HOVER ─── */
.footer-social a {
  transition: color 0.2s, transform 0.2s !important;
}
.footer-social a:hover {
  color: var(--accent) !important;
  transform: translateY(-3px) !important;
}

/* ─── SERVE TYPE CARD: STAGGER ─── */
.serve-type-card {
  transition: border-color 0.25s, transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.serve-type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.07);
  border-color: rgba(0,212,255,0.25);
}

/* ─── SECTION ICON ACCENT ─── */
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(0,212,255,0.08);
  color: var(--accent);
  font-size: 20px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

/* ─── SVG ICON SYSTEM ─── */
.ph-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: -0.1em;
}

/* ─── CONTACT DETAILS: ICON ROW ─── */
.contact-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.contact-icon-row .ph-icon {
  font-size: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ─── PREFERS-REDUCED-MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  .fade-up, .fade-left, .fade-right, .scale-in {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .truth-item { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-dots, .hero-stat { animation: none !important; opacity: 1; }
  .capacity-n { animation: none !important; }
  .scroll-progress { transition: none !important; }
  .hero-card::before { display: none; }
  .serve-ticker-track { animation-play-state: paused; }
}
