/* =========================================================
   Split-E — redesign 2026
   Dark, brand green→blue, technical/premium
   ========================================================= */

:root {
  /* Brand */
  --green:      #7dc242;
  --green-soft: #a6dd6b;
  --blue:       #27aae1;
  --blue-deep:  #1c75bc;

  /* Surfaces */
  --bg:         #0a0e15;
  --bg-2:       #0d1320;
  --surface:    #111927;
  --surface-2:  #18212f;
  --line:       rgba(255, 255, 255, 0.08);
  --line-soft:  rgba(255, 255, 255, 0.05);

  /* Text */
  --text:       #e8eef5;
  --muted:      #9aa8b8;
  --faint:      #6b7889;

  /* Accent gradient */
  --grad: linear-gradient(100deg, var(--green) 0%, var(--blue) 100%);
  --grad-soft: linear-gradient(100deg, rgba(125,194,66,0.16), rgba(39,170,225,0.16));

  /* Layout */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 999;
  background: var(--surface); color: var(--text);
  padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line);
}
.skip-link:focus { left: 16px; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.7em 1.25em; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s;
  white-space: nowrap;
}
.btn-lg { padding: 0.85em 1.6em; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary {
  background: var(--grad); color: #08121a;
  box-shadow: 0 6px 24px -8px rgba(39,170,225,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(39,170,225,0.7); }

.btn-ghost {
  background: rgba(255,255,255,0.04); color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.07); transform: translateY(-2px); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10,14,21,0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 46px; width: auto; display: block; background: #fff; padding: 8px 12px; border-radius: 12px; box-shadow: 0 4px 18px -8px rgba(0,0,0,0.6); }
.brand--footer { display: inline-flex; margin-bottom: 16px; }
.brand--footer .brand-logo { height: 58px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav-list { display: flex; gap: 28px; align-items: center; }
.nav-list a { color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color .2s; position: relative; }
.nav-list a:hover, .nav-list a.active { color: var(--text); }
.nav-list a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: var(--grad); border-radius: 2px;
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: 12px 24px 24px; border-bottom: 1px solid var(--line); background: rgba(10,14,21,0.96); backdrop-filter: blur(12px); }
.mobile-nav a { padding: 12px 4px; color: var(--muted); border-bottom: 1px solid var(--line-soft); font-weight: 500; }
.mobile-nav a.btn { margin-top: 12px; border-bottom: 0; color: #08121a; justify-content: center; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative; isolation: isolate;
  min-height: min(92vh, 860px);
  display: flex; align-items: center;
  padding: 120px 0 80px;
  /* fallback gradient if WebGL fails */
  background:
    radial-gradient(70% 90% at 78% 8%, rgba(39,170,225,0.18), transparent 60%),
    radial-gradient(60% 80% at 10% 100%, rgba(125,194,66,0.16), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }

/* per-section shader backgrounds */
.fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; pointer-events: none; }
.has-fx { position: relative; isolation: isolate; }
.has-fx::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(125% 90% at 50% 50%, rgba(8,11,17,0.50), rgba(8,11,17,0.74));
}
.has-fx > .container { position: relative; z-index: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 50% -10%, transparent 40%, rgba(10,14,21,0.55) 100%),
    linear-gradient(180deg, rgba(10,14,21,0.10) 0%, rgba(10,14,21,0.0) 30%, rgba(10,14,21,0.85) 100%);
}

.hero-inner { max-width: 880px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,0.03);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.04; letter-spacing: -0.02em;
  margin: 22px 0 0;
}
.hero-title .grad-text { margin-top: 0.1em; }
.hero-sub {
  margin-top: 26px; font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--muted); max-width: 680px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-chips {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 48px;
}
.hero-chips li {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255,255,255,0.02);
}

.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint);
}
.hero-scroll-line { width: 1px; height: 42px; background: linear-gradient(var(--faint), transparent); }

/* =========================================================
   Trust marquee
   ========================================================= */
.trust { padding: 40px 0 8px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.trust-head { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.trust-badge { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; color: var(--text); padding: 9px 18px; border: 1px solid rgba(39,170,225,0.4); border-radius: 999px; background: rgba(39,170,225,0.08); }
.trust-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 10px rgba(39,170,225,0.7); }
.trust-label { text-align: center; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 26px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); padding-bottom: 28px; }
.marquee-track { display: inline-flex; align-items: center; gap: 26px; white-space: nowrap; animation: marquee 38s linear infinite; will-change: transform; }
.marquee-track span { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: rgba(232,238,245,0.55); }
.marquee-track i { color: var(--blue); font-style: normal; opacity: 0.6; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .marquee { white-space: normal; } }

