:root {
  --bg: #080a09;
  --surface: #0e1210;
  --line: rgba(236, 241, 238, 0.1);
  --line-strong: rgba(236, 241, 238, 0.2);
  --text: #eceeed;
  --muted: #8d9691;
  --green: #64d198; /* sampled from the Viduon logo */
  --green-soft: rgba(100, 209, 152, 0.14);
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(42rem 30rem at 100% 100%, rgba(100, 209, 152, 0.24), transparent 65%),
    radial-gradient(80rem 50rem at 95% 115%, rgba(100, 209, 152, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Landing page: exactly one screen, no scrolling */
body.one-screen { height: 100vh; height: 100svh; overflow: hidden; }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.75rem, 3vh, 2.25rem) var(--pad);
  position: relative;
  z-index: 1;
}
.brand { display: block; border-radius: 4px; }
.brand img { display: block; width: clamp(150px, min(18vw, 28vh), 270px); height: auto; }
.ig {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.ig:hover { color: var(--text); }

/* Hero */
.hero {
  align-self: center;
  width: 100%;
  max-width: calc(46rem + 2 * var(--pad));
  padding: 0 var(--pad) clamp(2.5rem, 10vh, 8rem);
  position: relative;
  z-index: 1;
}
.category {
  margin: 0 0 clamp(0.75rem, 2.4vh, 1.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}
.category::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}
h1 {
  margin: 0;
  font-size: clamp(1.875rem, min(5.6vw, 6.6vh), 4.25rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 17ch;
  text-wrap: balance;
}
.lede {
  margin: clamp(0.875rem, 2.8vh, 1.75rem) 0 0;
  max-width: 36rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* Waitlist */
.waitlist { margin-top: clamp(1.25rem, 4vh, 2.75rem); max-width: 34rem; }
.field {
  display: flex;
  gap: 0.375rem;
  padding: 0.375rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within {
  border-color: rgba(100, 209, 152, 0.5);
  box-shadow: 0 0 0 4px var(--green-soft), 0 0 40px -10px rgba(100, 209, 152, 0.35);
}
.field input {
  flex: 1;
  min-width: 0;
  padding: 0 0.875rem;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.field input::placeholder { color: #5d6561; }
.field input:focus-visible { outline: none; }
.waitlist-form[data-invalid="email"] .field { border-color: #e0726a; }
.field button {
  flex: none;
  min-height: 2.875rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #06140c;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}
.field button:hover { background: #7ddcab; }
.field button:active { transform: scale(0.98); }
.field button[disabled] { opacity: 0.6; cursor: progress; }

.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.consent input {
  flex: none;
  appearance: none;
  width: 1.125rem; height: 1.125rem;
  margin: 0.0625rem 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  display: grid;
  place-content: center;
  cursor: pointer;
}
.consent input::after {
  content: "";
  width: 0.55rem; height: 0.3rem;
  border: solid #06140c;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.15s;
}
.consent input:checked { background: var(--green); border-color: var(--green); }
.consent input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.waitlist-form[data-invalid="consent"] .consent input { border-color: #e0726a; }
.consent a { color: var(--text); text-underline-offset: 2px; }

.hint { margin: 0.875rem 0 0; font-size: 0.8125rem; color: #6f7873; }
.waitlist-form[data-invalid] .hint { color: #e89a93; }

/* Success state */
.waitlist-done {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  background: var(--surface);
  border: 1px solid rgba(100, 209, 152, 0.35);
  border-radius: 12px;
  box-shadow: 0 0 48px -16px rgba(100, 209, 152, 0.4);
  outline: none;
}
.waitlist-done[hidden] { display: none; }
.waitlist[data-state="done"] .waitlist-done { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.check { flex: none; width: 2.5rem; height: 2.5rem; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.check circle { stroke-dasharray: 117; stroke-dashoffset: 117; animation: draw 0.6s 0.1s ease-out forwards; }
.check path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: draw 0.35s 0.55s ease-out forwards; }
.done-title { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.done-text { margin: 0.125rem 0 0; font-size: 0.9375rem; color: var(--muted); }

/* Background signal: one trace, one early signal */
.signal {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(4rem, 9vh, 6rem);
  width: 100%;
  height: clamp(140px, 24vh, 240px);
  pointer-events: none;
  z-index: 0;
}
.signal-base {
  fill: none;
  stroke: rgba(236, 241, 238, 0.12);
  stroke-width: 1.25;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.4s 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.signal-dot { fill: var(--green); opacity: 0; animation: appear 0.4s 2.1s forwards; }
.signal-ring {
  fill: none;
  stroke: var(--green);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 3.2s 2.4s ease-out infinite;
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
  padding: clamp(1rem, 3vh, 1.75rem) var(--pad);
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
  background: rgba(8, 10, 9, 0.6);
}
.foot-brand { display: flex; align-items: baseline; gap: 0.875rem; margin-right: auto; }
.foot-name { color: var(--text); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.foot-cat { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.6875rem; }
.foot nav { display: flex; gap: 1.5rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }
.copy { margin: 0; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }
@keyframes pulse {
  0% { opacity: 0.8; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(5); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Mobile */
@media (max-width: 560px) {
  .hero { padding-bottom: 3.5rem; }
  .brand img { width: 150px; }
  h1 { font-size: clamp(1.75rem, min(9.4vw, 5vh), 2.5rem); max-width: none; }
  .lede { font-size: 1rem; line-height: 1.5; }
  .field { flex-direction: column; padding: 0; gap: 0.625rem; background: none; border: 0; }
  .field:focus-within { box-shadow: none; }
  .field input {
    min-height: 3rem;
    padding: 0 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .field input:focus-visible { border-color: rgba(100, 209, 152, 0.6); box-shadow: 0 0 0 4px var(--green-soft); }
  .waitlist-form[data-invalid="email"] .field input { border-color: #e0726a; }
  .field button { min-height: 3rem; border-radius: 10px; font-size: 1rem; }
  .signal { bottom: 2.5rem; height: 100px; }
  .foot { gap: 0.25rem 1rem; font-size: 0.75rem; }
  .foot-brand { flex-basis: 100%; }
  .foot-cat { display: none; }
  .foot nav { gap: 1.25rem; }
  .copy { margin-left: auto; }
}

/* Small phones (iPhone SE etc.): tighten so everything still fits one screen */
@media (max-width: 560px) and (max-height: 740px) {
  .hero { padding-bottom: 1.5rem; }
  .lede { font-size: 0.875rem; margin-top: 0.75rem; }
  .category { margin-bottom: 0.5rem; }
  .field input, .field button { min-height: 2.75rem; }
  .consent { margin-top: 0.75rem; font-size: 0.75rem; }
  .hint { margin-top: 0.5rem; font-size: 0.75rem; }
  .foot { flex-wrap: nowrap; }
  .foot-brand { flex-basis: auto; }
}

/* Short laptop screens: keep everything on one screen */
@media (min-width: 561px) and (max-height: 780px) {
  .lede { font-size: 1rem; margin-top: 0.75rem; }
  .waitlist { margin-top: 1.25rem; }
  .consent { margin-top: 0.75rem; }
  .hint { margin-top: 0.5rem; }
  .hero { padding-bottom: 2rem; }
}

/* Very short viewports (e.g. phones in landscape): allow scrolling rather than clip content */
@media (max-height: 520px) {
  body.one-screen { height: auto; min-height: 100svh; overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .signal-ring { display: none; }
}

/* Legal pages */
.legal {
  width: 100%;
  max-width: calc(42rem + 2 * var(--pad));
  padding: 2rem var(--pad) 5rem;
  position: relative;
  z-index: 1;
}
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: none; margin-bottom: 2rem; }
.legal h2 { margin: 2.5rem 0 0.5rem; font-size: 1.0625rem; font-weight: 600; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin: 0 0 1rem; }
.legal a { color: var(--text); text-underline-offset: 2px; }
.legal address { font-style: normal; color: var(--text); line-height: 1.7; }
