/* ============================================================
   VIRADEV — shared design system
   Bold & technical / engineering-forward. Refined teal palette.
   ============================================================ */

:root {
  /* ---- Ink (dark) ---- */
  --ink:        #07141a;
  --ink-2:      #0b2129;
  --ink-3:      #103039;
  --ink-line:   rgba(120, 202, 222, 0.14);
  --ink-line-2: rgba(120, 202, 222, 0.07);

  /* ---- Paper (light) ---- */
  --paper:      #f2f5f4;
  --paper-2:    #ffffff;
  --paper-3:    #e7edeb;
  --line:       #d3ddda;
  --line-2:     #e3eae8;

  /* ---- Teal / cyan (brand — from real VIRADEV V-mark #37ACC9) ---- */
  --teal:       #157e99;   /* primary, readable cyan-teal on light */
  --teal-700:   #0f6075;
  --teal-800:   #0a4a5c;
  --teal-bright:#37acc9;   /* exact brand cyan — dark-bg accents / glow */
  --teal-glow:  #4dbfdb;
  --teal-soft:  #cfe6ec;
  --brand-gray: #a7b0b2;   /* cool gray of the V-mark */

  /* ---- Text ---- */
  --t-hi:       #07141a;   /* on paper */
  --t-mid:      #3c5159;
  --t-lo:       #6c8087;
  --t-onink-hi: #f4faf9;   /* on ink */
  --t-onink-mid:#a9c6ca;
  --t-onink-lo: #6f9197;

  /* ---- Type ---- */
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body:    "IBM Plex Sans", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, monospace;
  --f-word:    "Jost", "Space Grotesk", system-ui, sans-serif;

  /* ---- Layout ---- */
  --maxw: 1240px;
  --gut: 40px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--t-hi);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--teal-bright); color: var(--ink); }

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

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

/* ---------- Reusable bits ---------- */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--teal);
  display: inline-block;
}
.eyebrow.on-ink { color: var(--teal-bright); }
.eyebrow.on-ink::before { background: var(--teal-bright); }
.eyebrow.center::before { display: none; }

/* Buttons */
.btn {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }

.btn-bright { background: var(--teal-bright); color: var(--ink); }
.btn-bright:hover { background: #54e0d2; }

.btn-ghost { background: transparent; color: var(--t-hi); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-700); }

.btn-ghost-ink { background: transparent; color: var(--t-onink-hi); border-color: var(--ink-line); }
.btn-ghost-ink:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

/* Section scaffolding */
.section { padding: 120px 0; position: relative; }
.section-ink { background: var(--ink); color: var(--t-onink-hi); }
.section-tight { padding: 88px 0; }

.section-head { max-width: 760px; }
.section-head h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  margin-top: 22px;
}
.section-head p {
  color: var(--t-mid);
  font-size: 19px;
  margin-top: 22px;
  max-width: 620px;
}
.section-ink .section-head p { color: var(--t-onink-mid); }

