/* Helio3D coming-soon page. Colours follow the app's "Moss black" dark theme. */

:root {
  --bg: #0b100c;
  --surface: #121a15;
  --surface-2: #18211b;
  --line: rgba(214, 247, 221, 0.09);
  --line-2: rgba(214, 247, 221, 0.16);
  --text: #f3f6f4;
  --muted: #a7ada8;
  --dim: #7f8781;
  --mist: #d6f7dd;
  --leaf: #52c479;
  --leaf-2: #84dd9d;
  --lime: #d9f99d;
  --amber: #faab3f;
  --sun: #fde68a;
  --rose: #fda4af;

  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-sans);
  --font-serif: "Instrument Serif", Georgia, serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 40px);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--muted);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

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

::selection {
  background: rgba(82, 196, 121, 0.35);
  color: var(--text);
}

.wrap {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

[hidden] {
  display: none !important;
}

.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;
}

/* Film grain over everything, very faint. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  overflow: visible;
}

.logo-sun,
.logo-leaf {
  transition: transform 0.7s var(--ease-out);
}

.logo-leaf {
  transform-origin: 5px 27px;
}

.logo:hover .logo-sun {
  transform: translate(-1px, -1.5px);
}

.logo:hover .logo-leaf {
  transform: rotate(-6deg);
}

.wordmark {
  font: 600 1.25rem/1 var(--font-display);
  letter-spacing: -0.03em;
  color: var(--text);
}

.wordmark span {
  color: var(--amber);
}

.nav-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.nav-tag i {
  font-style: normal;
  color: var(--amber);
  margin-inline: 0.35em;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: min(calc(100svh - 80px), 860px);
  padding-block: clamp(12px, 3vh, 40px) clamp(48px, 8vh, 88px);
}

/* Dawn behind the house, a cool green glow at the top left, and a faded grid. */
.hero::before {
  content: "";
  position: absolute;
  inset: -90px calc(50% - 50vw) -160px;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
  background:
    radial-gradient(42% 46% at 70% 66%, rgba(245, 158, 11, 0.14), transparent 70%),
    radial-gradient(28% 30% at 72% 62%, rgba(249, 115, 22, 0.08), transparent 70%),
    radial-gradient(40% 46% at 6% 0%, rgba(46, 163, 92, 0.16), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: -90px calc(50% - 50vw) 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 0%, transparent 75%);
  opacity: 0.55;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(18, 26, 21, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(250, 171, 63, 0.8);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  animation: pulse 2.2s var(--ease-out) infinite;
}

@keyframes pulse {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(2);
    opacity: 0;
  }
}

h1 {
  margin: 1.4rem 0 1.25rem;
  font: 600 clamp(2.6rem, 1.3rem + 4.3vw, 4.7rem) / 1 var(--font-display);
  letter-spacing: -0.045em;
  color: var(--text);
  text-wrap: balance;
}

h1 em,
.closing h2 em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.01em;
  line-height: 0.9;
  padding-right: 0.06em;
  background: linear-gradient(100deg, #fff1c2 0%, #fbbf24 45%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 33em;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.14rem);
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- Countdown (only when a launch date is set) ---------- */

.countdown {
  margin-top: 1.75rem;
}

.countdown-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.countdown-units {
  display: flex;
  gap: 10px;
  margin-top: 0.6rem;
}

.countdown-units span {
  display: grid;
  justify-items: center;
  min-width: 64px;
  padding: 10px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 26, 21, 0.7);
}

.countdown-units b {
  font: 600 1.6rem/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.countdown-units small {
  margin-top: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- Sign-up ---------- */

.signup {
  margin-top: 2.1rem;
  max-width: 31rem;
}

.field {
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(18, 26, 21, 0.78);
  box-shadow:
    0 14px 40px -16px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.field:focus-within {
  border-color: rgba(82, 196, 121, 0.6);
  box-shadow:
    0 0 0 4px rgba(82, 196, 121, 0.14),
    0 14px 40px -16px rgba(0, 0, 0, 0.7);
}

.field input {
  flex: 1;
  min-width: 0;
  padding: 0 12px 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 1rem var(--font-sans);
}

.field input::placeholder {
  color: var(--dim);
}

.field button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px 13px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #74d994, #3cb068);
  color: #052012;
  font: 600 0.95rem/1 var(--font-sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 8px 24px -8px rgba(82, 196, 121, 0.65);
  transition:
    transform 0.25s var(--ease-out),
    filter 0.2s,
    box-shadow 0.25s;
}

.field button svg,
.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out);
}

.field button:hover,
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 12px 30px -8px rgba(82, 196, 121, 0.75);
}

