/* tesatad.com — institutional senior-care data company
   Type: Schibsted Grotesk (display) · IBM Plex Sans (body) · IBM Plex Mono (labels)
   Ground: deep navy + clinical white · Accent: clinical cyan */

:root {
  --ink:        #0A111C;  /* deep navy base */
  --ink-2:      #0D1623;  /* raised dark panel */
  --ink-3:      #111E2E;  /* dark card */
  --ink-line:   rgba(233, 240, 247, 0.11);
  --ink-line-2: rgba(233, 240, 247, 0.06);

  --paper:      #F4F7F9;  /* clinical white section */
  --paper-2:    #FFFFFF;
  --paper-line: rgba(10, 17, 28, 0.11);
  --paper-line-2: rgba(10, 17, 28, 0.06);

  --on-dark:        #E9EFF4;
  --on-dark-mute:   #93A4B6;
  --on-dark-faint:  #5E7084;

  --on-light:       #0A111C;
  --on-light-mute:  #51606F;
  --on-light-faint: #8190A0;

  --accent:       #2E9DC4;   /* clinical cyan */
  --accent-deep:  #2487AB;
  --accent-soft:  rgba(46, 157, 196, 0.13);

  --maxw: 1180px;
  --gutter: clamp(22px, 5vw, 64px);

  --f-display: "Schibsted Grotesk", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--f-body);
  background: var(--ink);
  color: var(--on-dark);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section {
  scroll-margin-top: 84px;
  position: relative;
}

.section-pad {
  padding-block: clamp(88px, 12vw, 168px);
}

.band-dark  { background: var(--ink);   color: var(--on-dark); }
.band-paper { background: var(--paper);  color: var(--on-light); }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--accent);
  margin: 0 0 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

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

.h-hero {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.h-section {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  letter-spacing: -0.028em;
  line-height: 1.02;
  max-width: 16ch;
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  line-height: 1.62;
  color: var(--on-dark-mute);
  max-width: 56ch;
  font-weight: 350;
}
.band-paper .lead { color: var(--on-light-mute); }

.body-copy p {
  font-size: 1.08rem;
  line-height: 1.68;
  max-width: 60ch;
  color: var(--on-dark-mute);
  font-weight: 350;
}
.band-paper .body-copy p { color: var(--on-light-mute); }
.body-copy p + p { margin-top: 1.5em; }

.kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
}
.band-paper .kicker { color: var(--on-light-faint); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 17, 28, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-line-2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--on-dark);
  text-decoration: none;
}
.brand-icon {
  height: 26px;
  width: auto;
  display: block;
}
.footer-brand .brand-icon { height: 30px; }
.brand .mark {
  width: 13px; height: 13px;
  position: relative;
}
.brand .mark::before,
.brand .mark::after {
  content: "";
  position: absolute;
  border-radius: 1px;
}
.brand .mark::before {
  inset: 0;
  border: 1.5px solid var(--accent);
  opacity: 0.55;
}
.brand .mark::after {
  inset: 4px;
  background: var(--accent);
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 40px);
}
.nav a {
  font-size: 14px;
  color: var(--on-dark-mute);
  text-decoration: none;
  transition: color 0.18s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--on-dark); }
.nav .nav-cta {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--on-dark);
  border: 1px solid var(--ink-line);
  padding: 9px 16px;
  border-radius: 2px;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.nav .nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
@media (max-width: 720px) {
  .nav .nav-link, .nav .nav-item, .nav .nav-cta { display: none; }
}

/* ── hamburger button ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--on-dark);
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1),
              opacity  0.2s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-hamburger { display: flex; }
}

/* ── mobile slide-down nav ── */
.mobile-nav {
  display: none;
}
@media (max-width: 720px) {
  .mobile-nav {
    display: block;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.36s cubic-bezier(0.22,1,0.36,1);
    border-top: 0px solid var(--ink-line-2);
  }
  .mobile-nav.open {
    max-height: 480px;
    border-top-width: 1px;
  }
}
.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  padding-block: 6px 22px; /* leave .wrap's padding-inline intact */
}
.mobile-link {
  font-size: 15px;
  color: var(--on-dark-mute);
  text-decoration: none;
  padding: 13px 0;
  border-bottom: 1px solid var(--ink-line-2);
  transition: color 0.18s;
}
.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--on-dark); }
.mobile-sub {
  font-size: 13px;
  padding-left: 14px;
  color: var(--on-dark-faint);
}
.mobile-link.mobile-cta {
  margin-top: 4px;
  border-bottom: none;
  color: var(--accent);
  font-weight: 500;
}