/* =========================================================
   Generic section
   ========================================================= */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.kicker {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; letter-spacing: -0.02em;
}
.section-lead { margin-top: 18px; color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; gap: 22px; }

/* ---------- Services cards ---------- */
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: transform .3s var(--ease), border-color .3s, background .3s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-4px); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.4rem;
  border-radius: 12px; background: var(--grad-soft); color: var(--green-soft);
  margin-bottom: 20px; border: 1px solid var(--line);
}
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Stats band ---------- */
.stats-band { background: var(--bg-2); border-block: 1px solid var(--line-soft); padding: 56px 0; }
.stats-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat-num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { display: block; margin-top: 10px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Work cards ---------- */
.work-grid { grid-template-columns: repeat(3, 1fr); }
.work-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  display: flex; flex-direction: column; gap: 14px;
}
.work-card:hover { transform: translateY(-4px); border-color: rgba(39,170,225,0.4); box-shadow: 0 20px 40px -24px rgba(39,170,225,0.5); }
.work-card--own { border-color: rgba(125,194,66,0.35); background: linear-gradient(180deg, rgba(125,194,66,0.06), transparent), var(--surface); }
.work-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.work-role { color: var(--green-soft); }
.work-year { color: var(--faint); }
.work-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; }
.work-card p { color: var(--muted); font-size: 0.96rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,0.02);
}

/* ---------- Capabilities ---------- */
.cap-grid { grid-template-columns: repeat(3, 1fr); }
.cap { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cap h4 { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.cap p { color: var(--text); font-size: 1rem; line-height: 1.7; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-copy p { color: var(--muted); margin-top: 18px; }
.about-copy strong { color: var(--text); }
.about-langs { font-size: 0.95rem; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 26px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.why-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  position: relative; overflow: hidden;
}
.why-card::after { content: ""; position: absolute; top: -40%; right: -20%; width: 60%; height: 80%; background: radial-gradient(circle, rgba(39,170,225,0.18), transparent 70%); pointer-events: none; }
.why-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; margin-bottom: 22px; }
.why-list li { color: var(--muted); padding: 14px 0; border-top: 1px solid var(--line-soft); font-size: 0.97rem; }
.why-list li:first-of-type { border-top: 0; padding-top: 0; }
.why-list strong { color: var(--text); }

/* ---------- Contact ---------- */
.section--contact { background: var(--bg-2); border-top: 1px solid var(--line-soft); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-points { margin-top: 34px; }
.contact-points li { display: flex; flex-direction: column; gap: 3px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.contact-points li:first-child { border-top: 0; }
.cp-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.contact-points a { color: var(--blue); transition: color .2s; }
.contact-points a:hover { color: var(--green-soft); }
.book-link { font-weight: 600; }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.86rem; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.field .opt { color: var(--faint); font-weight: 400; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 0.97rem; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(39,170,225,0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { margin-top: 16px; font-size: 0.85rem; color: var(--faint); }
.form-note a { color: var(--blue); }
.form-status { margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.form-status.ok { color: var(--green-soft); }
.form-status.err { color: #ff8a8a; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 64px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.footer-brand p { color: var(--muted); max-width: 320px; font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.footer-nav a { color: var(--muted); font-size: 0.95rem; transition: color .2s; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 26px; color: var(--faint); font-size: 0.85rem; }

/* =========================================================
   Reveal animation
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .cards-3, .work-grid, .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav.open { display: flex; }
  .header-inner { height: 64px; }
  .brand-logo { height: 36px; }
  .hero { padding: 96px 0 72px; min-height: auto; }
  .hero-scroll { display: none; }
  .cards-3, .work-grid, .cap-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 28px; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .container { padding-inline: 18px; }
}

/* =========================================================
   Frosted surfaces — let the section shaders show through
   while keeping text crisp and readable
   ========================================================= */
.card        { background: rgba(17,25,39,0.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.work-card   { background: rgba(17,25,39,0.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.work-card--own { background: linear-gradient(180deg, rgba(125,194,66,0.10), rgba(17,25,39,0.70)); }
.cap         { background: rgba(17,25,39,0.60); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.contact-form{ background: rgba(17,25,39,0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.why-card    { background: linear-gradient(180deg, rgba(24,33,47,0.74), rgba(17,25,39,0.74)); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
/* on hover keep cards solid for max legibility */
.card:hover  { background: var(--surface-2); }
