/* ==========================================================================
   Balancia Tech — Design System & Shared Styles
   Palette, logo construction and type rules sourced directly from the
   Balancia brand & identity sheet (v1.0).
   ========================================================================== */

:root {
  /* Brand palette */
  --blue: #1E40AF;        /* Deep blue — primary. Symbol, buttons, links on light. */
  --blue-dark: #1B3480;   /* Hover/active state for deep blue. */
  --green: #10B981;       /* Emerald — growth. Lower symbol form, success, positive figures. */
  --sky: #38BDF8;         /* Sky — accent for DARK surfaces & interface states only. */
  --ink: #0F172A;         /* Slate — wordmark on light, body copy, dark surfaces. */
  --muted: #64748B;
  --faint: #94A3B8;
  --line: #E2E8F0;
  --line-soft: #EDF2F7;
  --page: #F8FAFC;
  --card: #FFFFFF;
  --dark: #0F172A;
  --dark-2: #0B1220;

  /* Semantic tokens (kept stable across components) */
  --bg: var(--page);
  --surface: var(--card);
  --surface-2: #F1F5F9;
  --surface-3: #E2E8F0;
  --border: var(--line);
  --border-soft: var(--line-soft);
  --primary-500: var(--blue);
  --primary-400: var(--blue);
  --primary-600: var(--blue-dark);
  --accent-cyan: var(--green);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-faint: var(--faint);
  --white: #ffffff;
  --success: var(--green);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-1: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-2: 0 16px 40px -20px rgba(15,23,42,0.18);
  --shadow-glow: 0 0 0 1px rgba(30,64,175,0.15), 0 16px 40px -18px rgba(30,64,175,0.28);

  --max-width: 1180px;
  --nav-height: 76px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

h1, h2, h3 { font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.35; }
p { color: var(--text-muted); }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; }

.section {
  padding: 96px 0;
  position: relative;
}
.section-header {
  max-width: 680px;
  margin-bottom: 56px;
}
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header.center .eyebrow { justify-content: center; }
.section-header.center .lede { margin-left: auto; margin-right: auto; }

.section--alt { background: var(--surface-2); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 10px 24px -10px rgba(30,64,175,0.5); }
.btn-ghost {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--blue); background: rgba(30,64,175,0.05); color: var(--blue); }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(248,250,252,0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand { display: flex; align-items: center; }
.brand-logo-full { height: 32px; width: auto; }
.brand-logo-icon { display: none; height: 28px; width: 28px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(15,23,42,0.05); }
.nav-links a.active { color: var(--blue); background: rgba(30,64,175,0.08); font-weight: 650; }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-height) 0 0 0;
  background: var(--page);
  z-index: 99;
  padding: 24px 28px;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 16px 4px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: 24px; }

/* ---- Hero ---- */
.hero {
  padding: 88px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 22px; }
.hero .lede { margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-size: 1.9rem;
  font-weight: 750;
  color: var(--blue);
}
.hero-stat .label { font-size: 0.85rem; color: var(--text-faint); margin-top: 2px; }

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-2);
  position: relative;
}
.hero-panel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.hero-panel-row:last-child { border-bottom: none; }
.hero-panel-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(30,64,175,0.08);
  border: 1px solid rgba(30,64,175,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}
.hero-panel-title { font-weight: 650; color: var(--text); font-size: 0.96rem; }
.hero-panel-sub { font-size: 0.83rem; color: var(--text-faint); }