/* products dropdown */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding-top: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.dropdown-panel {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: 5px;
  padding: 8px;
  min-width: 176px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}
.dd-link {
  display: flex;
  align-items: center;
  padding: 11px 13px;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.dd-link:hover { background: var(--ink-3); }
.dd-name {
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--on-dark);
}
.dd-setting {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 2px;
  transition: all 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #04121a;
  font-weight: 500;
}
.btn-primary:hover { background: #43add0; transform: translateY(-1px); }
.btn-ghost {
  color: var(--on-dark);
  border-color: var(--ink-line);
}
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.band-paper .btn-ghost { color: var(--on-light); border-color: var(--paper-line); }
.band-paper .btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn .arr { transition: transform 0.18s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(70px, 11vw, 130px);
  padding-bottom: clamp(80px, 12vw, 150px);
}
.hero {
  min-height: calc(100vh - 68px);   /* fallback */
  min-height: calc(100svh - 68px);  /* stable: ignores collapsing browser chrome */
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(120% 90% at 78% 26%, #000 0%, #000 42%, transparent 78%);
          mask-image: radial-gradient(120% 90% at 78% 26%, #000 0%, #000 42%, transparent 78%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.hero-headline { max-width: 18ch; }
.hero .lead { margin-top: 30px; }
.hero .btn-row { margin-top: 40px; }
.hero-meta {
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 34px 56px;
  padding-top: 30px;
  border-top: 1px solid var(--ink-line-2);
}
.hero-meta .item .n {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--on-dark);
}
.hero-meta .item .l {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  margin-top: 4px;
}

/* ---------- problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: start;
}
.fragment-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fragment {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--ink-line-2);
  background: var(--ink-2);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--on-dark-mute);
}
.fragment .tag {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--on-dark-faint);
  text-transform: uppercase;
  flex-shrink: 0;
  width: 96px;
}
.fragment .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--on-dark-faint);
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* ---------- thesis / data layer diagram ---------- */
.thesis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(48px, 7vw, 88px);
}
.diagram { margin-top: 40px; }
.dg-core { display: flex; justify-content: center; }
.core-node {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 24px;
  border-radius: 2px;
}
.dg-stem {
  width: 1px; height: 34px;
  background: var(--paper-line);
  margin: 0 auto;
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.5s ease 0.1s;
}
.dg-rail {
  position: relative;
  height: 34px;
}
.dg-rail .rail-h {
  position: absolute;
  top: 0; left: 16.666%; right: 16.666%;
  height: 1px;
  background: var(--paper-line);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.7s cubic-bezier(0.4,0,0.1,1) 0.45s;
}
.dg-rail .drop {
  position: absolute;
  top: 0;
  width: 1px; height: 34px;
  background: var(--paper-line);
  transform: translateX(-0.5px) scaleY(0); transform-origin: top;
  transition: transform 0.5s ease;
}
.diagram.in-view .dg-stem { transform: scaleY(1); }
.diagram.in-view .dg-rail .rail-h { transform: scaleX(1); }
.diagram.in-view .dg-rail .drop { transform: translateX(-0.5px) scaleY(1); }
.diagram.in-view .dg-rail .drop.d1 { transition-delay: 0.95s; }
.diagram.in-view .dg-rail .drop.d2 { transition-delay: 1.05s; }
.diagram.in-view .dg-rail .drop.d3 { transition-delay: 1.15s; }
.dg-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 40px);
}
.branch { text-align: center; }
.branch .b-setting {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-light-faint);
}
.branch .b-name {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 7px;
  color: var(--on-light);
}
.branch .b-note {
  font-size: 0.9rem;
  color: var(--on-light-mute);
  margin-top: 9px;
  line-height: 1.5;
  font-weight: 350;
}
@media (max-width: 680px) {
  .dg-branches { grid-template-columns: 1fr; gap: 18px; }
  .dg-rail .rail-h { left: 50%; right: 50%; }
  .dg-rail .drop { display: none; }
  .branch { padding-top: 14px; }
}

