/* ============================================================
   ANIWEAVE — Home (editorial)
   Foundation: tokens, type system, layout primitives
   ============================================================ */

/* ---- Fonts (subset; full family is in design system) ---- */
@font-face {
  font-family: "Roboto";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto";
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url("fonts/Roboto-Italic.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto";
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto-Black.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto Condensed";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto_Condensed-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto Condensed";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto_Condensed-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto Condensed";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto_Condensed-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Roboto Condensed";
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Roboto_Condensed-Black.ttf") format("truetype");
}

/* ---- Tokens (subset of ANIWEAVE design system) ---- */
:root {
  /* palette */
  --primary-100: #cceeff;
  --primary-300: #b9e8ff;
  --primary-500: #a6e1ff;
  --primary-700: #93dbff;
  --primary-900: #80d4ff;
  --secondary-100: #fffaf2;
  --secondary-500: #fff4e5;
  --secondary-900: #ffedd4;
  --neutral-50: #f5fafc;
  --neutral-100: #eff4f6;
  --neutral-200: #e3e9ec;
  --neutral-300: #ccd4d9;
  --neutral-400: #aebabf;
  --neutral-500: #77858c;
  --neutral-600: #4d5e66;
  --neutral-700: #32444d;
  --neutral-800: #142933;
  --neutral-900: #041b26;
  --white: #ffffff;
  --info-strong: #406a80;
  /* brand partner colors */
  --brand-aniweave: #80d4ff;
  --brand-avalanche: #1e3a8a;
  --brand-nvidia: #76b900;
  --brand-nemoclaw: #76b900;

  /* semantic */
  --type-title: var(--neutral-800);
  --type-heading: var(--neutral-700);
  --type-paragraph: var(--neutral-500);
  --type-link: var(--neutral-900);
  --type-on-fill: var(--white);
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9fa;
  --bg-tertiary: #f3f4f4;
  --bg-info: rgba(204, 238, 255, 0.2);
  --border-default: var(--neutral-200);
  --divider: rgba(20, 41, 51, 0.05);
  --overlay-bg: rgba(20, 24, 26, 0.5);

  /* TWEAKABLE — accent intensity, density, motion are all driven from these */
  --accent: #80d4ff; /* primary-900 default */
  --accent-soft: rgba(166, 225, 255, 0.2);
  --accent-line: rgba(128, 212, 255, 0.55);
  --density-scale: 1; /* multiplies spacing */
  --motion-scale: 1; /* multiplies durations/distance */
  --type-scale: 1; /* multiplies font sizes */

  /* type scale (modulated by --type-scale) */
  --fs-display: calc(clamp(56px, 9.5vw, 168px) * var(--type-scale));
  --fs-h1: calc(clamp(36px, 4.2vw, 64px) * var(--type-scale));
  --fs-h2: calc(clamp(28px, 3vw, 44px) * var(--type-scale));
  --fs-h3: calc(20px * var(--type-scale));
  --fs-p-xl: calc(22px * var(--type-scale));
  --fs-p-lg: calc(17px * var(--type-scale));
  --fs-p: calc(15px * var(--type-scale));
  --fs-p-sm: calc(13px * var(--type-scale));
  --fs-eyebrow: calc(11px * var(--type-scale));

  --lh-display: 0.95;
  --lh-heading: 1.2;
  --lh-body: 1.55;

  /* spacing (modulated by --density-scale) */
  --s1: calc(4px * var(--density-scale));
  --s2: calc(8px * var(--density-scale));
  --s3: calc(12px * var(--density-scale));
  --s4: calc(16px * var(--density-scale));
  --s5: calc(24px * var(--density-scale));
  --s6: calc(32px * var(--density-scale));
  --s7: calc(48px * var(--density-scale));
  --s8: calc(64px * var(--density-scale));
  --s9: calc(96px * var(--density-scale));
  --s10: calc(128px * var(--density-scale));

  /* motion */
  --dur-fast: calc(180ms * var(--motion-scale));
  --dur-medium: calc(340ms * var(--motion-scale));
  --dur-slow: calc(720ms * var(--motion-scale));
  --reveal-dist: calc(40px * var(--motion-scale));
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasis: cubic-bezier(0.3, 0, 0, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 9999px;

  /* shadows */
  --shadow-1: 0 1px 2px rgba(20, 41, 51, 0.06);
  --shadow-2: 0 4px 12px rgba(20, 41, 51, 0.06);
  --shadow-3: 0 12px 36px rgba(20, 41, 51, 0.1);
  --shadow-4: 0 24px 60px rgba(20, 41, 51, 0.16);

  --container-max: 1480px;
  --gutter: clamp(24px, 4vw, 64px);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family:
    "Roboto",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: var(--fs-p);
  line-height: var(--lh-body);
  color: var(--type-paragraph);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
::selection {
  background: var(--primary-100);
  color: var(--neutral-900);
}

/* ---- Type system ---- */
.display {
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.03em;
  color: var(--type-title);
  margin: 0;
  text-wrap: balance;
}
.h1 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: var(--fs-h1);
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  color: var(--type-title);
  margin: 0;
  text-wrap: pretty;
}
.h2 {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: -0.015em;
  color: var(--type-title);
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.3;
  color: var(--type-heading);
  margin: 0;
}
.lede {
  font-family: "Roboto", sans-serif;
  font-weight: 300;
  font-size: var(--fs-p-xl);
  line-height: 1.4;
  color: var(--neutral-600);
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: pretty;
}
.body {
  font-size: var(--fs-p-lg);
  line-height: var(--lh-body);
  color: var(--type-paragraph);
  margin: 0;
}
.body-sm {
  font-size: var(--fs-p);
  color: var(--type-paragraph);
  margin: 0;
}
.eyebrow {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin: 0;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}

.serif-num {
  font-family: "Roboto Condensed", serif;
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
}

/* ---- Layout primitives ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container-wide {
  max-width: 1700px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---- Top nav ---- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: var(--s4) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid transparent;
  transition:
    background var(--dur-medium) var(--ease-standard),
    border-color var(--dur-medium) var(--ease-standard);
}
.site-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--divider);
}
.site-nav.is-inverted {
  background: rgba(4, 27, 38, 0.4);
  border-bottom-color: transparent;
}
.site-nav.is-inverted.is-scrolled {
  background: rgba(4, 27, 38, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.site-nav.is-inverted .nav-links a {
  color: rgba(255, 255, 255, 0.78);
}
.site-nav.is-inverted .nav-links a:hover,
.site-nav.is-inverted .nav-links a.is-active {
  color: var(--white);
}
.site-nav.is-inverted .nav-cta {
  background: var(--white);
  color: var(--neutral-900);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}
.nav-logo img {
  display: block;
  height: 26px;
  width: auto;
  transition: filter var(--dur-medium) var(--ease-standard);
}
.site-nav.is-inverted .nav-logo img {
  filter: brightness(0) invert(1);
}
.site-nav.is-inverted .nav-cta {
  background: var(--white);
  color: var(--neutral-900);
}
.site-nav.is-inverted .nav-cta:hover {
  background: var(--bg-tertiary);
}

.nav-links {
  display: flex;
  gap: var(--s5);
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--neutral-600);
  padding: 6px 0;
  position: relative;
  transition: color var(--dur-fast) var(--ease-standard);
}
.nav-links a:hover,
.nav-links a.is-active {
  color: var(--neutral-900);
}
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--neutral-700);
  color: var(--white);
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  transition: background var(--dur-fast) var(--ease-standard);
}
.nav-cta:hover {
  background: var(--neutral-900);
}
.nav-cta .arr {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-fast) var(--ease-standard);
}
.nav-cta:hover .arr {
  transform: translateX(3px);
}

/* Hamburger button */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 51;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--neutral-900);
  border-radius: 2px;
  transition:
    transform 0.28s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}