.field button:hover svg {
  transform: translateX(3px);
}

.btn:hover svg {
  transform: translateY(-3px);
}

.field button:active,
.btn:active {
  transform: translateY(0);
}

.is-busy .field button {
  cursor: progress;
  opacity: 0.75;
}

.is-busy .field button svg {
  animation: nudge 0.8s ease-in-out infinite;
}

@keyframes nudge {
  50% {
    transform: translateX(4px);
  }
}

.fine {
  margin: 0.85rem 0 0 1.15rem;
  font-size: 0.85rem;
  color: var(--dim);
}

.is-error .field {
  border-color: rgba(253, 164, 175, 0.6);
  box-shadow: 0 0 0 4px rgba(253, 164, 175, 0.12);
}

.is-error .fine {
  color: var(--rose);
}

/* Honeypot for bots: off screen, never seen. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.thanks {
  display: flex;
  gap: 16px;
  max-width: 31rem;
  margin-top: 2.1rem;
  padding: 20px 22px;
  border: 1px solid rgba(82, 196, 121, 0.35);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(24, 40, 29, 0.9), rgba(16, 24, 19, 0.9));
  animation: rise 0.7s var(--ease-out) both;
}

.thanks:focus {
  outline: none;
}

.thanks-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d6, #fbbf24 55%, #f59e0b);
  color: #3b2300;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.45);
}

.thanks-icon svg {
  width: 22px;
  height: 22px;
}

.thanks-title {
  font: 600 1.15rem/1.3 var(--font-display);
  color: var(--text);
  margin-bottom: 0.2rem;
}

.thanks p {
  font-size: 0.93rem;
}

.share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.8rem;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mist);
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.share:hover {
  border-color: rgba(82, 196, 121, 0.55);
  background: rgba(82, 196, 121, 0.08);
}

.share svg {
  width: 17px;
  height: 17px;
  color: #4ade80;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- The 3D stage ---------- */

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.9;
}

.stage canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

/* The sun's glow lives outside the canvas so it can spill onto the page. scene.js moves it. */
.sun-glow {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 220, 130, 0.3), rgba(249, 150, 50, 0.1) 45%, transparent);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.hud {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 2%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(11, 16, 12, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--mist);
}

.chip svg {
  width: 15px;
  height: 15px;
  color: #fbbf24;
}

.chip [data-clock] {
  min-width: 4.6em;
}

.meter {
  position: relative;
  width: 58px;
  height: 6px;
  border-radius: 6px;
  background: rgba(214, 247, 221, 0.12);
  overflow: hidden;
}

.meter span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--lime));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s linear;
}

/* ---------- A first glimpse ---------- */

.glimpse {
  padding-block: clamp(56px, 9vw, 120px);
}

.kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.glimpse h2,
.closing h2 {
  font: 600 clamp(2.1rem, 1.2rem + 3vw, 3.5rem) / 1.05 var(--font-display);
  letter-spacing: -0.04em;
  color: var(--text);
  text-wrap: balance;
}

.glimpse h2 {
  margin-top: 0.8rem;
}

.glimpse h2 em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.01em;
  padding-right: 0.06em;
  background: linear-gradient(100deg, var(--leaf-2), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-lede {
  margin-top: 0.9rem;
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(32px, 5vw, 56px);
}

.card {
  position: relative;
  padding: 26px 24px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(24, 33, 27, 0.92), rgba(15, 21, 17, 0.92));
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.3s,
    transform 0.5s var(--ease-out);
}

