/* === Biohack Haus — Earthy Organic === */
:root {
  --clay: #b86b48;          /* terracotta */
  --clay-deep: #7a3f24;
  --sienna: #c8835a;
  --sand: #e9d9c2;
  --oat: #f1e6d3;
  --cream: #f7efe2;
  --olive: #6b6a3a;
  --sage: #8a9072;
  --bark: #2a1d14;          /* deep brown for text */
  --bark-soft: #3d2a1e;
  --line: rgba(42, 29, 20, 0.18);
  --line-strong: rgba(42, 29, 20, 0.4);

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bark); }
body {
  font-family: var(--font-sans);
  color: var(--cream);
  background: var(--bark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { border: none; background: none; color: inherit; font-family: inherit; cursor: pointer; }

/* === Topbar === */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  color: var(--cream);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 12, 6, 0.55) 0%, rgba(20, 12, 6, 0) 100%);
  text-shadow: 0 1px 12px rgba(20, 12, 6, 0.45);
}
.topbar > * { pointer-events: auto; }
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  font-weight: 500;
  color: var(--cream);
}
.brandmark svg { color: var(--cream); }
.topnav {
  display: flex;
  gap: 28px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}
.topnav a { opacity: 0.7; transition: opacity 0.25s ease; }
.topnav a:hover { opacity: 1; }

@media (max-width: 720px) {
  .topbar { padding: 14px 20px; }
  .topnav { display: none; }
}

/* === Dot Nav === */
.dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dots a {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.dots a span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(247, 239, 226, 0.55);
  box-shadow: 0 0 0 1px rgba(20, 12, 6, 0.25), 0 1px 6px rgba(20, 12, 6, 0.4);
  transition: all 0.3s ease;
}
.dots a:hover span,
.dots a.is-active span {
  background: var(--cream);
  transform: scale(1.4);
}
.dots a::after {
  content: attr(data-label);
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0;
  white-space: nowrap;
  transition: all 0.25s ease;
  pointer-events: none;
}
.dots a:hover::after,
.dots a.is-active::after {
  opacity: 0.9;
  transform: translateY(-50%) translateX(0);
}
@media (max-width: 720px) { .dots { display: none; } }

/* === Snap container === */
.snap {
  scroll-snap-type: y mandatory;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
}

/* === Slide === */
.slide {
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.06);
  transition: transform 1.2s ease;
  will-change: transform;
}
.slide.is-visible .slide__bg { transform: scale(1); }

.slide__scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(20, 12, 6, 0.55) 0%, rgba(20, 12, 6, 0.88) 100%);
  pointer-events: none;
}
.slide--hero .slide__scrim {
  background:
    radial-gradient(ellipse at center, rgba(20, 12, 6, 0.6) 0%, rgba(20, 12, 6, 0.9) 70%, rgba(20, 12, 6, 0.95) 100%);
}
.slide__scrim--left {
  background:
    linear-gradient(90deg, rgba(20, 12, 6, 0.82) 0%, rgba(20, 12, 6, 0.5) 45%, rgba(20, 12, 6, 0.05) 100%);
}
.slide__scrim--right {
  background:
    linear-gradient(270deg, rgba(20, 12, 6, 0.82) 0%, rgba(20, 12, 6, 0.5) 45%, rgba(20, 12, 6, 0.05) 100%);
}

.slide__inner {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  width: 100%;
  padding: 120px 80px 80px;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease 0.1s, transform 0.9s ease 0.1s;
}
.slide.is-visible .slide__inner { opacity: 1; transform: translateY(0); }
.slide__inner--center {
  align-items: center;
  text-align: center;
  max-width: 980px;
}
.slide__inner--left { align-items: flex-start; max-width: 720px; margin-right: auto; }
.slide__inner--right { align-items: flex-start; max-width: 720px; margin-left: auto; }

@media (max-width: 900px) {
  .slide__inner { padding: 96px 28px 96px; }
  .slide__inner--right { margin-left: 0; }
}

/* === Typography === */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0 0 28px;
  font-weight: 500;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(54px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  color: var(--cream);
}
.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--sienna);
}
.display--md { font-size: clamp(40px, 6vw, 84px); }

.lede {
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.65;
  font-weight: 300;
  color: rgba(247, 239, 226, 0.88);
  max-width: 56ch;
  margin: 0 0 32px;
}

/* === Chips === */
.chips {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips--center { justify-content: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.chips li {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid rgba(247, 239, 226, 0.3);
  border-radius: 999px;
  color: rgba(247, 239, 226, 0.85);
  background: rgba(247, 239, 226, 0.04);
  backdrop-filter: blur(4px);
}
.chips li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  transition: color 0.2s;
}
.chips li:has(a) {
  padding: 0;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.chips li:has(a) a { padding: 8px 14px; }
.chips li:has(a):hover {
  border-color: var(--sienna);
  background: rgba(200, 131, 90, 0.12);
  transform: translateY(-1px);
}
.chips li:has(a):hover a { color: var(--cream); }
.chips li a::after {
  content: "";
  width: 4px;
  height: 4px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

/* === Buttons === */
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--cream);
  color: var(--bark);
}
.btn--primary:hover {
  background: var(--sienna);
  color: var(--cream);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247, 239, 226, 0.4);
}
.btn--ghost:hover {
  border-color: var(--cream);
  background: rgba(247, 239, 226, 0.08);
}

/* === Slide meta === */
.slide__meta {
  position: absolute;
  bottom: 28px;
  left: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(247, 239, 226, 0.7);
}
.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sienna);
}

