
/* ─── RESET ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── TOKENS ─────────────────────────────── */
:root {
  /* Brand */
  --navy:      #081065;
  --navy-deep: #050b4a;
  --navy-mid:  #0d1878;
  --red:       #DD3333;
  --red-dim:   rgba(221,51,51,.12);
  --red-glow:  rgba(221,51,51,.22);
  --blue:      #66A9BF;
  --blue-dim:  rgba(102,169,191,.10);
  --blue-glow: rgba(102,169,191,.20);

  /* Surface */
  --bg:        #050a2e;
  --bg-2:      #07103d;
  --bg-3:      #0a1550;
  --surface:   rgba(255,255,255,.04);
  --border:    rgba(255,255,255,.07);
  --border-hi: rgba(102,169,191,.22);

  /* Text */
  --text:      #eef0f8;
  --text-dim:  #8a9bbf;
  --text-mute: #4a5580;

  /* Type */
  --display: 'Bricolage Grotesque', sans-serif;
  --body:    'Bricolage Grotesque', sans-serif;
  --mono:    'DM Mono', monospace;
  --serif:   'Lora', serif;

  --radius: 14px;
  --radius-sm: 8px;
}

/* ─── BASE ─────────────────────────────── */
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}


/* ─── HERO ─────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px clamp(1.5rem, 8vw, 8rem) 100px;
  position: relative; overflow: hidden;
}

/* Grid lines background */
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(102,169,191,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102,169,191,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
/* Glow blobs */
.hero-glow-r {
  position: absolute; top: -5%; right: -5%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(221,51,51,.14) 0%, transparent 70%);
  pointer-events: none;
}
.hero-glow-b {
  position: absolute; bottom: 10%; left: 5%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(102,169,191,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 860px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .3rem .9rem .3rem .55rem; border-radius: 999px;
  border: 1px solid var(--border-hi); background: rgba(102,169,191,.07);
  font-family: var(--mono); font-size: .72rem; color: var(--blue);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 2rem;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  animation: pulse 2s ease infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(.7)} }

h1.hero-title {
  font-family: var(--display); font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 1.5rem;
}
h1.hero-title .accent { color: var(--red); }
h1.hero-title .accent-b { color: var(--blue); }

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 300;
  color: var(--text-dim); max-width: 620px; line-height: 1.75; margin-bottom: 2.8rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 4rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 2rem; border-radius: var(--radius-sm);
  background: var(--red); color: #fff;
  font-family: var(--body); font-size: .95rem; font-weight: 600; text-decoration: none;
  transition: all .2s; box-shadow: 0 4px 24px var(--red-glow);
}
.btn-primary:hover { background: #c42b2b; transform: translateY(-2px); box-shadow: 0 8px 32px var(--red-glow); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .9rem 2rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-hi); color: var(--blue);
  font-size: .95rem; text-decoration: none; transition: all .2s;
}
.btn-ghost:hover { background: var(--blue-dim); border-color: var(--blue); color: var(--text); }