/* ---------- products ---------- */
.products-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.spine {
  position: relative;
  margin: 18px 0 0;
  display: flex;
  justify-content: center;
}
.spine .spine-bar {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-line) 18%, var(--ink-line) 82%, transparent);
}
.spine .spine-label {
  position: relative;
  z-index: 1;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--ink);
  border: 1px solid var(--accent);
  padding: 9px 20px;
  border-radius: 2px;
  white-space: nowrap;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 22px);
  margin-top: 48px;
}
.product-card {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
/* drop connector from spine into each card */
.product-card::before {
  content: "";
  position: absolute;
  top: -48px;
  left: 50%;
  width: 1px;
  height: 48px;
  background: var(--ink-line);
  transform: translateX(-0.5px) scaleY(0);
  transform-origin: top;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.1, 1);
}
.products-branch.in-view .product-card::before {
  transform: translateX(-0.5px) scaleY(1);
}
.products-branch.in-view .product-card:nth-child(2)::before { transition-delay: 0.08s; }
.products-branch.in-view .product-card:nth-child(3)::before { transition-delay: 0.16s; }
.product-card:hover {
  border-color: var(--accent);
  background: var(--ink-3);
  transform: translateY(-3px);
}
.product-card .p-eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.product-card .p-name {
  font-family: var(--f-display);
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-top: 16px;
  color: var(--on-dark);
}
.product-card .p-name .os { color: var(--on-dark); }
.product-card .p-headline {
  font-size: 1.02rem;
  font-weight: 450;
  color: var(--on-dark);
  margin-top: 14px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.product-card .p-body {
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--on-dark-mute);
  margin-top: 12px;
  font-weight: 350;
}
.product-card .p-cta {
  margin-top: auto;
  padding-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--on-dark);
  text-decoration: none;
  transition: color 0.18s ease, gap 0.18s ease;
}
.product-card .p-cta:hover { color: var(--accent); gap: 12px; }
.product-card .p-cta .arr { color: var(--accent); }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 0; }
  .product-card::before { display: none; }
  .spine .spine-bar { display: none; }
}

/* ---------- moat ---------- */
.moat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: center;
}
.compound-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.compound-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.compound-row .lab {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-light-faint);
  width: 70px;
  flex-shrink: 0;
}
.compound-row .track {
  flex: 1;
  height: 8px;
  background: var(--paper-line-2);
  border-radius: 1px;
  overflow: hidden;
}
.compound-row .fill {
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 1s cubic-bezier(0.3, 0, 0.1, 1);
}
@media (max-width: 860px) {
  .moat-grid { grid-template-columns: 1fr; }
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: start;
}
.geo-row {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.geo-row .geo {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-mute);
  display: flex;
  align-items: center;
  gap: 9px;
}
.geo-row .geo::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: start;
}
.contact-direct {
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--on-light-mute);
  margin-top: 26px;
  line-height: 2.1;
}
.contact-direct a { color: var(--accent-deep); text-decoration: none; }
.contact-direct a:hover { text-decoration: underline; }

.contact-channels {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-email {
  font-family: var(--f-mono);
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--accent-deep);
  text-decoration: none;
  transition: color 0.18s;
}
.contact-email:hover { color: var(--accent); text-decoration: underline; }
.contact-wa {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: 14px;
  color: var(--on-light-mute);
  text-decoration: none;
  transition: color 0.18s;
}
.contact-wa:hover { color: #25D366; }
.wa-icon { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }

/* socials */
.socials { display: flex; gap: 12px; }
.social-btn {
  width: 46px; height: 46px;
  border: 1px solid var(--paper-line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--on-light-mute);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.social-btn svg { width: 19px; height: 19px; fill: currentColor; }

.form {
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-light-faint);
}
.field input,
.field textarea {
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--on-light);
  background: var(--paper-2);
  border: 1px solid var(--paper-line);
  border-radius: 2px;
  padding: 13px 14px;
  width: 100%;
  transition: border-color 0.18s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-2 { grid-template-columns: 1fr; } }
.form .btn-primary { justify-self: start; border: none; }
.form-note {
  font-size: 12.5px;
  color: var(--on-light-faint);
  font-family: var(--f-mono);
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer {
  background: #070C14;
  color: var(--on-dark-mute);
  border-top: 1px solid var(--ink-line-2);
  padding-block: 60px 48px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--ink-line-2);
}
.footer-brand .brand { font-size: 1.35rem; }
.footer-brand p {
  font-size: 14px;
  color: var(--on-dark-faint);
  max-width: 34ch;
  margin: 18px 0 0;
  line-height: 1.6;
}
.footer-cols {
  display: flex;
  gap: clamp(40px, 8vw, 96px);
  flex-wrap: wrap;
}
.footer-col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  font-weight: 500;
  margin: 0 0 16px;
}
.footer-col a, .footer-col span {
  display: block;
  font-size: 14px;
  color: var(--on-dark-mute);
  text-decoration: none;
  margin-bottom: 11px;
  transition: color 0.18s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 28px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--on-dark-faint);
  letter-spacing: 0.03em;
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .product-card::before { transform: translateX(-0.5px) scaleY(1); }
  .compound-visual .fill { transition: none; }
}