@media (max-width: 720px) {
  .slide__meta { left: 20px; bottom: 20px; font-size: 9px; }
}

/* === Footer === */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(247, 239, 226, 0.18);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(247, 239, 226, 0.6);
}
.footer a:hover { color: var(--cream); }

/* === Modality sub-page === */
.modality {
  min-height: 100vh;
  background: var(--bark);
  color: var(--cream);
}
.modality__hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 0 80px;
}
.modality__hero .slide__bg { transform: scale(1); }
.modality__hero .slide__scrim {
  background: linear-gradient(180deg, rgba(20,12,6,0.45) 0%, rgba(20,12,6,0.75) 60%, var(--bark) 100%);
}
.modality__hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0 80px;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.78;
  margin-bottom: 24px;
  transition: opacity 0.2s;
}
.crumb:hover { opacity: 1; }
.crumb svg { transform: rotate(180deg); }

.modality__body {
  max-width: 1320px;
  margin: 0 auto;
  padding: 100px 80px 120px;
}
.modality__intro {
  max-width: 760px;
  margin: 0 0 80px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 300;
  line-height: 1.35;
  color: rgba(247, 239, 226, 0.92);
  letter-spacing: -0.005em;
}
.modality__intro em { font-style: italic; color: var(--sienna); }

.routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.route {
  position: relative;
  background: linear-gradient(180deg, rgba(247,239,226,0.04), rgba(247,239,226,0.015));
  border: 1px solid rgba(247,239,226,0.12);
  border-radius: 18px;
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.route:hover {
  border-color: rgba(247,239,226,0.32);
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(247,239,226,0.07), rgba(247,239,226,0.02));
}
.route__brand {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sienna);
  margin-bottom: 14px;
  font-weight: 500;
}
.route__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--cream);
}
.route__title em { font-style: italic; color: var(--sienna); font-weight: 300; }
.route__body {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(247,239,226,0.78);
  font-weight: 300;
  margin: 0 0 22px;
}
.route__list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
}
.route__list li {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(247,239,226,0.82);
  padding: 8px 0 8px 18px;
  position: relative;
  border-top: 1px solid rgba(247,239,226,0.08);
}
.route__list li:first-child { border-top: 0; }
.route__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sienna);
}
.route__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  padding-top: 18px;
  border-top: 1px solid rgba(247,239,226,0.12);
  font-weight: 500;
  transition: color 0.2s;
}
.route__cta:hover { color: var(--sienna); }

.modality__footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 60px 80px 80px;
  border-top: 1px solid rgba(247,239,226,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(247,239,226,0.55);
}
.modality__footer a { color: var(--cream); }
.modality__footer a:hover { color: var(--sienna); }

@media (max-width: 900px) {
  .modality__hero { height: auto; min-height: 440px; padding: 120px 0 60px; }
  .modality__hero-inner { padding: 0 24px; }
  .modality__body { padding: 64px 24px 80px; }
  .modality__footer { padding: 48px 24px 64px; }
  .routes { grid-template-columns: 1fr; gap: 18px; }
  .route { padding: 28px 24px; }
}

/* === Scrollbar polish === */
.snap::-webkit-scrollbar { width: 0; }
.snap { scrollbar-width: none; }

/* ---------- Trademark / Patent / Legal — v2 ---------- */
.tm {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.08em;
  opacity: 0.78;
}
.tm--display {
  font-size: 0.28em;
  opacity: 0.7;
}

.patent-badge {
  display: inline-block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.85;
  margin: 0 0 1rem 0;
}
.patent-badge--inline {
  margin: 0.25rem 0 0.6rem 0;
  font-size: 0.55rem;
  padding: 0.3rem 0.55rem;
  opacity: 0.75;
}

.legal {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.7rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.65);
  margin-top: 1.5rem;
  max-width: 56ch;
  letter-spacing: 0.01em;
}

.modality__body .legal {
  color: rgba(0,0,0,0.6);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 1.25rem;
  margin-top: 2.5rem;
  max-width: 78ch;
}

/* ---------- OS logos + lockup — v3 ---------- */
.os-logo {
  display: block;
  width: 320px;
  max-width: 60%;
  height: auto;
  margin: 0 0 1.25rem 0;
  filter: invert(1) drop-shadow(0 2px 12px rgba(0,0,0,0.3));
  opacity: 0.95;
}
.os-logo--pf { width: 380px; }

.modality__body .os-logo {
  filter: none;
  opacity: 1;
}

.os-lockup {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1.5rem 0;
}
.os-lockup__card {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  background: rgba(0,0,0,0.28);
  backdrop-filter: blur(6px);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.os-lockup__card:hover {
  border-color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.42);
  transform: translateY(-1px);
}
.os-lockup__card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.95;
  flex-shrink: 0;
}
.os-lockup__label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* === Coming Soon Modal === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.modal[aria-hidden="false"] {
  display: flex;
  pointer-events: auto;
}
.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  cursor: pointer;
  animation: fadeIn 0.2s ease;
}
.modal__content {
  position: relative;
  background: linear-gradient(135deg, var(--bark-soft) 0%, var(--bark) 100%);
  border: 1px solid rgba(200, 131, 90, 0.3);
  border-radius: 12px;
  padding: 48px 40px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s ease;
}
.modal__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  margin: 0 0 16px 0;
  color: var(--cream);
}
.modal__description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(247, 239, 226, 0.8);
  margin: 0;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(247, 239, 226, 0.6);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.modal__close:hover {
  color: var(--cream);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