/* A soft light that follows the pointer. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(132, 221, 157, 0.12), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover {
  border-color: var(--line-2);
}

.card:hover::before {
  opacity: 1;
}

.num {
  position: absolute;
  top: 24px;
  right: 24px;
  font: 500 0.8rem/1 var(--font-display);
  letter-spacing: 0.12em;
  color: var(--dim);
}

.icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(82, 196, 121, 0.22);
  border-radius: 14px;
  background: rgba(82, 196, 121, 0.08);
  color: var(--leaf-2);
}

.icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin: 1.5rem 0 0.45rem;
  font: 600 1.35rem/1.2 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--text);
}

.card p {
  font-size: 0.95rem;
  text-wrap: pretty;
}

.card-locked {
  background:
    repeating-linear-gradient(135deg, rgba(214, 247, 221, 0.025) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, rgba(24, 33, 27, 0.92), rgba(15, 21, 17, 0.92));
}

.card-locked .icon {
  border-color: rgba(250, 171, 63, 0.3);
  background: rgba(250, 171, 63, 0.08);
  color: var(--amber);
}

.card-locked::before {
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(250, 171, 63, 0.1), transparent 45%);
}

.redact {
  margin: 0.2rem 0 0.9rem;
}

.redact span {
  display: block;
  height: 10px;
  margin-top: 9px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(214, 247, 221, 0.07), rgba(214, 247, 221, 0.17), rgba(214, 247, 221, 0.07));
  background-size: 200% 100%;
  animation: shimmer 2.6s linear infinite;
}

.redact span:nth-child(1) {
  width: 94%;
}

.redact span:nth-child(2) {
  width: 78%;
  animation-delay: 0.2s;
}

.redact span:nth-child(3) {
  width: 52%;
  animation-delay: 0.4s;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* ---------- Closing: a literal sunrise ---------- */

.closing {
  position: relative;
  margin-bottom: clamp(24px, 4vw, 48px);
  padding: clamp(72px, 10vw, 128px) 24px clamp(150px, 19vw, 230px);
  border: 1px solid var(--line);
  border-radius: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, #0e1511, #141c17);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.closing-copy {
  position: relative;
  z-index: 2;
}

.closing p {
  margin: 1rem auto 2rem;
  max-width: 28em;
  font-size: 1.05rem;
  text-wrap: balance;
}

.sunrise {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: min(460px, 76%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff4cf 0%, #fde68a 24%, #fbbf24 46%, #f97316 63%, rgba(249, 115, 22, 0.35) 67%, rgba(249, 115, 22, 0) 71%);
  transform: translate(-50%, 78%);
  transition: transform 2.4s var(--ease-out);
}

.closing.is-in .sunrise {
  transform: translate(-50%, 64%);
}

.sunrise::after {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(251, 191, 36, 0.28), transparent);
  z-index: -1;
}

.rays {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 0;
  width: 1600px;
  height: 1600px;
  margin-left: -800px;
  margin-bottom: -800px;
  background: repeating-conic-gradient(from 0deg, rgba(251, 191, 36, 0.06) 0deg 3deg, transparent 3deg 12deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 15%, transparent 60%);
  mask-image: radial-gradient(closest-side, #000 15%, transparent 60%);
  animation: spin 120s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 8px 40px;
  font-size: 0.85rem;
  color: var(--dim);
}

.footer a {
  text-decoration: none;
  color: var(--muted);
}

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

/* ---------- Reveal on scroll ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 8px;
  }

  .stage {
    max-width: 600px;
    width: 100%;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .nav-tag {
    display: none;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .fine {
    margin-left: 0.4rem;
  }
}

@media (max-width: 480px) {
  .field {
    flex-direction: column;
    border-radius: 22px;
  }

  .field input {
    padding: 14px 14px;
  }

  .field button {
    width: 100%;
    padding-block: 15px;
  }

  .countdown-units span {
    min-width: 0;
    flex: 1;
  }

  .hud .chip {
    padding: 6px 10px;
    font-size: 0.72rem;
  }
}

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

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pulse::after {
    display: none;
  }

  .redact span,
  .rays,
  .thanks {
    animation: none;
  }

  .sunrise,
  .closing.is-in .sunrise {
    transition: none;
    transform: translate(-50%, 64%);
  }
}
