/* Vitality Flows Co. — shared styles
   Brand: Deep Navy #141a3c · Vital Green #219d51 · White #fff
   Typography: Manrope (body) · JetBrains Mono (mono/technical) */

:root {
  --navy: #141a3c;
  --navy-2: #3a446d;
  --navy-3: #464f73;
  --green: #219d51;
  --green-soft: #4daa8a;
  --green-tint: #e8f5ee;
  --white: #ffffff;
  --bg: #fafaf8;
  --warm: #d9d3c5;
  --warm-tint: #f3efe7;
  --gray: #595959;
  --gray-2: #6e6e6e;
  --line: #e6e6e2;
  --charcoal: #262626;
  --tan: #bf986d;

  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);

  --r-sm: 4px;
  --r: 8px;
  --r-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20,26,60,.05), 0 1px 3px rgba(20,26,60,.04);
  --shadow:    0 4px 14px rgba(20,26,60,.06), 0 2px 4px rgba(20,26,60,.04);
  --shadow-lg: 0 24px 60px rgba(20,26,60,.10);

  --t: 240ms cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Prevent stray horizontal scroll on mobile ──
   Safety net: nothing should ever push the page wider than the screen.
   `clip` (not `hidden`) keeps position:sticky header working. */
html, body { overflow-x: clip; max-width: 100%; }
/* Root cause: grid/flex items default to min-width:auto, so large text
   (e.g. .stat .num like "−140°C") refuses to shrink and overflows on
   narrow phones. Letting these text items shrink fixes it at the source. */
.hero-meta .stat,
.science-stats .stat,
.stat,
.section-head > div,
.footer-grid > div,
.showcase-row > *,
.app-row > * { min-width: 0; }
body {
  font-family: 'Manrope', 'Helvetica Neue', system-ui, -apple-system, Arial, sans-serif;
  font-feature-settings: "ss01", "ss02";
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  font-size: 16px;
}

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

/* type scale */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0; color: var(--navy); }
h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 600; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -0.025em; }
h3 { font-size: clamp(20px, 2vw, 26px); }
h4 { font-size: 17px; letter-spacing: -0.01em; }

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

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow.muted { color: var(--gray); }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy);
}
.kicker::before {
  content: ""; width: 22px; height: 1px; background: var(--green);
}

.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--navy-3); line-height: 1.55; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 12px; letter-spacing: 0;
}

/* layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-tight { padding: clamp(48px, 6vw, 88px) 0; }

.row { display: flex; gap: 24px; align-items: center; }
.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px; letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease, color .22s ease,
              transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .22s ease;
  white-space: nowrap;
}
.btn:not(.btn-link):hover  { transform: translateY(-2px); }
.btn:not(.btn-link):active { transform: translateY(0) scale(.97); transition-duration: .1s; }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover  { background: var(--navy); box-shadow: 0 8px 24px rgba(20,26,60,.22); }
.btn-primary:active { box-shadow: none; }

.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover  { background: var(--green); box-shadow: 0 8px 24px rgba(33,157,81,.30); }
.btn-dark:active { box-shadow: none; }

.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover  { border-color: var(--navy); background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(20,26,60,.14); }
.btn-ghost:active { box-shadow: none; }

.btn-link { color: var(--navy); padding: 10px 0; font-weight: 600; gap: 8px; }
.btn-link::after { content: "→"; display: inline-block; transition: transform .22s ease; }
.btn-link:hover { color: var(--green); }
.btn-link:hover::after { transform: translateX(6px); }

/* arrow icon */
.arr { width: 14px; height: 14px; display: inline-block; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 36px; width: auto; }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--navy);
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px; background: var(--green); transition: var(--t);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--green); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--navy);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  transition: var(--t);
  display: inline-flex; align-items: center; gap: 6px;
}
.lang-toggle::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--green), var(--navy), var(--green));
  opacity: .6;
}
.lang-toggle:hover { border-color: var(--navy); background: var(--navy); color: #fff; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .lang-toggle,
  .nav-cta .btn-primary { display: none; }
}