/* Hero stat pills */
.hero-stats {
  display: flex; gap: 2.5rem; flex-wrap: wrap;
  padding-top: 2.5rem; border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-num {
  font-family: var(--display); font-size: 1.9rem; font-weight: 800;
  color: var(--text); letter-spacing: -.03em; line-height: 1;
}
.stat-num span { color: var(--red); }
.stat-label { font-size: .78rem; color: var(--text-mute); letter-spacing: .05em; text-transform: uppercase; font-family: var(--mono); }

/* ─── SECTION COMMON ─────────────────────────────── */
section { padding: 100px clamp(1.5rem, 8vw, 8rem); }
.container { max-width: 1200px; margin: 0 auto; }

.eyebrow {
  font-family: var(--mono); font-size: .7rem; color: var(--blue);
  letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: .8rem;
}
h2.section-title {
  font-family: var(--display); font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin-bottom: 1.1rem;
}
.section-lead {
  font-size: 1.05rem; color: var(--text-dim); line-height: 1.75; max-width: 580px;
  font-weight: 300;
}

/* ─── PILLARS ─────────────────────────────── */
.pillars-section {
  background: var(--bg-2);
  padding-left: clamp(1.25rem, 4vw, 4rem);
  padding-right: clamp(1.25rem, 4vw, 4rem);
}
.pillars-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5px; background: var(--border);
  border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden;
  margin-top: 3.5rem;
}
.pillar-card {
  min-width: 0;
  background: var(--bg-2); padding: clamp(1.6rem, 2vw, 2.25rem) clamp(1.1rem, 1.8vw, 2rem);
  position: relative; overflow: hidden; transition: background .25s;
}
.pillar-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0; transition: opacity .3s;
}
.pillar-card:hover { background: var(--bg-3); }
.pillar-card:hover::before { opacity: 1; }
.pillar-num {
  font-family: var(--mono); font-size: .7rem; color: var(--red);
  letter-spacing: .08em; margin-bottom: 1.25rem; display: block;
}
.pillar-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--red-dim); border: 1px solid rgba(221,51,51,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1.25rem;
}
.pillar-card h3 {
  font-family: var(--display); font-size: 1.1rem; font-weight: 700;
  margin-bottom: .5rem; letter-spacing: -.01em;
}
.pillar-card > p {
  font-size: .875rem; color: var(--text-dim); line-height: 1.65; margin-bottom: 1.25rem;
}
.pillar-services { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.pillar-services li {
  font-size: .825rem; color: var(--text-dim);
  display: flex; align-items: flex-start; gap: .5rem; line-height: 1.5;
}
.pillar-services li::before { content: '→'; color: var(--red); flex-shrink: 0; font-family: var(--mono); font-size: .8rem; margin-top: .1em; }

/* ─── PROBLEM / SOLUTION ─────────────────────────────── */
.rescues-section { background: var(--bg); }
.rescues-header { max-width: 600px; margin-bottom: 3.5rem; }
.rescues-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.rescue-card {
  padding: 2rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  position: relative; overflow: hidden; transition: border-color .2s, transform .2s;
}
.rescue-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.rescue-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--navy-mid), var(--blue));
  opacity: 0; transition: opacity .3s;
}
.rescue-card:hover::after { opacity: 1; }
.rescue-tag {
  display: inline-block; font-family: var(--mono); font-size: .68rem;
  padding: .2rem .6rem; border-radius: 4px; margin-bottom: 1.1rem;
  background: var(--red-dim); color: var(--red); border: 1px solid rgba(221,51,51,.2);
  letter-spacing: .05em; text-transform: uppercase;
}
.rescue-card h3 {
  font-family: var(--display); font-size: 1rem; font-weight: 700;
  margin-bottom: .6rem; letter-spacing: -.01em;
}
.rescue-problem {
  font-size: .85rem; color: var(--text-mute); line-height: 1.6;
  margin-bottom: 1rem; font-style: italic;
  padding-left: .8rem; border-left: 2px solid var(--red);
}
.rescue-solution { font-size: .875rem; color: var(--text-dim); line-height: 1.65; }

/* ─── AI DEEP-DIVE ─────────────────────────────── */
.ai-section {
  background: var(--navy-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.ai-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 70% 50%, rgba(221,51,51,.07) 0%, transparent 70%);
  pointer-events: none;
}
.ai-inner {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: 5rem; align-items: center;
}
.ai-content { position: relative; z-index: 1; }
.ai-content .eyebrow { color: var(--red); }
.ai-content h2 { margin-bottom: 1rem; }
.ai-content > p { color: var(--text-dim); line-height: 1.75; margin-bottom: 2rem; font-weight: 300; }

.ai-capabilities { display: flex; flex-direction: column; gap: 1rem; }
.ai-cap {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.1rem 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
  transition: border-color .2s, background .2s;
}
.ai-cap:hover { border-color: var(--border-hi); background: rgba(102,169,191,.05); }
.ai-cap-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px;
  background: var(--blue-dim); border: 1px solid var(--border-hi);
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.ai-cap-text h4 { font-size: .875rem; font-weight: 600; margin-bottom: .25rem; }
.ai-cap-text p { font-size: .825rem; color: var(--text-dim); line-height: 1.55; }

