/* ============================================
   DCODR — Core Stylesheet
   Concept: "Blueprint / Electric" — engineered blues
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Playfair+Display:ital@1&display=swap');

:root {
  /* ── Light theme (default) ── */
  --abyss:    #f0f4ff;
  --deep:     #e2eaf8;
  --navy:     #d0ddf5;
  --cobalt:   #1d4ed8;
  --electric: #1d4ed8;
  --ice:      #1e3a8a;
  --paper:    #0c1220;
  --muted:    #4a5a80;
  --line:     rgba(0, 30, 100, 0.12);
  --bg-nav:   rgba(255, 255, 255, 0.96);

  --display: 'Space Grotesk', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --ease: cubic-bezier(0.65, 0.05, 0, 1);
  --gut: 20px;
}

[data-theme="dark"] {
  --abyss:    #050912;
  --deep:     #0a1428;
  --navy:     #0e2148;
  --cobalt:   #1d4ed8;
  --electric: #38bdf8;
  --ice:      #bae6fd;
  --paper:    #eaf2ff;
  --muted:    #6b86b8;
  --line:     rgba(56, 189, 248, 0.14);
  --bg-nav:   rgba(5, 9, 18, 0.94);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; }

body {
  background: var(--abyss);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* blueprint grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 90%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

::selection { background: var(--electric); color: var(--abyss); }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--electric);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--electric);
}

h1, h2, h3 { font-weight: 500; line-height: 1.02; letter-spacing: -0.02em; }

.display-xl {
  font-size: clamp(3rem, 11vw, 11rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}
.display-lg { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 500; }
.display-md { font-size: clamp(1.8rem, 3.5vw, 3rem); }

.lead { font-size: clamp(1.05rem, 1.5vw, 1.35rem); color: var(--ice); max-width: 56ch; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; }
section { position: relative; z-index: 2; }
.section-pad { padding: clamp(80px, 12vh, 180px) 20px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gut);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.08), 0 1px 0 var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Group theme toggle + hamburger so they stay side-by-side on mobile */
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Homepage only: white logo + white icons over dark hero */
#mainNav:not(.scrolled) .brand-logo        { filter: brightness(0) invert(1); transition: filter 0.4s; }
#mainNav:not(.scrolled) .nav-toggle span   { background: #fff; }
#mainNav:not(.scrolled) .theme-toggle svg  { stroke: #fff; }

/* When white header appears on homepage: normal logo + dark icons */
#mainNav.scrolled .brand-logo { filter: none; transition: filter 0.4s; }
.nav .brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  display: flex;
  align-items: center;
}
.nav .brand b { color: var(--electric); }
.brand-logo { height: 36px; width: auto; display: block; }
.footer-logo { height: 32px; width: auto; display: block; margin-bottom: 16px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--electric);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--paper); transition: 0.3s; }

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  transition: border-color 0.3s, color 0.3s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--electric); color: var(--electric); }
.theme-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 30px;
  border: 1px solid var(--electric);
  border-radius: 100px;
  color: var(--paper);
  position: relative;
  overflow: hidden;
  transition: color 0.5s var(--ease);
  isolation: isolate;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--electric);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}
.btn:hover { color: var(--abyss); }
.btn:hover::before { transform: translateY(0); }
.btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--electric); transition: background 0.5s; }
.btn:hover .dot { background: var(--abyss); }

/* ---------- Pricing ---------- */
.pricing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  gap: 40px;
  flex-wrap: wrap;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pricing-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--deep);
  position: relative;
  transition: border-color 0.3s var(--ease);
}
.pricing-card:hover { border-color: var(--electric); }
.pricing-featured {
  border-color: var(--electric);
  background: var(--navy);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--electric);
  color: var(--abyss);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 100px;
  white-space: nowrap;
}
.pricing-tier {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--electric);
}
.pricing-price {
  font-size: clamp(2.8rem, 4vw, 3.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--paper);
}
.pricing-currency {
  font-size: 0.5em;
  font-weight: 400;
  vertical-align: top;
  margin-top: 0.3em;
  display: inline-block;
  color: var(--muted);
}
.pricing-plus {
  font-size: 0.55em;
  color: var(--muted);
}
.pricing-per {
  font-size: 0.38em;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.pricing-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.pricing-list li {
  font-size: 0.95rem;
  color: var(--paper);
  padding-left: 20px;
  position: relative;
}
.pricing-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--electric);
  font-size: 0.85rem;
}