.site-nav.is-inverted:not(.menu-open) .nav-burger span {
  background: var(--white);
}
.site-nav.menu-open .nav-burger span {
  background: var(--neutral-900);
}
.site-nav.menu-open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-nav.menu-open .nav-burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-nav.menu-open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav turns white when menu is open */
.site-nav.menu-open {
  background: rgba(255, 255, 255, 1) !important;
  border-bottom-color: var(--divider) !important;
}

/* Mobile menu overlay */
.nav-mobile {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--s6) + 64px) var(--gutter) var(--s6);
  gap: var(--s4);
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s 0.3s;
  pointer-events: none;
}
.nav-mobile.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 52;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s 0s;
}
.nav-mobile a:not(.btn) {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 6vw, 40px);
  letter-spacing: -0.02em;
  color: var(--neutral-900);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-mobile a:not(.btn):hover {
  color: var(--accent);
}
.nav-mobile .nav-mobile-cta {
  margin-top: var(--s5);
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }
  .nav-cta {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
}

/* ---- Section atoms ---- */
.section {
  position: relative;
  padding: var(--s10) 0;
}
.section.tight {
  padding: var(--s8) 0;
}
.section.compact {
  padding: var(--s7) 0;
}

.section-rule {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s4);
  align-items: end;
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--border-default);
  margin-bottom: var(--s7);
}
.section-rule .left {
  display: flex;
  gap: var(--s5);
  align-items: baseline;
}
.section-rule .num {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--neutral-400);
  font-variant-numeric: tabular-nums;
}
.section-rule .label {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--neutral-700);
}
.section-rule .right {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 12px;
  color: var(--neutral-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--neutral-900);
  color: rgba(255, 255, 255, 0.65);
  padding: 64px 0 24px;
  margin: 0;
}
.site-footer .grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s7);
  padding-bottom: var(--s7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer h4 {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 var(--s4);
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.site-footer a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  transition: color var(--dur-fast) var(--ease-standard);
}
.site-footer a:hover {
  color: var(--accent);
}
.site-footer .mast {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--s4);
}
.site-footer .mast img {
  display: block;
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}
.site-footer .blurb {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  max-width: 32ch;
}
.site-footer .legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s5);
  font-family: "Roboto Condensed", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}
.site-footer .legal .right {
  display: flex;
  gap: var(--s5);
}
@media (max-width: 880px) {
  .site-footer .grid {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer .legal {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
  }
  .site-footer .legal > div:first-child {
    flex: 1 1 0;
    min-width: 0;
  }
  .site-footer .legal .right {
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
  }
}

/* ---- Tiny utility ---- */
.is-accent {
  color: var(--accent);
}
.is-mono {
  font-family: "Roboto Condensed", sans-serif;
  letter-spacing: 0.04em;
}
.divider-thin {
  height: 1px;
  background: var(--border-default);
}