/* safety backstop: when JS flags reveals-instant, reveal-related properties
   apply with zero duration so content can never stay stuck mid-transition
   in throttled / non-painting render contexts (does not affect hover, etc.) */
html.reveals-instant .reveal,
html.reveals-instant .reverse-word.to .ltr,
html.reveals-instant .reverse-swap,
html.reveals-instant .converge .flowpath,
html.reveals-instant .product-card::before,
html.reveals-instant .dg-stem,
html.reveals-instant .dg-rail .rail-h,
html.reveals-instant .dg-rail .drop {
  transition: none !important;
}

/* =====================================================
   MULTI-PAGE ADDITIONS
   ===================================================== */

/* active nav state */
.nav a.active { color: var(--on-dark); position: relative; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--accent);
}
.nav a.nav-cta.active::after { display: none; }

/* ---------- interior page header ---------- */
.page-header {
  position: relative;
  overflow: hidden;
  padding-top: clamp(72px, 11vw, 132px);
  padding-bottom: clamp(34px, 5vw, 56px);
}
.page-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.65;
  -webkit-mask-image: radial-gradient(120% 120% at 88% 0%, #000 0%, #000 38%, transparent 74%);
          mask-image: radial-gradient(120% 120% at 88% 0%, #000 0%, #000 38%, transparent 74%);
}
.page-header .wrap { position: relative; z-index: 2; }
.page-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  letter-spacing: -0.032em;
  line-height: 1.0;
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.page-intro {
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  line-height: 1.6;
  color: var(--on-dark-mute);
  max-width: 56ch;
  margin: 26px 0 0;
  font-weight: 350;
}
.band-paper .page-intro { color: var(--on-light-mute); }
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--on-dark-mute);
  text-decoration: none;
  margin-bottom: 26px;
  white-space: nowrap;
}
.crumb .arr { color: var(--accent); }
.crumb:hover { color: var(--on-dark); }
.band-paper .crumb { color: var(--on-light-mute); }
.band-paper .crumb:hover { color: var(--on-light); }

/* ---------- home: tight product names ---------- */
.product-names {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--ink-line-2);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.product-names a {
  display: block;
  padding: 4px 0;
  text-decoration: none;
  border-right: 1px solid var(--ink-line-2);
  padding-right: 22px;
  transition: opacity 0.18s ease;
}
.product-names a:last-child { border-right: none; }
.product-names a:hover { opacity: 0.7; }
.product-names .pn-setting {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.product-names .pn-name {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--on-dark);
  margin-top: 8px;
}
.product-names .pn-arrow {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--on-dark-faint);
  margin-top: 4px;
}
.thesis-teaser {
  margin-top: 32px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  color: var(--on-dark-mute);
  text-decoration: none;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  transition: gap 0.18s ease, color 0.18s ease;
}
.thesis-teaser:hover { gap: 13px; color: var(--on-dark); }
.thesis-teaser .accent { color: var(--accent); }
.thesis-teaser .arr { color: var(--accent); }
@media (max-width: 680px) {
  .product-names { grid-template-columns: 1fr; gap: 0; }
  .product-names a { border-right: none; border-bottom: 1px solid var(--ink-line-2); padding: 14px 0; }
  .product-names a:last-child { border-bottom: none; }
}

/* ---------- "dataset reversed" centerpiece ---------- */
.reverse {
  text-align: center;
  padding-block: clamp(40px, 6vw, 80px);
}
.reverse-words {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 64px);
  flex-wrap: wrap;
}
.reverse-word {
  font-family: var(--f-display);
  font-size: clamp(2.4rem, 9vw, 6.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}
.reverse-word.from { color: var(--on-light-faint); }
.reverse-word.from .ltr { display: inline-block; opacity: 0.55; }
.reverse-word.to { color: var(--on-light); }
.reverse-word.to .ltr {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.reverse.in-view .reverse-word.to .ltr { opacity: 1; transform: none; }
.reverse-swap {
  font-family: var(--f-mono);
  font-size: 22px;
  color: var(--accent);
  transform: rotate(0deg);
  transition: transform 0.6s cubic-bezier(0.4,0,0.1,1);
}
.reverse.in-view .reverse-swap { transform: rotate(180deg); }
.reverse-caption {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--on-light-mute);
  margin-top: clamp(28px, 4vw, 44px);
}
.reverse-caption .accent { color: var(--accent-deep); }

/* ---------- converging diagram (three settings -> one dataset) ---------- */
.converge {
  margin: clamp(20px, 4vw, 44px) auto 0;
  max-width: 880px;
}
.converge svg { width: 100%; height: auto; display: block; overflow: visible; }
.converge .flowpath {
  fill: none;
  stroke: var(--paper-line);
  stroke-width: 1.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.4,0,0.1,1);
}
.converge.in-view .flowpath { stroke-dashoffset: 0; }
.converge.in-view .flowpath.p2 { transition-delay: 0.12s; }
.converge.in-view .flowpath.p3 { transition-delay: 0.24s; }
.converge .node-box {
  fill: var(--paper-2);
  stroke: var(--paper-line);
  stroke-width: 1;
}
.converge .node-core {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.2;
}
.converge .node-label {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  fill: var(--on-light-faint);
  text-transform: uppercase;
}
.converge .node-name {
  font-family: var(--f-display);
  font-size: 21px;
  font-weight: 500;
  fill: var(--on-light);
}
.converge .core-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  fill: var(--accent-deep);
  text-transform: uppercase;
}
.converge .flowdot { fill: var(--accent); }

