/* Tenetic Refresh — Homepage */

:root {
  /* Brand */
  --brand-dark: #001A63;
  --brand: #143AA2;
  --brand-vibrant: #094BCC;
  --brand-mid: #2667D8;
  --brand-bright: #2072E5;
  --brand-light: #3388FF;
  --brand-soft: #95B9FF;
  --brand-pale: #BFD8FD;
  --brand-mist: #DCE8FF;
  --brand-deep: #0A205C;
  --accent: #5ACC9B;

  /* Neutrals */
  --bg: #FFFFFF;
  --bg-2: #F6F9FC;
  --n1: #FAFAFA;
  --n2: #EDEDED;
  --n3: #DDDDDD;
  --n4: #949494;
  --n5: #727272;
  --ink: #000000;
  --ink-2: #3D3D3D;

  /* Surfaces (theme-bound, see body[data-theme]) */
  --surface: #F2F6FB;      /* page ground — matches intro */
  --surface-2: #FFFFFF;    /* raised cards */
  --surface-3: #FFFFFF;
  --surface-alt: #EAF1FA;  /* alternating band */
  --border: #E1EAF5;
  --border-2: #D8E5F4;
  --text: #0A205C;
  --text-mid: #1F3C8C;
  --text-2: #3D3D3D;
  --text-3: #5A78A6;
  --on-brand: #ffffff;
  --grad: linear-gradient(135deg, #001A63 0%, #2667D8 49%, #2072E5 100%);
  --grad-soft: linear-gradient(135deg, #DCE8FF 0%, #EAF1FA 100%);

  /* Radii / shadow / motion */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(10,32,92,.04), 0 2px 6px rgba(10,32,92,.04);
  --shadow-2: 0 10px 30px rgba(10,32,92,.08), 0 2px 6px rgba(10,32,92,.04);
  --shadow-3: 0 30px 80px rgba(10,32,92,.18), 0 8px 20px rgba(10,32,92,.08);
  --ease: cubic-bezier(.22,.61,.36,1);

  /* Layout */
  --maxw: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --font: "Lato", system-ui, -apple-system, sans-serif;
  --font-display: "Work Sans", "Lato", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* Dark theme */
body[data-theme="dark"] {
  --surface: #050B1F;
  --surface-2: #0A1330;
  --surface-3: #0E1A40;
  --border: rgba(149,185,255,.14);
  --text: #EEF3FF;
  --text-2: #BDC8E0;
  --text-3: #8A98B8;
  --shadow-2: 0 10px 30px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.2);
  --shadow-3: 0 30px 80px rgba(0,0,0,.55), 0 8px 20px rgba(0,0,0,.3);
}

/* Gradient theme — light base with bigger color washes */
body[data-theme="gradient"] {
  --surface: #FFFFFF;
  --surface-2: #F1F6FF;
  --surface-3: #ffffff;
  --border: #DCE8FF;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Type scale */
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-vibrant);
}
body[data-theme="dark"] .eyebrow { color: var(--brand-soft); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 {
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.02;
  font-weight: 600;
}
h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.028em;
}
h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}
h5 {
  font-family: var(--font-display);
  font-weight: 600;
}
p { margin: 0; color: var(--text-2); }
.lede {
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
  max-width: 56ch;
}

/* UI controls all use the display family for richer weight range */
button, .btn, .nav-link, input, textarea, select { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-3); text-transform: uppercase; }

/* Layout containers */
.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translate(3px, 0); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 49%, var(--brand-bright) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(38,103,216,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(38,103,216,.45), inset 0 1px 0 rgba(255,255,255,.25); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
body[data-theme="dark"] .btn-ghost { border-color: rgba(149,185,255,.22); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-light {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.btn-light:hover { background: var(--brand-mist); }

/* Reveal on scroll — JS adds .reveal class then .in on intersection */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
/* Above-the-fold safety: when JS isn't ready (eg paused tab), still show */
.no-js .reveal { opacity: 1; transform: none; }

/* Tag / pill */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.tag .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(90,204,155,.18);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(90,204,155,.18); }
  50% { box-shadow: 0 0 0 8px rgba(90,204,155,0); }
}

/* Decorative bg */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--text) 5%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--text) 5%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}

/* Mono */
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text-3); text-transform: uppercase; }

/* ============ Shared homepage helpers (intro visual language) ============ */

/* Gradient text */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}

/* Eyebrow pill — small labelled chip above section headers */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 15px 6px 11px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--border-2);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
  box-shadow: 0 4px 14px rgba(38,103,216,.05);
}
.eyebrow-pill .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(90,204,155,.2);
  animation: pulse 2.4s var(--ease) infinite;
}

/* Section header cluster */
.sec-head { max-width: 720px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-head h2 { margin-top: 20px; }
.sec-head p.lede { margin-top: 20px; }
.sec-head.center p.lede { margin-left: auto; margin-right: auto; }

/* Gradient-bordered card (white interior, navy→blue frame) */
.gcard {
  position: relative;
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: var(--r-lg);
  background-image: linear-gradient(#fff, #fff), var(--grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 16px 50px rgba(38,103,216,.06);
}

/* Plain soft card */
.scard {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 30px rgba(10,32,92,.05);
}

/* Icon chip */
.chip {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 8px 20px rgba(38,103,216,.28);
  flex-shrink: 0;
}
.chip.soft {
  background: #DEEAF7;
  color: var(--brand-vibrant);
  box-shadow: none;
}

/* Text link with arrow */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14.5px;
  color: var(--brand-vibrant);
  transition: gap .2s var(--ease), color .2s var(--ease);
}
.tlink:hover { gap: 11px; color: var(--brand-dark); }

/* Wave motif (Tenetic bars) */
.wavemark {
  position: relative;
  display: inline-block;
  width: 26px; height: 20px;
  flex-shrink: 0;
}
.wavemark i {
  position: absolute; left: 0;
  height: 2.5px; border-radius: 2px;
  background: var(--grad);
}
.wavemark i:nth-child(1) { top: 0; width: 26px; }
.wavemark i:nth-child(2) { top: 6px; width: 20px; }
.wavemark i:nth-child(3) { top: 12px; width: 14px; }
.wavemark i:nth-child(4) { top: 18px; width: 8px; }

a { color: var(--brand-vibrant); }
a:hover { color: var(--brand-dark); }
