/* X UNFOLD — company homepage */

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #141D33;
  --surface: rgba(255, 255, 255, 0.055);
  --line: rgba(150, 205, 255, 0.16);
  --text: #eef6ff;
  --muted: #a9b8c8;
  --soft: #74869a;
  --blue: #58b7ff;
  --cyan: #71e3ff;
  --violet: #9a8cff;
  --max: 1160px;
  --font-sans: Inter, "Inter Fallback", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background-color: var(--bg);
}

#vision,
#biocap,
#theraos {
  scroll-margin-top: 5.5rem;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #102436 0%, #0F1526 40%, #141238 100%);
}

body::after {
  display: none;
}

main {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

/* —— Header: transparent at top, solid on scroll —— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  isolation: isolate;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

/* Fade layers only (avoid transitioning backdrop-filter on the header itself) */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(5, 9, 20, 0.92) 0%,
    rgba(7, 17, 26, 0.88) 100%
  );
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: rgba(150, 205, 255, 0.12);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.site-header.is-scrolled::before,
.site-header.is-scrolled::after {
  opacity: 1;
}

.nav {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-size: 14px;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

/* —— Hero —— */
section.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 24px;
  overflow: hidden;
  content-visibility: visible;
}

.hero-art {
  position: absolute;
  bottom: clamp(1.25rem, 3.5vh, 2.75rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--max));
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 7%,
    #000 14%,
    #000 86%,
    rgba(0, 0, 0, 0.35) 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.35) 7%,
    #000 14%,
    #000 86%,
    rgba(0, 0, 0, 0.35) 93%,
    transparent 100%
  );
}

.hero-inner {
  max-width: var(--max);
  width: 100%;
  margin: clamp(-2.5rem, -5vh, -4rem) 0 0;
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2.75rem, 6vh, 4.25rem);
}

.hero .eyebrow {
  margin: 0 0 28px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(5rem, 13vw, 10.5rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--text);
}

.hero-line {
  margin: 0 auto;
  max-width: none;
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 2.1vw, 2.875rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #8d9eac;
  white-space: nowrap;
  text-align: center;
}

.hero-line span {
  display: inline;
}

.hero-sub {
  margin: 32px auto 0;
  max-width: 34rem;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--soft);
}

.scroll-hint {
  position: absolute;
  bottom: clamp(1.25rem, 3vh, 2.125rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  opacity: 0.85;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.scroll-hint__label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-hint__icon {
  display: block;
  animation: scroll-hint-bounce 2s ease-in-out infinite;
}

.scroll-hint:hover,
.scroll-hint:focus-visible {
  color: var(--cyan);
  opacity: 1;
  outline: none;
}

.scroll-hint:focus-visible {
  box-shadow: 0 0 0 2px rgba(113, 227, 255, 0.35);
  border-radius: 4px;
}

@keyframes scroll-hint-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint__icon {
    animation: none;
  }
}

/* —— Sections —— */
section {
  position: relative;
  padding: 110px 24px;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
}

.section-kicker {
  color: var(--blue);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 18px;
}

.section-title {
  max-width: 780px;
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 600;
}

.section-copy {
  max-width: 720px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.68;
}

/* —— Vision (same block rhythm as platforms) —— */
.vision-section,
.product-section {
  position: relative;
  z-index: 1;
  padding-top: 60px;
  overflow: hidden;
}

.vision-section > .container {
  z-index: 1;
}

/* Vision — 3D cube art in right column */
.platform-block--vision .platform-block__copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.platform-block--vision .platform-art {
  display: block;
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: screen;
  filter: brightness(1.12);
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 42%,
    rgba(0, 0, 0, 0.92) 58%,
    rgba(0, 0, 0, 0.62) 72%,
    rgba(0, 0, 0, 0.28) 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 42%,
    rgba(0, 0, 0, 0.92) 58%,
    rgba(0, 0, 0, 0.62) 72%,
    rgba(0, 0, 0, 0.28) 88%,
    transparent 100%
  );
}

@media (min-width: 861px) {
  .platform-block--vision {
    display: grid;
    grid-template-columns: minmax(0, 36rem) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: stretch;
  }

  .platform-block--vision .platform-block__copy {
    max-width: none;
  }

  .platform-block--vision .platform-art {
    width: auto;
    max-width: 100%;
    height: 100%;
    justify-self: center;
    align-self: stretch;
    object-fit: contain;
    object-position: center center;
    transform: none;
  }
}