/* ── Hamburger button ── */
.nav-hamburger { display: none; }
@media (max-width: 900px) {
  .nav-hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; flex-shrink: 0;
    border-radius: 8px; border: 1px solid var(--line);
    background: transparent; cursor: pointer;
    transition: var(--t);
  }
  .nav-hamburger:hover { border-color: var(--navy); background: var(--navy); }
  .nav-hamburger:hover .hb-bar { background: #fff; }
  .nav-hamburger.open { border-color: var(--navy); background: var(--navy); }
  .nav-hamburger.open .hb-bar { background: #fff; }
  .nav-hamburger.open .hb-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-hamburger.open .hb-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-hamburger.open .hb-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}
.hb-bars { display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.hb-bar { display: block; width: 18px; height: 1.5px; background: var(--navy); transition: var(--t); }

/* ── Nav drawer ── */
.nav-drawer {
  position: fixed; top: 76px; left: 0; right: 0; z-index: 48;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(20,26,60,.12);
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 220ms cubic-bezier(.2,.7,.2,1), transform 220ms cubic-bezier(.2,.7,.2,1);
}
.nav-drawer.open { opacity: 1; transform: none; pointer-events: auto; }

.nav-drawer-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 36px 0 40px; gap: 48px;
}
.nav-drawer-links { display: flex; flex-wrap: wrap; gap: 6px 48px; }
.nav-drawer-links a {
  font-size: clamp(22px, 2.6vw, 32px); font-weight: 600;
  color: var(--navy); letter-spacing: -0.025em;
  padding: 6px 0; transition: var(--t);
}
.nav-drawer-links a:hover,
.nav-drawer-links a.active { color: var(--green); }

.nav-drawer-actions {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0; flex-wrap: wrap;
}

@media (max-width: 900px) {
  .nav-drawer-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .nav-drawer-actions { border-top: 1px solid var(--line); padding-top: 24px; width: 100%; }
}

/* ── Backdrop ── */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 47;
  background: rgba(20,26,60,.38);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* footer */
.site-footer {
  background: var(--navy);
  color: #cbd0e0;
  padding: 80px 0 32px;
}
.site-footer h4 {
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer a { color: #cbd0e0; transition: var(--t); display: block; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: var(--green); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; font-size: 13px; color: #8a90a8;
}
.footer-logo {
  height: 40px; width: auto;
  margin-bottom: 18px;
  opacity: 0;
  transition: opacity .2s ease;
}
.footer-tag { font-size: 14px; color: #cbd0e0; max-width: 320px; line-height: 1.6; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* common cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px;
  transition: var(--t);
}
.card:hover { border-color: var(--navy-2); box-shadow: var(--shadow); }

/* hero placeholder image */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(20,26,60,.04) 14px 15px),
    var(--warm-tint);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
}
.placeholder.dark {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.04) 14px 15px),
    #1d2347;
  color: rgba(255,255,255,.6);
  border-color: rgba(255,255,255,.08);
}
.placeholder.green {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(20,26,60,.05) 14px 15px),
    var(--green-tint);
  color: var(--navy-3);
  border-color: rgba(33,157,81,.2);
}

/* tag pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--green-tint); color: var(--green);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.pill.navy { background: rgba(20,26,60,.06); color: var(--navy); }
.pill.warm { background: var(--warm-tint); color: var(--tan); }

/* numbers / stats */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .num { font-size: clamp(36px, 4vw, 56px); font-weight: 600; letter-spacing: -0.03em; color: var(--navy); line-height: 1; }
.stat .lab { font-size: 13px; color: var(--gray); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; }

/* section header */
.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 56px;
  align-items: end;
}
.section-head h2 { max-width: 16ch; }
.section-head .right { color: var(--gray); font-size: 16px; line-height: 1.6; max-width: 44ch; }
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
}

/* divider */
.divider { height: 1px; background: var(--line); margin: 0; border: 0; }

/* breadcrumb */
.crumbs { font-size: 13px; color: var(--gray); display: flex; gap: 8px; align-items: center; }
.crumbs a:hover { color: var(--green); }
.crumbs .sep { opacity: .5; }

/* simple icon glyph */
.glyph {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-tint); color: var(--green);
  font-size: 18px; font-weight: 600;
}
.glyph.dark { background: rgba(20,26,60,.06); color: var(--navy); }

/* utility */
.muted { color: var(--gray); }
.center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; } .mb-6 { margin-bottom: 48px; }
.flex { display: flex; gap: 16px; } .wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.al-center { align-items: center; }

/* ── Mobile container padding ── */
@media (max-width: 900px) {
  .container { padding: 0 clamp(16px, 4vw, 24px); }
}

/* ── Footer mobile collapse ── */
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { font-size: 12px; }
}

/* ── Improved card hover transitions ── */
.pcard { transition: border-color 240ms, transform 240ms, box-shadow 240ms; }

/* ── Better focus states for accessibility ── */
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ── Mobile typography scale ── */
@media (max-width: 480px) {
  h1 { font-size: clamp(32px, 9vw, 52px); }
  h2 { font-size: clamp(24px, 7vw, 36px); }
}

/* keyframe */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.reveal { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) both; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }
.reveal.d4 { animation-delay: .32s; }

/* ── CTA button columns: flush to outer edge on desktop ── */
/* EN: flex-end = visual right. AR: overridden in rtl.css with flex-end = visual left */
/* !important needed to win over per-page <style> blocks which load after this file */
@media (min-width: 901px) {
  .cta-panel .right,
  .about-cta-actions,
  .industries-cta-actions,
  .cta-box-actions {
    align-items: flex-end !important;
  }
}
