/* Tervanix Solutions — Design System CSS */

:root {
  --navy: #0f1e33;
  --navy-soft: #16283f;
  --offwhite: #f7f6f3;
  --white: #ffffff;
  --gold: #5c7cfa;
  --gold-dark: #33459e;
  --text: #3d4552;
  --text-muted: #6b7280;
  --border: #d8d3cb;
  --border-dark: #2a3c54;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --max-width: 1160px;
  --measure: 65ch;

  --radius: 6px;
  --radius-lg: 12px;
  --radius-card: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 51, 0.04);
  --shadow-md: 0 12px 28px -8px rgba(15, 30, 51, 0.16);
  --shadow-lg: 0 20px 45px -12px rgba(15, 30, 51, 0.22);
  --transition: 180ms ease;
  --transition-slow: 320ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--offwhite);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--navy);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 var(--space-2); }
.measure { max-width: var(--measure); }

a { color: inherit; }
img { max-width: 100%; display: block; }

.tabular { font-variant-numeric: tabular-nums; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

.mesh-bg {
  position: relative;
  isolation: isolate;
}
.mesh-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(52% 60% at 14% 8%, rgba(92, 124, 250, 0.20), transparent 65%),
    radial-gradient(46% 55% at 88% 0%, rgba(15, 30, 51, 0.14), transparent 60%),
    radial-gradient(60% 60% at 50% 100%, rgba(92, 124, 250, 0.10), transparent 70%),
    var(--offwhite);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: var(--space-1);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 243, 0.96);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition-slow), border-color var(--transition-slow), padding var(--transition-slow), background var(--transition-slow);
}
.site-header.scrolled {
  background: rgba(247, 246, 243, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  transition: padding var(--transition);
}
.site-header.scrolled .nav { padding-top: 0.7rem; padding-bottom: 0.7rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  white-space: nowrap;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--navy);
  color: var(--offwhite);
  border-radius: var(--radius);
  font-size: 1rem;
  flex-shrink: 0;
}
.brand-accent { color: var(--gold-dark); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
  white-space: nowrap;
  transition: color var(--transition);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--navy); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-links .nav-cta {
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  transition: background var(--transition), transform var(--transition-slow);
}
.nav-cta::after { display: none; }
.nav-cta:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .nav-cta:hover { background: var(--navy-soft); transform: translateY(-2px); }
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--navy);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition-slow), box-shadow var(--transition-slow);
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary { background: var(--gold); color: var(--white); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--gold-dark); border-color: var(--border); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(51, 69, 158, 0.45); }
  .btn-secondary:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
  .btn-light:hover { background: var(--offwhite); transform: translateY(-2px); }
  .btn-ghost:hover { border-color: var(--gold-dark); }
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}
.badge-pill .dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.hero-copy .badge-pill { margin-bottom: var(--space-3); }

.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
.industry-tile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-2);
  transition: border-color 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.industry-tile:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .industry-tile:hover { border-color: var(--gold-dark); transform: translateY(-3px); box-shadow: var(--shadow-md); }
}
.industry-tile .glyph {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: rgba(92, 124, 250, 0.14);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.industry-tile span { font-size: 0.9rem; font-weight: 600; color: var(--navy); }

@media (max-width: 960px) { .industry-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .industry-grid { grid-template-columns: 1fr; } }

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

.section { padding: var(--space-6) 0; }
.section-tight { padding: var(--space-5) 0; }
.section-dark { background: var(--navy); color: rgba(247, 246, 243, 0.88); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: var(--gold); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.section-head p { max-width: 32ch; color: var(--text-muted); margin: 0; }

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

.hero { padding: var(--space-6) 0 var(--space-5); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}
.hero-text { font-size: 1.1rem; color: var(--text-muted); max-width: 46ch; }
.hero h1 span { color: var(--gold-dark); }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.trust-row > div { flex: 1 1 120px; min-width: 0; }
.trust-row strong { display: block; color: var(--navy); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.trust-row small { color: var(--text-muted); font-size: 0.8rem; }

.hero-panel {
  background: var(--navy);
  color: var(--offwhite);
  border-radius: var(--radius-card);
  padding: var(--space-4);
  border: 1px solid var(--border-dark);
}
.hero-panel .mini-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--gold);
  margin-bottom: var(--space-2);
}
.hero-panel h3 { color: var(--white); margin-bottom: var(--space-3); }
.skill-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.7rem 0;
  border-top: 1px solid var(--border-dark);
  font-size: 0.92rem;
}
.skill-row span { min-width: 0; }
.skill-row:first-of-type { border-top: none; }
.skill-row b { color: var(--gold); font-weight: 700; }

.hero-visual { display: flex; flex-direction: column; gap: var(--space-3); }
.hero-media {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: var(--border);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media.is-wide { aspect-ratio: 16 / 10; }

.section-banner {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 21 / 6;
  margin-bottom: var(--space-4);
  background: var(--border);
}
.section-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .section-banner { aspect-ratio: 16 / 10; } }