/* ---------- Pricing note ---------- */
.pricing-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 36px;
  margin-bottom: 48px;
  padding: 20px 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--deep);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}
.pricing-note a { color: var(--electric); text-decoration: underline; text-underline-offset: 3px; }
.pricing-note-icon { color: var(--electric); font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

/* ---------- Flexible banner ---------- */
.flex-banner {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding: 40px 48px;
  border: 1px solid var(--electric);
  border-radius: 16px;
  background: var(--navy);
}
.flex-banner-icon { font-size: 2rem; color: var(--electric); flex-shrink: 0; line-height: 1; margin-top: 4px; }
.flex-banner-title { font-size: clamp(1.3rem, 2.5vw, 2rem); font-weight: 500; margin-bottom: 14px; }
.flex-banner-text { color: var(--muted); font-size: 1rem; line-height: 1.7; max-width: 72ch; }
.flex-banner-text a { color: var(--electric); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Bespoke block ---------- */
.bespoke-block {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  padding: 60px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--deep);
}
.bespoke-list { display: flex; flex-direction: column; gap: 0; }
.bespoke-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.bespoke-item:first-child { border-top: 1px solid var(--line); }
.bespoke-num { font-family: var(--mono); font-size: 0.72rem; color: var(--electric); min-width: 28px; }

/* ---------- Testimonials ---------- */
.testi-head { margin-bottom: 60px; }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testi-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  background: var(--deep);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.3s var(--ease);
}
.testi-card:hover { border-color: var(--electric); }
.testi-quote {
  font-size: 3rem;
  color: var(--electric);
  line-height: 0.8;
  font-family: Georgia, serif;
}
.testi-text {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--paper);
  flex: 1;
}
.testi-author {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.testi-name { font-weight: 500; font-size: 0.95rem; }
.testi-role { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { padding: clamp(60px,9vh,120px) 20px 40px; border-top: 1px solid var(--line); }
.footer-cta { display: flex; flex-direction: column; gap: 30px; margin-bottom: 80px; }
.footer-cta h2 { font-size: clamp(2.5rem, 8vw, 7rem); font-weight: 500; }
.footer-cta a { color: var(--electric); transition: opacity 0.3s; }
.footer-cta a:hover { opacity: 0.6; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px; padding-top: 50px; border-top: 1px solid var(--line);
}
.footer-grid h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; font-weight: 500; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a:hover { color: var(--electric); }
.footer-bottom { margin-top: 60px; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.08em; }

/* ---------- Reveal utility ---------- */
.reveal-line { overflow: hidden; display: block; }
.reveal-line > * { display: block; }
[data-fade] { opacity: 0; }

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--electric);
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--electric);
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: width .3s, height .3s, background .3s, border-color .3s;
}
.cursor-ring.grow { width: 70px; height: 70px; background: rgba(56,189,248,0.08); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; border-block: 1px solid var(--line); padding: clamp(20px,3vw,36px) 0; }
.marquee-track { display: inline-flex; gap: clamp(40px,5vw,90px); will-change: transform; }
.marquee-track span { font-family: var(--mono); font-size: clamp(2.4rem,5.5vw,6.5rem); letter-spacing: -0.02em; color: var(--paper); display: inline-flex; align-items: center; gap: clamp(40px,5vw,90px); }
.marquee-track span::after { content: '✳'; color: var(--electric); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--abyss);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
}
.loader-count { font-family: var(--mono); font-size: clamp(4rem,14vw,11rem); font-weight: 600; color: var(--paper); }
.loader-count b { color: var(--electric); }
.loader-icon-wrap {
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.loader-bar { width: min(340px, 70vw); height: 1px; background: var(--line); position: relative; overflow: hidden; }
.loader-bar i { position: absolute; inset: 0; background: var(--electric); transform-origin: left; transform: scaleX(0); }

/* (blob styles removed — hero uses new dissolve system) */

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  body::before { background-size: 50px 50px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cursor, .cursor-ring { display: none; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .pricing-head { flex-direction: column; align-items: flex-start; }
  .testi-grid { grid-template-columns: 1fr; }
  .flex-banner { flex-direction: column; padding: 30px; }
  .bespoke-block { grid-template-columns: 1fr; padding: 36px; }
  /* Marquee breathing room below the hero on mobile */
  .marquee { margin-top: 32px; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .pricing-card { padding: 32px 24px; }
  .testi-card { padding: 28px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-fade] { opacity: 1 !important; }
}
