/* ==========================================================================
   Home page
   ========================================================================== */

/* ---------- Hero: live bottle on the mosaic floor ---------- */
.hx--floor {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: min(92vh, 900px);
  min-height: min(92svh, 900px);
  margin-top: calc(var(--header-h) * -1); /* slide under the translucent header */
  padding-top: var(--header-h);
  background: #08101a;
}
.hx-media { position: absolute; inset: 0; z-index: -1; }
.hx-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hx-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 16, 26, .92) 0%, rgba(8, 16, 26, .45) 38%, rgba(8, 16, 26, 0) 58%),
    linear-gradient(0deg, var(--bg) 0%, rgba(10, 18, 28, 0) 22%);
}
.hx--floor .container { width: 100%; }
.hx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hx .display { margin-bottom: 36px; }
.hx-sub { color: var(--text-2); font-weight: 300; font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 38ch; margin-bottom: 32px; text-wrap: pretty; }
.hx-stage { position: relative; height: clamp(440px, 78vh, 740px); }
.hx-bottle { position: absolute; inset: 0; z-index: 1; }
.hx-bottle canvas { width: 100% !important; height: 100% !important; }

/* "This bottle says" card: appears on hover (desktop) or after a tap (touch) */
.hx-card {
  position: absolute;
  z-index: 2;
  right: -16px;
  bottom: 9%;
  width: 224px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(14, 24, 38, .66);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7);
  transition: opacity .35s ease, transform .35s ease;
}
.hx-card-title { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.hx-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hx-card li { display: grid; grid-template-columns: 10px auto 1fr; align-items: center; gap: 8px; font-size: 13px; }
.hx-card .swatch { width: 10px; height: 10px; border-radius: 50%; }
.hx-card .k { color: var(--muted); }
.hx-card .v { color: #fff; text-align: right; white-space: nowrap; }
@media (min-width: 860px) {
  .hx--hover .hx-card { opacity: 0; transform: translateX(14px); pointer-events: none; }
  .hx--hover .hx-stage:hover .hx-card,
  .hx--hover .hx-stage.is-show .hx-card { opacity: 1; transform: none; }
}

@media (max-width: 859px) {
  .hx--floor { display: block; min-height: 0; margin-top: 0; padding-top: 0; }
  .hx-media img { height: 380px; object-position: 70% 62%; }
  .hx-media::after { background: linear-gradient(0deg, var(--bg) 0%, var(--bg) 50%, rgba(10, 18, 28, 0) 68%); }
  .hx-grid { grid-template-columns: 1fr; }
  .hx-stage { order: -1; height: auto; }
  .hx-bottle { position: relative; height: 380px; }
  .hx .btn-row .btn { flex: 1 1 auto; }
  .hx-card { position: relative; right: auto; bottom: auto; width: auto; margin: -20px 0 8px; }
  .hx--hover .hx-card { display: none; }
  .hx--hover .hx-stage.is-show .hx-card { display: block; animation: hxIn .35s ease; }
}
@keyframes hxIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Statement ---------- */
.statement { text-align: center; }
.statement-text {
  margin-inline: auto;
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1.14;
  font-weight: 300;
  letter-spacing: -0.03em;
  max-width: 1180px;
  text-wrap: balance;
}

/* ---------- Generic split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 7vw, 112px);
}
.split--reverse .split-media { order: 2; }
.split-copy .h2 { margin-bottom: 24px; max-width: 18ch; }
.split-copy .prose { max-width: 52ch; }
.split-copy .btn-row { margin-top: 32px; }

@media (max-width: 859px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
}

/* ---------- Mosaic intro ---------- */
.experience .split-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.mosaic-intro {
  width: 100%;
  max-width: 330px;
  aspect-ratio: 1 / 1.14;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}
.mosaic-intro canvas { max-width: 100%; height: auto !important; }
.hint { font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* ---------- Facts ---------- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.fact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: transform .4s var(--ease), border-color .3s;
}
.fact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .9;
  transition: opacity .3s;
}
.fact-card { border-color: transparent; }
.fact-card::before { background: var(--surface); }
.fact-card--1 { --c: #ff7a6b; }
.fact-card--2 { --c: #6fb8ff; }
.fact-card--3 { --c: #5fe19a; }
.fact-card:hover { transform: translateY(-4px); }
.fact-num {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.05em;
  color: var(--c, #fff);
}
.fact-num small { font-size: .35em; letter-spacing: 0; margin-left: 4px; color: var(--text-2); }
.fact-card p { color: var(--text-2); font-size: 1.05rem; font-weight: 300; }
.fact-src {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}
.fact-card:hover .fact-src { color: #fff; }

@media (max-width: 859px) {
  .fact-grid { grid-template-columns: 1fr; }
  .fact-card { min-height: 0; }
}
@media (min-width: 600px) and (max-width: 859px) {
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .fact-card--3 { grid-column: 1 / -1; }
}

/* ---------- Mission ---------- */
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .h2 { margin-bottom: 20px; }

.mission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mission-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mission-img { aspect-ratio: 5 / 4; overflow: hidden; }
.mission-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.mission-card p {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 96px clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px);
  font-size: 1.05rem;
  line-height: 1.55;
  color: #fff;
  font-weight: 300;
  background: linear-gradient(0deg, rgba(10, 18, 28, .95) 20%, rgba(10, 18, 28, 0));
}
.mission-card strong { color: #fff; font-weight: 500; }

@media (max-width: 699px) {
  .mission-grid { grid-template-columns: 1fr; }
}

/* ---------- Data-driven design ---------- */
.datadriven { background: linear-gradient(180deg, transparent, var(--bg-2) 30%, var(--bg-2) 70%, transparent); }
.dd-stage { position: relative; width: 100%; max-width: 560px; margin-inline: auto; }
.dd-canvas {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  touch-action: manipulation;
}
.dd-canvas canvas { width: 100% !important; height: 100% !important; }

.dd-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 200px;
  max-width: 300px;
  padding: 14px 16px;
  background: rgba(10, 18, 28, .95);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 13px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
}
.dd-tooltip .tt-part { color: var(--accent); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.dd-tooltip .tt-title { font-weight: 500; margin: 2px 0 10px; line-height: 1.35; }
.dd-tooltip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.dd-tooltip li { display: flex; align-items: center; gap: 6px; color: var(--text-2); white-space: nowrap; }

.swatch {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}

.dd-legend {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dd-legend button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--pill);
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 14px;
  color: var(--text-2);
  transition: background-color .2s, color .2s, border-color .2s;
}
.dd-legend button:hover,
.dd-legend button[aria-pressed='true'] { background: #fff; color: var(--bg); border-color: #fff; }
.dd-legend .dots { display: inline-flex; }
.dd-legend .dots .swatch { width: 10px; height: 10px; border-radius: 50%; margin-left: -3px; box-shadow: 0 0 0 1.5px var(--bg); }
.dd-legend .dots .swatch:first-child { margin-left: 0; }

/* ---------- Waitlist band ---------- */
.waitlist-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(520px, 70vh, 720px);
  display: grid;
  place-items: center;
  padding-block: var(--section);
  border-top: 1px solid var(--line);
  border-radius: 0;
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(0, 98, 255, .22), transparent 70%),
    var(--bg);
}
.spinbot { position: absolute; inset: 0; z-index: -1; opacity: .6; }
.spinbot canvas { width: 100% !important; height: 100% !important; }

.waitlist-inner { text-align: center; max-width: 760px; }
.waitlist-inner .h2 { margin-bottom: 32px; text-wrap: balance; }
.waitlist-form-wrap {
  max-width: 520px;
  margin-inline: auto;
  padding: 10px;
  border-radius: calc(var(--pill));
}
.inline-form--lg {
  padding: 6px;
  background: rgba(10, 18, 28, .7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
}
.inline-form--lg input { border: 0; background: transparent; padding-left: 18px; }
.inline-form--lg input:focus { background: transparent; }
.check--center { justify-content: center; margin-top: 16px; }

@media (max-width: 479px) {
  .inline-form--lg { flex-direction: column; border-radius: var(--radius); }
  .inline-form--lg input { text-align: center; padding-left: 16px; }
  .check--center { text-align: left; }
}

/* ---------- Hero: answer tags around the bottle (js/sketches/hero-tags.js) ---------- */
.hx-tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hx-tag-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hx-tag-lines path { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 1; stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset .6s var(--ease) calc(var(--i) * 50ms); }
.hx-tag-lines circle { fill: #fff; opacity: 0; transition: opacity .3s calc(var(--i) * 50ms + .3s); }
.hx-tag {
  position: absolute;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 18, 28, .78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 13px; white-space: nowrap;
  opacity: 0; transform: translateY(-50%);
  transition: opacity .35s calc(var(--i) * 60ms);
}
.hx-tag span { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.hx-tag b { color: #fff; font-weight: 500; }
.hx-tag-ico { width: 26px; height: 26px; flex: none; display: block; }
.hx-stage:hover .hx-tag, .hx-stage.is-show .hx-tag { opacity: 1; }
.hx-stage:hover .hx-tag-lines path, .hx-stage.is-show .hx-tag-lines path { stroke-dashoffset: 0; }
.hx-stage:hover .hx-tag-lines circle, .hx-stage.is-show .hx-tag-lines circle { opacity: 1; }
.hx-tags.is-below { position: relative; inset: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 0 12px; pointer-events: auto; }
.hx-tags.is-below .hx-tag-lines { display: none; }
.hx-tags.is-below .hx-tag { position: static; transform: none; }
@media (min-width: 860px) {
  .hx-tags.is-below { position: absolute; inset: auto 0 0 0; padding: 0; opacity: 0; transition: opacity .35s; }
  .hx-stage:hover .hx-tags.is-below, .hx-stage.is-show .hx-tags.is-below { opacity: 1; }
}
@media (max-width: 859px) {
  .hx-tags.is-below { display: none; }
  .hx-stage.is-show .hx-tags.is-below { display: grid; animation: hxIn .35s ease; }
  .hx-tags.is-below .hx-tag { opacity: 1; }
}