.platform-block .section-title {
  max-width: none;
  margin: 0 0 clamp(1.5rem, 3vh, 2rem);
  font-size: clamp(1.75rem, 4.2vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.section-prose {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-prose p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: 0.01em;
}

.closing {
  position: relative;
  z-index: 1;
}

/* —— Platforms (copy only; atmosphere is global) —— */
.platforms {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.platform-block {
  max-width: 36rem;
  padding: clamp(3.5rem, 9vh, 5.5rem) 0;
  border-top: 1px solid rgba(150, 205, 255, 0.08);
}

.platform-block:first-child {
  border-top: none;
}

.platform-block--biocap,
.platform-block--theraos,
.platform-block--vision {
  max-width: none;
}

/* Biocap — board art in left column, copy on the right */
.platform-block--biocap .platform-block__copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.platform-block--biocap .platform-art {
  pointer-events: none;
  opacity: 1;
  mix-blend-mode: screen;
  filter: brightness(1.05);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.28) 16%,
    rgba(0, 0, 0, 0.62) 32%,
    rgba(0, 0, 0, 0.92) 48%,
    #000 62%,
    #000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.28) 16%,
    rgba(0, 0, 0, 0.62) 32%,
    rgba(0, 0, 0, 0.92) 48%,
    #000 62%,
    #000 100%
  );
}

@media (min-width: 861px) {
  .platform-block--biocap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    min-height: clamp(20rem, 38vh, 30rem);
  }

  .platform-block--biocap .platform-art {
    position: relative;
    width: auto;
    max-width: 100%;
    height: min(36rem, 72vh);
    justify-self: end;
    margin-left: auto;
    margin-right: 0;
    transform: translateX(clamp(-0.75rem, -2vw, -1.5rem));
    z-index: 0;
    object-fit: contain;
    object-position: center center;
    align-self: center;
  }

  .platform-block--biocap .platform-block__copy {
    max-width: none;
  }

  .platform-block--theraos {
    position: relative;
    min-height: clamp(22rem, 44vh, 34rem);
  }

  .platform-block--theraos .platform-art {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + clamp(0.75rem, 2vw, 1.5rem)), -50%);
    width: min(100%, var(--max));
    height: 65%;
    max-height: 40rem;
    z-index: 0;
    object-fit: contain;
    object-position: 86% center;
  }
}

/* Theraos — cube framework on the right */
.platform-block--theraos .platform-block__copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.platform-block--theraos .platform-art {
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 42%,
    rgba(0, 0, 0, 0.92) 58%,
    rgba(0, 0, 0, 0.62) 72%,
    rgba(0, 0, 0, 0.28) 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 0%,
    #000 42%,
    rgba(0, 0, 0, 0.92) 58%,
    rgba(0, 0, 0, 0.62) 72%,
    rgba(0, 0, 0, 0.28) 88%,
    transparent 100%
  );
}

.product-label {
  color: var(--cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 44px;
}

/* Ensure visible separation between label and title */
.platform-block .product-label {
  margin-bottom: 22px !important;
}

.platform-block h3 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.platform-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 18px;
}

.platform-title h3 {
  margin: 0;
}

.platform-title__icon {
  flex-shrink: 0;
  opacity: 0.92;
  object-fit: contain;
}

.platform-block h4 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.16;
  letter-spacing: -0.04em;
  font-weight: 500;
  color: rgba(238, 246, 255, 0.9);
}

.platform-block p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 34px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid rgba(113, 227, 255, 0.32);
  background: rgba(113, 227, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.cta:hover {
  transform: translateY(-2px);
  background: rgba(113, 227, 255, 0.14);
  border-color: rgba(113, 227, 255, 0.58);
}

.cta:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* —— Closing & footer —— */
section.closing {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(4rem, 10vh, 6rem) 0 clamp(2.5rem, 5vh, 4rem);
  text-align: center;
  overflow: visible;
  content-visibility: visible;
}

.closing-art {
  display: block;
  flex-shrink: 0;
  width: min(100%, var(--max));
  height: auto;
  margin: clamp(2rem, 5vh, 3.5rem) auto 0;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: lighten;
  filter: brightness(1.2);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.28) 12%,
    rgba(0, 0, 0, 0.62) 28%,
    rgba(0, 0, 0, 0.92) 42%,
    #000 58%,
    #000 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.28) 12%,
    rgba(0, 0, 0, 0.62) 28%,
    rgba(0, 0, 0, 0.92) 42%,
    #000 58%,
    #000 100%
  );
}