/* Blueprint grid overlay (decorative, technical) */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--ink-line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-line-2) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
}

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-2);
}
.nav-ink {
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  border-bottom: 1px solid var(--ink-line);
}
.nav-inner {
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

/* Wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 12px; }
.wordmark .mark {
  height: 34px; width: auto; flex: none; display: block;
}
.wordmark .wm-text { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.wordmark .wm-name {
  font-family: var(--f-word);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: 0.14em;
  color: var(--t-hi);
  text-indent: 0.14em;
}
.wordmark .wm-sub {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--t-lo);
  text-indent: 0.34em;
}
.nav-ink .wordmark .wm-name { color: var(--t-onink-hi); }
.nav-ink .wordmark .wm-sub { color: var(--teal-bright); opacity: 0.85; }
.footer .wordmark .wm-name { color: var(--t-onink-hi); }
.footer .wordmark .wm-sub { color: var(--teal-bright); opacity: 0.85; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--f-mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--t-mid);
  padding: 9px 14px;
  border-radius: var(--radius);
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--teal-700); background: rgba(21,126,153,0.06); }
.nav-links a.active { color: var(--teal-700); }
/* Atlas product link */
.nav-links a.nav-product { display: inline-flex; align-items: center; gap: 7px; }
.nav-links a.nav-product .tag { font-family: var(--f-mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #5b9dff; border: 1px solid rgba(91,157,255,0.45); border-radius: 4px; padding: 2px 5px; line-height: 1; }
.nav-ink .nav-links a.nav-product:hover { color: #7db4ff; background: rgba(91,157,255,0.08); }
.nav-ink .nav-links a { color: var(--t-onink-mid); }
.nav-ink .nav-links a:hover { color: var(--teal-bright); background: rgba(55,172,201,0.08); }
.nav-ink .nav-links a.active { color: var(--teal-bright); }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-burger span {
  position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: var(--t-hi); transition: transform .25s ease, opacity .2s ease;
}
.nav-burger span:nth-child(1) { top: 15px; }
.nav-burger span:nth-child(2) { bottom: 15px; }
.nav-ink .nav-burger { border-color: var(--ink-line); }
.nav-ink .nav-burger span { background: var(--t-onink-hi); }
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { transform: translateY(-5px) rotate(-45deg); }

/* ============================================================
   PAGE HERO (subpage dark header)
   ============================================================ */
.page-hero { background: var(--ink); color: var(--t-onink-hi); position: relative; overflow: hidden; padding: 84px 0 76px; }
.page-hero .grid-bg { -webkit-mask-image: radial-gradient(ellipse 70% 90% at 30% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 90% at 30% 30%, #000 20%, transparent 75%); }
.page-hero-glow { position: absolute; width: 560px; height: 560px; right: -140px; top: -200px; background: radial-gradient(circle, rgba(55,172,201,0.16), transparent 65%); pointer-events: none; }
.page-hero-inner { position: relative; z-index: 2; max-width: 860px; }
.page-hero h1 { font-size: clamp(40px, 5.6vw, 76px); margin-top: 22px; color: var(--t-onink-hi); }
.page-hero .lead { font-size: clamp(18px, 2vw, 21px); color: var(--t-onink-mid); max-width: 620px; margin-top: 24px; line-height: 1.6; }
.crumb { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--t-onink-lo); text-transform: uppercase; }
.crumb a { color: var(--t-onink-lo); }
.crumb a:hover { color: var(--teal-bright); }

/* ============================================================
   SHARED END CTA BAND
   ============================================================ */
.endcta { background: var(--ink); color: var(--t-onink-hi); position: relative; overflow: hidden; padding: 104px 0; }
.endcta-glow { position: absolute; width: 620px; height: 620px; left: 50%; transform: translateX(-50%); bottom: -360px; background: radial-gradient(circle, rgba(21,126,153,0.30), transparent 65%); pointer-events: none; }
.endcta-inner { position: relative; z-index: 2; text-align: center; max-width: 720px; margin: 0 auto; }
.endcta h2 { font-size: clamp(34px, 4.6vw, 58px); }
.endcta p { color: var(--t-onink-mid); font-size: 19px; margin: 20px auto 0; max-width: 520px; }
.endcta-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--t-onink-mid);
  padding: 84px 0 38px;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  position: relative;
}
.footer h4 {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t-onink-lo);
  margin-bottom: 20px;
}
.footer .f-link { display: block; color: var(--t-onink-mid); padding: 7px 0; font-size: 15px; transition: color .18s; }
.footer .f-link:hover { color: var(--teal-bright); }
.footer .f-lead { color: var(--t-onink-mid); font-size: 15.5px; max-width: 300px; margin-top: 18px; line-height: 1.65; }
.footer-bottom {
  margin-top: 64px; padding-top: 26px;
  border-top: 1px solid var(--ink-line);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-family: var(--f-mono); font-size: 12.5px; color: var(--t-onink-lo); letter-spacing: 0.02em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  :root { --gut: 28px; }
  .section { padding: 88px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-burger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    padding: 14px var(--gut) 24px;
    gap: 2px;
    box-shadow: 0 24px 40px rgba(7,20,26,0.12);
  }
  .nav-ink .nav-links.open { background: var(--ink-2); }
  .nav-links.open a { font-size: 16px; padding: 13px 4px; }
  .section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}
