/* ============================================================
   Bavi Technologies — thebavi.com
   ============================================================ */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-950: #0c1526;
  --navy-900: #101d36;
  --navy-800: #16294e;
  --navy-700: #1d3763;
  --blue-600: #2e5fa3;
  --blue-500: #3a70ba;
  --blue-400: #5b8ccc;
  --blue-100: #dce7f5;
  --blue-50:  #eef3fa;

  /* semantic tokens (light theme) */
  --bg:       #ffffff;
  --bg-soft:  #f6f9fd;
  --surface:  #ffffff;
  --ink:      #22304a;
  --ink-soft: #51617d;
  --heading:  #16294e;
  --line:     #dfe6f0;
  --accent-ink: #2e5fa3;
  --chip-ink: #1d3763;
  --link-active: #2e5fa3;
  --btn-primary-hover: #16294e;
  --header-bg: rgba(255, 255, 255, 0.88);
  --input-focus-bg: #ffffff;
  --mark-shadow: rgba(16, 41, 78, 0.18);
  --shadow-sm: 0 1px 2px rgba(16, 29, 54, 0.06), 0 2px 8px rgba(16, 29, 54, 0.06);
  --shadow-md: 0 6px 24px rgba(16, 29, 54, 0.10);

  --radius:   14px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* night mode — explicit choice via the header toggle */
[data-theme="dark"] {
  --bg:       #0d1626;
  --bg-soft:  #101b2e;
  --surface:  #16233b;
  --ink:      #dfe7f3;
  --ink-soft: #9fb0c9;
  --heading:  #eef3fa;
  --line:     #263650;
  --accent-ink: #7fa8dd;
  --chip-ink: #b9cdea;
  --link-active: #7fa8dd;
  --btn-primary-hover: #3f77c2;
  --header-bg: rgba(13, 22, 38, 0.86);
  --input-focus-bg: #1c2c49;
  --mark-shadow: rgba(0, 0, 0, 0.5);
  --blue-100: #2c4166;
  --blue-50:  #1a2a45;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.35);
}

/* night mode — following the system preference (no explicit choice made) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:       #0d1626;
    --bg-soft:  #101b2e;
    --surface:  #16233b;
    --ink:      #dfe7f3;
    --ink-soft: #9fb0c9;
    --heading:  #eef3fa;
    --line:     #263650;
    --accent-ink: #7fa8dd;
    --chip-ink: #b9cdea;
    --link-active: #7fa8dd;
    --btn-primary-hover: #3f77c2;
    --header-bg: rgba(13, 22, 38, 0.86);
    --input-focus-bg: #1c2c49;
    --mark-shadow: rgba(0, 0, 0, 0.5);
    --blue-100: #2c4166;
    --blue-50:  #1a2a45;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.35);
  }
}

/* theme-dependent artwork: light-only shown by default, dark-only in night mode */
.dark-only { display: none; }
[data-theme="dark"] .light-only { display: none; }
[data-theme="dark"] .dark-only { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .light-only { display: none; }
  :root:not([data-theme="light"]) .dark-only { display: block; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--blue-100); color: var(--heading); }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--heading); }

:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: min(1140px, 100% - 3rem);
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
}
.btn-primary:hover {
  background: var(--btn-primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--heading);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

.btn-light {
  background: #fff;
  color: var(--navy-800);
}
.btn-light:hover {
  background: #dce7f5;
  color: var(--navy-800);
  transform: translateY(-1px);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(16, 29, 54, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 42px; width: auto; }

.header-controls { display: flex; align-items: center; gap: 0.6rem; }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }

.main-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.2s ease, background-color 0.2s ease;
}
.main-nav a:hover { color: var(--heading); background: var(--blue-50); }
.main-nav a.active { color: var(--link-active); }
.main-nav .btn { margin-left: 0.75rem; }
.main-nav a.btn-primary { color: #fff; }
.main-nav a.btn-primary:hover { background: var(--btn-primary-hover); color: #fff; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--heading);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.theme-toggle svg { width: 19px; height: 19px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--heading);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.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); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 172px 0 96px;
  background:
    radial-gradient(52rem 30rem at 85% -10%, rgba(46, 95, 163, 0.14), transparent 60%),
    radial-gradient(40rem 26rem at -10% 110%, rgba(46, 95, 163, 0.08), transparent 60%),
    var(--bg-soft);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(46, 95, 163, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(115deg, transparent 42%, rgba(0, 0, 0, 0.9));
  -webkit-mask-image: linear-gradient(115deg, transparent 42%, rgba(0, 0, 0, 0.9));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 3rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1.2rem;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--heading);
}
.hero h1 .accent { color: var(--accent-ink); }

.hero-sub {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-mark {
  justify-self: center;
  width: min(340px, 80%);
  filter: drop-shadow(0 24px 40px var(--mark-shadow));
}

.hero-points {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 4.5rem;
}
.hero-point {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.hero-point svg { flex: none; width: 22px; height: 22px; margin-top: 0.2rem; color: var(--accent-ink); }
.hero-point strong { display: block; color: var(--heading); font-weight: 700; }
.hero-point span { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section.alt { background: var(--bg-soft); }

.section-head { max-width: 44rem; margin-bottom: 3rem; }
.section-head h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--heading);
}
.section-head p { margin: 0; font-size: 1.05rem; color: var(--ink-soft); }

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.service-card {
  padding: 1.9rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-100);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-800), var(--blue-600));
  color: #fff;
}
.service-icon svg { width: 26px; height: 26px; }