/* ---------- life of a data point ---------- */
.dp-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr) ;
  gap: 0;
  margin-top: clamp(28px, 4vw, 48px);
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  overflow: hidden;
}
.band-paper .dp-flow { border-color: var(--paper-line); }
.dp-step {
  padding: 26px 24px;
  border-right: 1px solid var(--ink-line);
  position: relative;
}
.band-paper .dp-step { border-right-color: var(--paper-line); }
.dp-step:last-child { border-right: none; }
.dp-step .dp-idx {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.dp-step .dp-where {
  font-family: var(--f-display);
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-top: 12px;
  color: var(--on-light);
}
.band-dark .dp-step .dp-where { color: var(--on-dark); }
.dp-step .dp-what {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--on-light-mute);
  margin-top: 8px;
  font-weight: 350;
}
.band-dark .dp-step .dp-what { color: var(--on-dark-mute); }
@media (max-width: 760px) {
  .dp-flow { grid-template-columns: 1fr; }
  .dp-step { border-right: none; border-bottom: 1px solid var(--paper-line); }
  .dp-step:last-child { border-bottom: none; }
}

/* ---------- product detail page ---------- */
.pd-hero { padding-bottom: clamp(20px, 4vw, 40px); }
.pd-setting {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.pd-mark img {
  height: 62px;
  width: auto;
  display: block;
  margin: 2px 0 24px;
}
.pd-name {
  font-family: var(--f-display);
  font-size: clamp(3.4rem, 11vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.92;
  margin: 14px 0 0;
  color: var(--on-dark);
}
.pd-headline {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 26px 0 0;
  max-width: 22ch;
  color: var(--on-dark);
}
.pd-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(36px, 7vw, 90px);
  align-items: start;
}
.pd-body .pd-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.62;
  color: var(--on-light-mute);
  font-weight: 350;
  max-width: 56ch;
}
.pd-captures {
  border-top: 1px solid var(--paper-line);
}
.pd-captures h4 {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-light-faint);
  font-weight: 500;
  margin: 22px 0 18px;
}
.pd-captures ul { list-style: none; margin: 0; padding: 0; }
.pd-captures li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--paper-line-2);
  font-size: 0.98rem;
  color: var(--on-light);
}
.pd-captures li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}
.pd-cta-row {
  margin-top: clamp(30px, 5vw, 52px);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.pd-feeds {
  margin-top: 4px;
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 820px) {
  .pd-body { grid-template-columns: 1fr; }
  .pd-feeds { grid-template-columns: 1fr; gap: 28px; }
}

/* next-product strip */
.next-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.next-card {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  padding: 22px 24px;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.next-card:hover { border-color: var(--accent); background: var(--ink-2); }
.next-card .nc-setting {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.next-card .nc-name {
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--on-light);
  margin-top: 8px;
}
.next-card:hover .nc-setting { color: var(--accent); }
.next-card:hover .nc-name { color: var(--on-dark); }

/* generic CTA band */
.cta-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: clamp(34px, 5vw, 56px);
  border: 1px solid var(--ink-line);
  border-radius: 5px;
  background: var(--ink-2);
}
.band-paper .cta-band { border-color: var(--paper-line); background: var(--paper-2); }
.cta-band .cta-text {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--on-dark);
  max-width: 20ch;
}
.band-paper .cta-band .cta-text { color: var(--on-light); }

/* product card dual links (overview) */
.p-cta-stack {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.p-cta-stack .p-cta { margin-top: 0; padding-top: 0; }
.p-ext {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--on-dark-faint);
  text-decoration: none;
  transition: color 0.18s ease;
}
.p-ext:hover { color: var(--accent); }