/* ---------- Cards / Grids ---------- */

.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
  transition: border-color 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
}
.card .icon {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold-dark);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.94rem; margin-bottom: 0.75rem; }
.card .card-link { color: var(--gold-dark); font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.card .card-link:hover { text-decoration: underline; }

.card-dark {
  background: var(--navy-soft);
  border: 1px solid var(--border-dark);
  color: rgba(247, 246, 243, 0.85);
}
.card-dark h3 { color: var(--white); }

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

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}
.process-step {
  padding-top: var(--space-2);
  border-top: 2px solid var(--border);
  position: relative;
}
.process-step span {
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--gold-dark);
  margin-bottom: 0.4rem;
}
.process-step h3 { margin-bottom: 0.3rem; }
.process-step p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Placeholder tiles ---------- */

.placeholder-tile {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  padding: var(--space-3) var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
}
.placeholder-tile.stat {
  flex-direction: column;
  gap: 0.3rem;
  min-height: 120px;
}
.placeholder-tile.stat .stat-icon { font-size: 1.6rem; }

.leader-card {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-3);
  text-align: center;
}
.leader-avatar {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto var(--space-2);
  border-radius: 50%;
  background: rgba(92, 124, 250, 0.12);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.leader-avatar svg { width: 2.1rem; height: 2.1rem; }
.leader-card h3 { margin-bottom: 0.2rem; }
.leader-title { color: var(--text-muted); font-size: 0.88rem; margin: 0; }

/* ---------- Lists / tags ---------- */

.two-col-list {
  columns: 2;
  column-gap: var(--space-4);
  margin: 0;
  padding-left: 1.2rem;
  color: var(--white);
}
.two-col-list li { break-inside: avoid; padding: 0.35rem 0; }
@media (max-width: 640px) { .two-col-list { columns: 1; } }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  text-align: center;
}
.stat-card strong {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.2rem;
}
.stat-card small { color: var(--text-muted); font-size: 0.85rem; }

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-3);
}
.testimonial-card p { font-style: italic; color: var(--text); margin-bottom: var(--space-2); }
.testimonial-card .attribution { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }

.contact-info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}
.contact-info-card h3 {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.info-row { display: flex; gap: 0.9rem; align-items: flex-start; }
.info-row + .info-row { margin-top: var(--space-3); }
.info-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(92, 124, 250, 0.12);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.info-icon svg { width: 1.1rem; height: 1.1rem; }
.info-row strong {
  display: block;
  color: var(--navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.info-row p { margin: 0; color: var(--text); }

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

.cta-band { background: var(--navy); color: var(--white); padding: var(--space-5) 0; }
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.cta-inner h2 { color: var(--white); margin: 0; }
.cta-inner .eyebrow { color: var(--gold); }

/* ---------- Forms ---------- */

.form {
  display: grid;
  gap: var(--space-2);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-4);
}
.form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--offwhite);
  color: var(--text);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: -0.25rem; }
.form-message {
  font-size: 0.9rem;
  min-height: 1.2rem;
  color: var(--gold-dark);
  font-weight: 600;
}
.form-message.error { color: #a13e3e; }

/* ---------- Legal ---------- */

.legal-content { max-width: var(--measure); }
.legal-content h2 { margin-top: var(--space-4); }
.legal-content ol,
.legal-content ul { padding-left: 1.2rem; }
.legal-note {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dark);
  padding: var(--space-2) var(--space-3);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

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

.site-footer {
  background: var(--navy);
  color: rgba(247, 246, 243, 0.7);
  padding: var(--space-5) 0 var(--space-3);
  border-top: 2px solid var(--gold-dark);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-dark);
}
.site-footer .brand { color: var(--white); }
.footer-desc { font-size: 0.9rem; max-width: 32ch; margin-top: var(--space-2); }
.footer-col h4 {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { color: inherit; text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-3);
  font-size: 0.82rem;
}

/* ---------- Floating WhatsApp ---------- */

.whatsapp-float {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  background: #25d366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-slow);
}
.whatsapp-float:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) {
  .whatsapp-float:hover { transform: translateY(-3px) scale(1.05); }
}
@media (max-width: 640px) {
  .whatsapp-float { width: 50px; height: 50px; right: var(--space-2); bottom: var(--space-2); }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 450ms cubic-bezier(0.16, 1, 0.3, 1), transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

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

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--offwhite);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .nav-links.open { max-height: 320px; padding: var(--space-2) var(--space-3) var(--space-3); }
  .nav-links a { width: 100%; padding: 0.6rem 0; }
  .nav-links a::after { display: none; }
  .nav-cta { margin-top: 0.5rem; text-align: center; justify-content: center; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .section { padding: var(--space-5) 0; }
}