.service-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--heading);
}
.service-card p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 1.9rem 1.7rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.process-step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--blue-400);
}
.process-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
}
.process-step p { margin: 0; font-size: 0.93rem; color: var(--ink-soft); }

.process-note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin-top: 2.2rem;
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--navy-800), var(--navy-700));
  color: #dbe6f6;
}
.process-note svg { flex: none; width: 22px; height: 22px; margin-top: 0.15rem; color: var(--blue-400); }
.process-note strong { color: #fff; }
.process-note p { margin: 0; font-size: 0.95rem; }

/* ---------- Technology ---------- */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.tech-col {
  padding: 1.7rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.tech-col h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.tech-col h3 svg { width: 18px; height: 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--blue-100);
  background: var(--blue-50);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--chip-ink);
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 3.5rem;
  align-items: start;
}

.about-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--heading);
}
.about-copy p { color: var(--ink-soft); margin: 0 0 1.1rem; }

.about-values { margin: 1.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.9rem; }
.about-values li { display: flex; gap: 0.75rem; align-items: flex-start; }
.about-values svg { flex: none; width: 21px; height: 21px; margin-top: 0.2rem; color: var(--accent-ink); }
.about-values strong { color: var(--heading); }
.about-values span { color: var(--ink-soft); font-size: 0.96rem; }

.fact-card {
  padding: 2rem 1.8rem;
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy-800), var(--navy-950));
  color: #c8d6ec;
  box-shadow: var(--shadow-md);
}
.fact-card img {
  width: 88px;
  padding: 14px;
  margin-bottom: 1.4rem;
  background: #fff;
  border-radius: 18px;
  box-sizing: border-box;
}
.fact-card dl { margin: 0; display: grid; gap: 1.1rem; }
.fact-card dt {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue-400);
}
.fact-card dd { margin: 0.15rem 0 0; font-size: 1rem; color: #fff; font-weight: 600; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: start;
}

.contact-info { display: grid; gap: 1rem; }

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.contact-item svg { flex: none; width: 22px; height: 22px; margin-top: 0.2rem; color: var(--accent-ink); }
.contact-item strong { display: block; color: var(--heading); }
.contact-item a { font-weight: 600; }
.contact-item span { color: var(--ink-soft); font-size: 0.95rem; }

.contact-form {
  padding: 2rem 1.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--heading);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg-soft);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-soft); opacity: 0.75; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  background: var(--input-focus-bg);
}
.field textarea { resize: vertical; min-height: 130px; }

.form-hint { margin: 0.9rem 0 0; font-size: 0.83rem; color: var(--ink-soft); }

/* ---------- CTA band ---------- */

.cta-band {
  background:
    radial-gradient(40rem 20rem at 90% 120%, rgba(91, 140, 204, 0.25), transparent 65%),
    linear-gradient(120deg, var(--navy-900), var(--navy-800));
  color: #fff;
}
.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.cta-band h2 { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.01em; }
.cta-band p { margin: 0; color: #b9c9e2; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: #8fa2c0;
  padding: 3.5rem 0 2rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(143, 162, 192, 0.18);
}

.footer-brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #fff;
}
.footer-brand-sub {
  margin-top: 0.1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--blue-400);
}
.footer-tagline { margin-top: 1rem; max-width: 20rem; }

.footer-col h3 {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c3d0e5;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.footer-col a { color: #8fa2c0; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.6rem;
  font-size: 0.85rem;
}

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service-card { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none !important; }
  .hero-points, .services-grid, .process-grid { grid-template-columns: 1fr 1fr; }
  .tech-grid { grid-template-columns: 1fr 1fr; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .hero { padding: 140px 0 72px; }
  .hero-points, .services-grid, .process-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem 1.5rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); visibility: visible; }
  .main-nav a { padding: 0.8rem 0.9rem; font-size: 1rem; }
  .main-nav .btn { margin: 0.6rem 0 0; }
}

@media (max-width: 480px) {
  .tech-grid { grid-template-columns: 1fr; }
  .brand img { height: 36px; }
  .header-controls { gap: 0.25rem; }
}
