/* ── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #f7f5f2;
  --bg-alt:   #f0ede9;
  --text:     rgba(14, 12, 22, 0.85);
  --text-dim: rgba(14, 12, 22, 0.35);
  --accent:   rgba(80, 55, 140, 0.70);
  --line:     rgba(14, 12, 22, 0.08);
  --font:     'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}

/* ── Fixed canvas layers ────────────────────────────────────── */
#orb-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  transition: opacity 0.8s ease;
}

#hand-canvas {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 5;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

#video {
  position: fixed;
  top: -9999px; left: -9999px;
  width: 640px; height: 480px;
}

/* ── Camera status ──────────────────────────────────────────── */
#cam-status {
  position: fixed;
  top: 1.4rem; right: 1.6rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(14, 12, 22, 0.25);
  pointer-events: none;
  transition: color 0.4s, opacity 0.8s ease;
}

#cam-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(14, 12, 22, 0.15);
  transition: background 0.4s;
}

#cam-status.active   #cam-dot { background: rgba(40, 180, 100, 0.8); }
#cam-status.tracking #cam-dot { background: rgba(14, 12, 22, 0.80); }
#cam-status.tracking          { color: rgba(14, 12, 22, 0.55); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10vh;
  pointer-events: none;
  user-select: none;
}

.hero-text {
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 1.8s ease 0.6s forwards;
}

h1 {
  font-size: clamp(4rem, 11vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: rgba(14, 12, 22, 0.88);
  line-height: 1;
}

.tagline {
  margin-top: 1rem;
  font-size: clamp(0.60rem, 1.1vw, 0.75rem);
  font-weight: 400;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  text-indent: 0.38em;
  color: var(--accent);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 1.8s ease 1.8s forwards;
}

.scroll-hint span {
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(14, 12, 22, 0.30), transparent);
  animation: scrollPulse 2.4s ease-in-out 2.5s infinite;
}

/* ── Sections base ───────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 10;
  background: var(--bg);
  padding: 14vh 10vw;
}

.section--device {
  background: var(--bg);
  padding: 14vh 0 0;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: block;
  margin-bottom: 1.2rem;
  font-size: 0.60rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── Vision ─────────────────────────────────────────────────── */
.vision-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: start;
}

.vision-left {
  position: sticky;
  top: 12vh;
  padding-right: 5vw;
}

.vision-headline {
  font-size: clamp(3.4rem, 5.5vw, 5.4rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
}

/* Alternating headline line opacities */
.hl-dark { color: rgba(14, 12, 22, 0.90); }
.hl-mid  { color: rgba(14, 12, 22, 0.50); }
.hl-fade { color: rgba(14, 12, 22, 0.22); }

.vision-right {
  padding-left: 5vw;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5rem;
}

.vision-block h3 {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: rgba(14, 12, 22, 0.85);
  margin-bottom: 1.2rem;
}

.vision-block p {
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  font-weight: 400;
  line-height: 1.90;
  color: rgba(14, 12, 22, 0.50);
}

/* ── Device ─────────────────────────────────────────────────── */
.device-header {
  padding: 0 10vw 4rem;
}

.device-headline {
  font-size: clamp(3.4rem, 6.5vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: rgba(14, 12, 22, 0.88);
  margin-top: 0.2rem;
}

.device-image-full {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  padding: 0 8vw;
}

.device-image-full img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.02) saturate(0.78);
  transition: filter 0.8s ease;
}

.device-image-full:hover img {
  filter: contrast(1.04) saturate(0.95);
}

/* ── Join ───────────────────────────────────────────────────── */
.join-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.join-left {
  position: sticky;
  top: 12vh;
  padding-right: 6vw;
}

.join-headline {
  font-size: clamp(4.5rem, 8vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  margin-bottom: 3rem;
}

.join-intro {
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  font-weight: 400;
  line-height: 1.85;
  color: rgba(14, 12, 22, 0.45);
  max-width: 340px;
}

.join-right {
  padding-left: 5vw;
  border-left: 1px solid var(--line);
}

/* form question header */
.form-question {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(14, 12, 22, 0.28);
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}

/* sentence-style form */
#interest-form {
  display: flex;
  flex-direction: column;
}

.form-sentence {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.5ch;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  font-weight: 400;
  color: rgba(14, 12, 22, 0.35);
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

.fs-blank {
  border-bottom: 1.5px solid rgba(14, 12, 22, 0.22);
  display: inline-flex;
  align-items: baseline;
  min-width: 6rem;
  flex: 1;
  transition: border-color 0.25s ease;
}

.fs-blank:focus-within {
  border-color: var(--accent);
}

.fs-blank input {
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: inherit;
  font-weight: 700;
  color: rgba(14, 12, 22, 0.85);
  outline: none;
  width: 100%;
  padding: 0.3rem 0.15rem;
}

.fs-blank input::placeholder {
  font-weight: 400;
  color: rgba(14, 12, 22, 0.18);
}

/* because block — sentence + textarea stacked */
.form-block {
  margin: 0.4rem 0 2.8rem;
}

.form-block-label {
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  font-weight: 400;
  color: rgba(14, 12, 22, 0.35);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.form-block textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(14, 12, 22, 0.22);
  font-family: var(--font);
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  font-weight: 500;
  color: rgba(14, 12, 22, 0.85);
  outline: none;
  resize: none;
  padding: 0.4rem 0 1rem;
  line-height: 1.7;
  transition: border-color 0.25s ease;
}

.form-block textarea:focus {
  border-color: var(--accent);
}

.form-block textarea::placeholder {
  font-weight: 400;
  color: rgba(14, 12, 22, 0.18);
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 3rem;
  padding: 1.6rem 0;
  background: transparent;
  border: none;
  border-top: 2px solid rgba(14, 12, 22, 0.88);
  color: rgba(14, 12, 22, 0.88);
  font-family: var(--font);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

.btn-submit svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.btn-submit:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-submit:hover svg {
  transform: translateX(6px);
}

/* force [hidden] to always win over display:flex/grid */
[hidden] { display: none !important; }

#form-success {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem 0 3rem;
}

.success-label {
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.success-headline {
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: rgba(14, 12, 22, 0.88);
}

.success-sub {
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  font-weight: 400;
  line-height: 1.8;
  color: rgba(14, 12, 22, 0.40);
  max-width: 320px;
}

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 10;
  background: var(--bg);
  padding: 3rem 10vw;
  border-top: 1px solid var(--line);
  font-size: 0.60rem;
  font-weight: 400;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(14, 12, 22, 0.20);
}

/* ── Scroll reveal ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal--delay-1 { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.30s; }

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.8; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .section            { padding: 12vh 7vw; }
  .section--device    { padding: 12vh 0 0; }
  .vision-layout      { grid-template-columns: 1fr; gap: 5rem; }
  .vision-left        { position: static; padding-right: 0; }
  .vision-right       { padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 4rem; }
  .device-header      { padding: 0 7vw 3rem; }
  .join-layout        { grid-template-columns: 1fr; gap: 5rem; }
  .join-left          { position: static; padding-right: 0; }
  .join-right         { padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 3rem; }
  .form-sentence      { font-size: clamp(1rem, 4.5vw, 1.2rem); }
  .form-block-label   { font-size: clamp(1rem, 4.5vw, 1.2rem); }
  .join-headline      { font-size: clamp(3.5rem, 10vw, 5rem); }
}