/* ---- Cards / Grids ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(30,64,175,0.3); box-shadow: var(--shadow-2); }
.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(30,64,175,0.08);
  border: 1px solid rgba(30,64,175,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin-bottom: 20px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.94rem; margin: 0; }
.card ul { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.card ul li {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.card ul li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(16,185,129,0.1);
  color: #0B815A;
  border: 1px solid rgba(16,185,129,0.3);
}
.badge-dev {
  background: rgba(30,64,175,0.08);
  color: var(--blue);
  border: 1px solid rgba(30,64,175,0.25);
}
.badge-soon {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ---- Logos / marquee strip ---- */
.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.strip-item {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- Team ---- */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  gap: 28px;
  box-shadow: var(--shadow-1);
}
.team-avatar {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 20px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.team-name { color: var(--ink); font-size: 1.3rem; margin-bottom: 2px; }
.team-role { color: var(--blue); font-weight: 600; font-size: 0.92rem; margin-bottom: 14px; }
.team-bio { font-size: 0.94rem; }
.team-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.team-tag {
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ---- Org chart ---- */
.org-chart { display: flex; flex-direction: column; align-items: center; gap: 0; }
.org-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 26px;
  text-align: center;
  min-width: 220px;
  box-shadow: var(--shadow-1);
}
.org-node.top { border-color: rgba(30,64,175,0.35); background: rgba(30,64,175,0.04); box-shadow: var(--shadow-glow); }
.org-node .name { color: var(--ink); font-weight: 700; font-size: 1.02rem; }
.org-node .role { color: var(--blue); font-size: 0.82rem; font-weight: 600; margin-top: 3px; }
.org-connector { width: 2px; height: 34px; background: var(--border); }
.org-row { display: flex; gap: 60px; margin-top: 0; }
.org-branch { display: flex; flex-direction: column; align-items: center; }

/* ---- Timeline / process ---- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.timeline-step {
  position: relative;
  padding-top: 46px;
}
.timeline-step .step-num {
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 750;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
.timeline-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.timeline-step p { font-size: 0.88rem; }

/* ---- CTA band ---- */
.cta-band {
  background: rgba(30,64,175,0.05);
  border: 1px solid rgba(30,64,175,0.15);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { max-width: 560px; margin: 0 auto 28px; }
.cta-band .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- Footer (dark surface — one of the brand sheet's approved dark backgrounds) ---- */
.footer {
  --surface: transparent;
  --border: rgba(255,255,255,0.12);
  --border-soft: rgba(255,255,255,0.12);
  --text: #FFFFFF;
  --text-muted: #94A3B8;
  --text-faint: #64748B;
  --white: #FFFFFF;
  --primary-400: var(--sky);
  --blue: var(--sky);
  background: var(--dark);
  padding: 64px 0 32px;
  margin-top: 40px;
}
.footer-logo { height: 28px; width: auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 0.9rem; margin-top: 14px; max-width: 280px; }
.footer h4 { color: #FFFFFF; font-size: 0.85rem; font-weight: 650; margin-bottom: 16px; letter-spacing: 0.02em; }
.footer ul { display: flex; flex-direction: column; gap: 11px; }
.footer a { font-size: 0.9rem; color: var(--text-muted); transition: color 0.15s ease; }
.footer a:hover { color: var(--sky); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 14px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--text-faint); margin: 0; }
.social-row { display: flex; gap: 10px; }
.social-row a {
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.social-row a:hover { color: var(--sky); border-color: var(--sky); }

/* ---- Page hero (inner pages) ---- */
.page-hero {
  padding: 64px 0 56px;
  text-align: center;
}
.page-hero .eyebrow { justify-content: center; }
.page-hero .lede { margin: 18px auto 0; }

/* ---- Contact / forms ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-1);
}
.contact-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.contact-row:last-child { border-bottom: none; }
.contact-row .icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(30,64,175,0.08);
  border: 1px solid rgba(30,64,175,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.contact-row .label { font-size: 0.78rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-row .value { color: var(--text); font-weight: 600; font-size: 0.96rem; margin-top: 2px; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--text-faint); margin-top: 14px; }
.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #0B815A;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.form-success.show { display: flex; }

.map-note {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .brand-logo-full { height: 26px; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .org-row { gap: 24px; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .team-card { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .cta-band { padding: 36px 24px; }
  .org-row { flex-direction: column; align-items: center; gap: 34px; }
  .page-hero { padding: 48px 0 40px; }
  .hero { padding: 56px 0 48px; }
}

@media (max-width: 480px) {
  .brand-logo-full { display: none; }
  .brand-logo-icon { display: block; }
}