.closing > .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 24px;
}

.closing .section-title,
.closing .section-copy {
  margin-left: auto;
  margin-right: auto;
}

.closing-title {
  margin: 0 auto;
  max-width: 24em;
  font-size: clamp(1.125rem, 2.6vw, 1.625rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: rgba(238, 246, 255, 0.78);
}

.closing-title span {
  display: block;
}

.closing-title span + span {
  margin-top: 0.2em;
  font-size: 0.88em;
  font-weight: 500;
}

.footer {
  padding: 42px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--soft);
  font-size: 13px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

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

/* —— Responsive —— */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .platform-block .section-title {
    font-size: clamp(1.625rem, 7vw, 2.5rem);
  }

  .platform-block {
    max-width: none;
    padding-top: clamp(2.5rem, 6vh, 3.5rem);
    padding-bottom: clamp(1.5rem, 4vh, 2.25rem);
  }

  /* Vision & products: match section rhythm */
  .vision-section,
  .product-section {
    overflow: hidden;
    padding: 3rem 20px 2rem;
  }

  .vision-section > .container {
    position: relative;
  }

  .vision-section .platform-block,
  .product-section .platform-block {
    padding: 1.5rem 0 0;
  }

  .product-section .platform-block:last-child {
    padding-bottom: 0;
  }

  .product-section .platform-block:not(:last-child) {
    padding-bottom: clamp(1.5rem, 4vh, 2.25rem);
  }

  .vision-section .platform-block .section-title {
    margin-bottom: 1rem;
  }

  .vision-section .section-prose {
    gap: 0.625rem;
  }

  .platform-block--biocap .platform-art,
  .platform-block--theraos .platform-art,
  .platform-block--vision .platform-art {
    position: static;
    top: auto;
    left: auto;
    display: block;
    height: auto;
    margin-top: clamp(0.75rem, 2vh, 1.25rem);
    margin-inline: auto;
    transform: none;
    object-fit: contain;
    object-position: center center;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.45) 10%,
      #000 22%,
      #000 78%,
      rgba(0, 0, 0, 0.45) 90%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0%,
      rgba(0, 0, 0, 0.45) 10%,
      #000 22%,
      #000 78%,
      rgba(0, 0, 0, 0.45) 90%,
      transparent 100%
    );
  }

  .platform-block--biocap .platform-art {
    width: min(100%, 22rem);
  }

  .platform-block--theraos .platform-art {
    width: min(100%, 26rem);
  }

  .platform-block--vision .platform-art {
    width: min(100%, 26rem);
  }

  .platform-block--biocap,
  .platform-block--theraos,
  .platform-block--vision {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .platform-block--biocap .platform-block__copy,
  .platform-block--theraos .platform-block__copy,
  .platform-block--vision .platform-block__copy {
    order: 0;
    align-self: stretch;
  }

  .platform-block--biocap .platform-art,
  .platform-block--theraos .platform-art,
  .platform-block--vision .platform-art {
    order: 1;
  }

  section:not(.hero):not(.vision-section):not(.product-section):not(.closing) {
    padding: 78px 20px;
  }

  .closing-art {
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
  }

  section.closing {
    padding: clamp(3.5rem, 9vh, 5rem) 0 clamp(2rem, 4vh, 3rem);
  }

  .closing > .container {
    max-width: none;
    padding: 0 20px;
  }

  .hero-art {
    width: 100%;
    bottom: clamp(1rem, 3vh, 2rem);
    height: clamp(12rem, 34vh, 20rem);
    object-fit: fill;
    opacity: 0.8;
  }

  .hero-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2em;
    white-space: normal;
    font-size: clamp(1.125rem, 4.6vw, 1.5rem);
    line-height: 1.2;
  }

  .hero-line span {
    display: block;
  }
}

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