/* Data Genes Inc. — site styles. No build step; edit and reload. */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Black, purple, silver. */
  --bg: #050308;
  --bg-raise: #0c0914;
  --ink: #eceaf4;
  --muted: #a9a5bb;
  --line: rgba(205, 200, 228, 0.14);
  --purple: #8b5cf6;
  --purple-hi: #b9a0ff;
  --purple-deep: #5527d6;
  --silver: #c9ccd8;

  /* Mirror-finish chrome: a bright band, a dark horizon, a second highlight. */
  --chrome: linear-gradient(
    176deg,
    #ffffff 0%,
    #e4e6ef 20%,
    #9da1b3 43%,
    #f7f8fc 51%,
    #c6c9d6 63%,
    #82869a 88%,
    #bcbfce 100%
  );
  --hairline: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(185, 160, 255, 0.45) 35%, rgba(255, 255, 255, 0) 85%);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1160px;
  --header-h: 64px;
  --section-pad: clamp(72px, 11vw, 148px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--purple-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip:focus {
  top: 12px;
}

/* ---------- Type ---------- */

h1,
h2,
h3,
.statement-text {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 0.9rem + 5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 1.15rem + 2.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  line-height: 1.25;
}

/* Applied to an inline span so every wrapped line gets its own mirror band. */
.chrome {
  color: var(--silver);
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  /* Descenders are clipped by background-clip without a little room. */
  padding-bottom: 0.1em;
}

.nowrap {
  white-space: nowrap;
}

.eyebrow,
.label,
.index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple-hi);
}

.lead,
.section-lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 0.98rem + 0.45vw, 1.25rem);
  line-height: 1.6;
  max-width: 38em;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: var(--gutter);
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(5, 3, 8, 0.6);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(5, 3, 8, 0.82);
  border-bottom-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}

.brand-mark {
  flex: none;
  display: block;
  height: 36px;
  width: auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(4px, 2vw, 28px);
  font-size: 0.9rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav .nav-cta {
  min-height: 44px;
  padding-inline: 16px;
  color: var(--ink);
  border: 1px solid rgba(201, 204, 216, 0.35);
  border-radius: 999px;
}

.site-nav .nav-cta:hover {
  border-color: var(--purple-hi);
}

@media (max-width: 520px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }
}

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #7a4cf7 0%, var(--purple-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 10px 40px -12px rgba(139, 92, 246, 0.75);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(185, 160, 255, 0.5), 0 14px 48px -10px rgba(139, 92, 246, 0.95);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid rgba(201, 204, 216, 0.3);
}

.btn-ghost:hover {
  border-color: var(--silver);
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  min-height: 56px;
  padding-inline: 32px;
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.2rem);
  overflow-wrap: anywhere;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 4vw, 48px);
  max-width: var(--max);
  min-height: min(100vh, 1040px);
  min-height: min(100svh, 1040px);
  margin-inline: auto;
  padding: calc(var(--header-h) + 12px) var(--gutter) clamp(36px, 7vw, 80px);
}

.hero-copy {
  display: grid;
  gap: clamp(16px, 2.4vw, 26px);
  justify-items: start;
}

.hero-figure {
  position: relative;
  isolation: isolate; /* keeps the glow layer above the page background */
  order: -1;
  justify-self: center;
  width: min(58vw, 300px, 26vh);
  width: min(58vw, 300px, 26svh); /* short phones: leave room for the headline and button */
}

.hero-figure::before {
  /* A single soft purple light behind the tesseract. */
  content: "";
  position: absolute;
  inset: -22%;
  z-index: -1;
  background:
    radial-gradient(circle closest-side, rgba(201, 204, 216, 0.07), rgba(201, 204, 216, 0) 45%),
    radial-gradient(circle closest-side, rgba(109, 61, 240, 0.34), rgba(109, 61, 240, 0));
  pointer-events: none;
}

.hero-figure canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  touch-action: pan-y;
}

.hero-figure figcaption {
  display: none; /* shown from tablet width up; phones keep the first screen for the headline */
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #8e8aa3;
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 600px) {
  .hero-figure {
    width: min(52vw, 380px);
  }

  .hero-figure figcaption {
    display: block;
  }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    padding-top: calc(var(--header-h) + 32px);
  }

  .hero-figure {
    order: 0;
    width: min(100%, 520px);
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line);
}

.section .label {
  margin-bottom: 18px;
}

.section h2 {
  max-width: 18em;
}

.section-lead {
  margin-top: 20px;
}

.programs {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  margin-top: clamp(40px, 6vw, 72px);
}

.program {
  position: relative;
  padding-top: 28px;
}

.program::before,
.fields li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--hairline);
}

.program .index {
  margin-bottom: 14px;
  color: var(--silver);
}

.program h3 {
  margin-bottom: 16px;
}

.program p + p {
  margin-top: 14px;
}

.program p:not(.index) {
  color: var(--muted);
  max-width: 34em;
}

.program p:last-child {
  color: var(--ink);
}

.fields {
  display: grid;
  gap: clamp(28px, 4vw, 40px);
  margin-top: clamp(40px, 6vw, 72px);
}

.fields li {
  position: relative;
  padding-top: 24px;
}

.fields h3 {
  margin-bottom: 10px;
}

.fields p {
  color: var(--muted);
  max-width: 30em;
}

@media (min-width: 820px) {
  .programs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Statement band (method, and mission when it arrives) ---------- */

.statement {
  position: relative;
  background:
    radial-gradient(50% 80% at 50% 50%, rgba(109, 61, 240, 0.16), rgba(109, 61, 240, 0) 72%),
    var(--bg-raise);
}

.statement .wrap {
  text-align: center;
}

.statement-text {
  max-width: 22em;
  margin-inline: auto;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* ---------- Contact ---------- */

.contact .wrap {
  display: grid;
  justify-items: center;
  text-align: center;
}

.contact .section-lead {
  margin-inline: auto;
}

.contact .actions {
  margin-top: 36px;
  justify-content: center;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px));
  font-size: 0.875rem;
  color: #8e8aa3;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .skip {
    transition: none;
  }
}

@media print {
  .site-header,
  .hero-figure,
  .skip {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .chrome,
  .brand-name {
    -webkit-text-fill-color: #000;
    background: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