/* Terminal / code block aesthetic */
.ai-terminal {
  position: relative; z-index: 1;
  background: #020818; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.terminal-bar {
  display: flex; align-items: center; gap: .4rem;
  padding: .7rem 1rem; background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-r { background: #ff5f57; } .t-y { background: #febc2e; } .t-g { background: #28c840; }
.terminal-label { font-family: var(--mono); font-size: .7rem; color: var(--text-mute); margin-left: auto; }
.terminal-body { padding: 1.5rem; font-family: var(--mono); font-size: .8rem; line-height: 2; }
.t-comment { color: #4a5580; }
.t-key { color: var(--blue); }
.t-val { color: #a8d8a8; }
.t-fn { color: #c3a6ff; }
.t-str { color: var(--blue); }
.t-red { color: var(--red); }
.t-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--red); vertical-align: middle; margin-left: 2px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── TECH STACK ─────────────────────────────── */
.stack-section { background: var(--bg-2); }
.stack-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1.5rem; margin-top: 3.5rem; }
.stack-cat {
  padding: 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.stack-cat-label {
  font-family: var(--mono); font-size: .68rem; color: var(--red);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; display: block;
}
.stack-items { display: flex; flex-wrap: wrap; gap: .4rem; }
.stack-item {
  font-size: .78rem; color: var(--text-dim);
  padding: .25rem .65rem; border-radius: 4px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  transition: border-color .15s, color .15s;
}
.stack-item:hover { border-color: var(--border-hi); color: var(--blue); }

/* ─── WHY SAVADUB ─────────────────────────────── */
.why-section { background: var(--navy); }
.why-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: center;
}
.why-content {}
.why-content p.lead {
  font-size: 1.05rem; color: var(--text-dim); line-height: 1.75;
  font-weight: 300; margin-bottom: 2rem; margin-top: 1rem;
}
.why-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.5;
  color: var(--text); padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--red); margin-top: 2rem;
}
.why-quote em { color: var(--blue); font-style: normal; }
.why-pillars { display: flex; flex-direction: column; gap: 1.25rem; }
.why-pillar {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
  transition: border-color .2s;
}
.why-pillar:hover { border-color: var(--border-hi); }
.why-pillar-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 9px; background: var(--red-dim);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.why-pillar h4 { font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.why-pillar p { font-size: .825rem; color: var(--text-dim); line-height: 1.55; }

/* ─── CTA FINAL ─────────────────────────────── */
.cta-section {
  background: var(--navy-deep);
  text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 50% 0%, rgba(221,51,51,.1), transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 100%, rgba(102,169,191,.06), transparent 60%);
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.cta-section h2 {
  font-family: var(--display); font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800; letter-spacing: -.03em; margin-bottom: 1rem; line-height: 1.08;
}
.cta-section p { font-size: 1.05rem; color: var(--text-dim); line-height: 1.7; margin-bottom: 2.5rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3.5rem; }

/* Contact form */
.cta-form {
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 2.5rem; text-align: left;
  max-width: 640px; margin: 0 auto;
}
.form-alert {
  display: none;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: .875rem;
  line-height: 1.5;
}
.form-alert.is-visible { display: block; }
.form-alert--success {
  color: #bff3d1;
  background: rgba(38, 166, 91, .14);
  border: 1px solid rgba(38, 166, 91, .34);
}
.form-alert--error {
  color: #ffd0d0;
  background: rgba(221, 51, 51, .12);
  border: 1px solid rgba(221, 51, 51, .3);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .78rem; font-weight: 500; color: var(--text-dim); letter-spacing: .03em; font-family: var(--mono); }
.field input, .field select, .field textarea {
  padding: .75rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(255,255,255,.04);
  font-family: var(--body); font-size: .9rem; color: var(--text);
  transition: border-color .2s; outline: none;
  -webkit-appearance: none; appearance: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field input.is-invalid, .field select.is-invalid, .field textarea.is-invalid { border-color: var(--red); }
.field select { cursor: pointer; }
.field select option { background: #0a1550; color: var(--text); }
.field textarea { resize: vertical; min-height: 100px; }
.field-error {
  min-height: 1rem;
  color: #ffb5b5;
  font-size: .75rem;
  line-height: 1.35;
}
.form-submit {
  width: 100%; padding: .95rem; border-radius: var(--radius-sm);
  background: var(--red); color: #fff; border: none;
  font-family: var(--body); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all .2s; letter-spacing: -.01em;
  box-shadow: 0 4px 24px var(--red-glow);
}
.form-submit:hover { background: #c42b2b; transform: translateY(-2px); box-shadow: 0 8px 32px var(--red-glow); }


/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rescues-grid { grid-template-columns: 1fr; }
  .ai-inner { grid-template-columns: 1fr; }
  .why-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

/* ─── ANIMATIONS ─────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow { animation: fadeUp .5s ease both; }
h1.hero-title  { animation: fadeUp .55s .08s ease both; }
.hero-sub      { animation: fadeUp .55s .16s ease both; }
.hero-actions  { animation: fadeUp .55s .24s ease both; }
.hero-stats    { animation: fadeUp .55s .34s ease both; }
