/*
  voidful marketing site — design language

  Pulled straight from the app's own theme (lib/app/theme/voidful_theme.dart):
  a near-black #0C0C0C ground with near-black raised/surface layers and hairline
  #1B1B1B borders; Georgia for display headlines and a system sans for body,
  exactly as the app overrides them; small, restrained corner radii (the app's
  cards are ~8px, chips are stadiums); and the one splash of colour it allows
  itself — the chromatic "glitch rim" red/cyan/violet from the real app icon
  and home-screen orb, used only as thin edge/glow accents, never as fills.
  The mood is quiet: no glassmorphism sheen, no flashy cursor, no white-invert
  buttons — everything sits low-contrast on black until it needs attention.
*/

:root {
  /* Exact VoidfulColors from the app theme. */
  --black: #0c0c0c;
  --raised: #0f0f0f;
  --surface: #111111;
  --text: #e8e5e1;
  --muted: #8b8987;
  --disabled: #565452;
  --border: #1b1b1b;

  --red: #ff3b5c;
  --cyan: #2bffe0;
  --violet: #8a5cff;
  --blue-gray: #46515d;
  --amber: #75614a;

  /* Subtle raised/border fills used for chips, cards, controls. */
  --glass: rgba(255, 255, 255, 0.028);
  --glass-border: #1b1b1b;

  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Roboto, "Segoe UI", sans-serif;
  --mono: "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.625, 0.05, 0, 1);
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
}

* { box-sizing: border-box; }

html {
  background: var(--black);
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blue-gray); color: var(--text); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--disabled);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
  text-wrap: balance;
}

h1 { font-family: var(--serif); }
h2 { font-family: var(--serif); font-size: clamp(32px, 5vw, 54px); line-height: 1.15; }
h3 { font-family: var(--serif); font-size: clamp(22px, 3vw, 28px); line-height: 1.3; }

p { margin: 0; }

.lede {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--muted);
  max-width: 480px;
}

.wordmark {
  font-family: var(--sans);
  letter-spacing: 0.32em;
  text-transform: lowercase;
  color: var(--text);
  position: relative;
  z-index: 1;
}

/* ─── Sections ─────────────────────────────────────────────────────── */

section { position: relative; }

.stage {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 0 120px;
}

.stage-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}

@media (max-width: 900px) {
  .stage-grid { grid-template-columns: 1fr; text-align: center; }
  .stage-grid .col-copy { order: 1; }
  .stage-grid .col-visual { order: 2; }
}

.col-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .col-copy { align-items: center; }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.fade-up.is-visible { opacity: 1; transform: translateY(0); }
.fade-up.d1 { transition-delay: 0.08s; }
.fade-up.d2 { transition-delay: 0.18s; }
.fade-up.d3 { transition-delay: 0.28s; }
.fade-up.d4 { transition-delay: 0.38s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { transition: opacity 0.4s linear; transform: none; opacity: 1; }
}

/* ─── Hero ─────────────────────────────────────────────────────────── */

.hero { padding-top: 120px; }

.hero h1 {
  font-size: clamp(48px, 7.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.type-cursor {
  display: inline-block;
  width: 0.05em;
  margin-left: 0.08em;
  height: 0.82em;
  background: var(--text);
  vertical-align: -0.05em;
  animation: caretBlink 1s step-end infinite;
}

@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .type-cursor { animation: none; opacity: 1; }
}

.micro {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--disabled);
}

.col-visual {
  position: relative;
  height: clamp(420px, 52vw, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
}

.ring-canvas {
  position: absolute;
  inset: 0;
  margin: auto;
  will-change: transform;
}

.phone-frame {
  position: relative;
  width: clamp(190px, 20vw, 250px);
  border-radius: 3px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.phone-frame img {
  width: 100%;
  display: block;
}

/* ─── Scroll cue ───────────────────────────────────────────────────── */

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  color: var(--disabled);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: cueFloat 2.4s ease-in-out infinite;
}

@keyframes cueFloat {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
  50% { transform: translate(-50%, 6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}

/* ─── Scroll-pin (shared) ──────────────────────────────────────────────
   Desktop: the section pins in place while the page's own scroll drives
   its content (JS sets the wrapper's height and toggles is-scrolly),
   releasing back into normal scroll once fully shown. Mobile/touch/
   reduced-motion never gets is-scrolly — content just sits inline. Used
   by both the UI carousel and the Sense section. */
.scrolly-pin {
  position: relative;
}

.scrolly-pin-inner { position: relative; }

.scrolly-pin.is-scrolly .scrolly-pin-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ─── Carousel ─────────────────────────────────────────────────────── */

.carousel-scrollytell { padding: 120px 0; }
.carousel-scrollytell.is-scrolly { padding: 0; }

/* Soft gray highlight behind the phone row — most visible when the title
   shrinks away and the screenshots become the focal point. */
.carousel-scrollytell.is-scrolly .scrolly-pin-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 62%, rgba(255,255,255,0.05) 0%, transparent 100%);
}

.carousel-scrollytell.is-scrolly .container { position: relative; z-index: 1; }

.sense-scrollytell { padding: 100px 0 130px; }
.sense-scrollytell.is-scrolly { padding: 0; }

.carousel-track.is-scroll-driven {
  overflow: visible;
  scroll-snap-type: none;
  cursor: default;
  will-change: transform;
}

.carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}


.carousel-scrollytell.is-scrolly .carousel-body {
  opacity: 0;
  will-change: opacity;
}

/* Nav arrows are hidden until the screens fade in (JS drives their
   opacity in step with the carousel body). */
.carousel-scrollytell.is-scrolly .carousel-controls {
  opacity: 0;
  will-change: opacity;
}

.carousel-controls { display: flex; gap: 10px; }

.circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.circle-btn:hover { border-color: rgba(138, 92, 255, 0.4); background: rgba(255,255,255,0.06); }
.circle-btn:active { transform: scale(0.94); }

.carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 0 28px;
  margin: 0 -4px;
  cursor: grab;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:active { cursor: grabbing; }

.slide {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: min(280px, 72vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.slide .phone-frame { width: 100%; }

/* In the pinned carousel the screens are sized by height so the big title
   plus the row always fit within the viewport; width follows aspect. */
.carousel-scrollytell.is-scrolly .slide { width: auto; }

.carousel-scrollytell.is-scrolly .phone-frame {
  width: auto;
  height: clamp(320px, 52vh, 560px);
}

.carousel-scrollytell.is-scrolly .phone-frame img {
  width: auto;
  height: 100%;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.dots button {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  padding: 0;
  cursor: pointer;
  transition: background 0.3s var(--ease), width 0.3s var(--ease);
}

.dots button.active {
  background: var(--text);
  width: 20px;
  border-radius: 3px;
}

/* ─── Glass card ───────────────────────────────────────────────────── */

.glass-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--raised);
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}

/* ─── Privacy stat section ─────────────────────────────────────────── */

.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.stat-label {
  font-size: clamp(16px, 2vw, 22px);
  color: var(--muted);
  max-width: 520px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-top: 56px;
}

.trust-item {
  background: var(--raised);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trust-item .dot-row { display: flex; align-items: center; gap: 10px; }

.trust-item .status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.trust-item .status-dot.red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.trust-item .status-dot.cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.trust-item .status-dot.violet { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.trust-item .status-dot.white { background: var(--text); box-shadow: 0 0 8px rgba(255,255,255,0.5); }

.trust-item .claim { font-size: 14px; color: var(--text); }
.trust-item .detail { font-size: 12px; color: var(--disabled); line-height: 1.5; }

/* ─── Sense section ────────────────────────────────────────────────── */

.sense-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .sense-layout { grid-template-columns: 1fr; }
}

.sense-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sense-screenshot-frame {
  position: relative;
  width: clamp(180px, 20vw, 240px);
}

.sense-shot {
  display: block;
  width: 100%;
}

.sense-shot-settings { position: relative; }

.sense-shot-dashboard {
  position: absolute;
  inset: 0;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce), (max-width: 900px), (hover: none) {
  .sense-shot-settings { opacity: 0; }
  .sense-shot-dashboard { opacity: 1; }
}

.sense-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mini-card {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 20px 22px;
  background: var(--glass);
}

.mini-card h3 { font-size: 16px; margin-bottom: 6px; }
.mini-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ─── Tabs (the rest of it) ─────────────────────────────────────────── */

.tabs-head {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 40px 0 48px;
}

.tab-chip {
  font-family: var(--sans);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.tab-chip:hover { color: var(--text); }

.tab-chip.active {
  background: rgba(70, 81, 93, 0.45);
  color: var(--text);
  border-color: transparent;
}

/* All panels share one grid cell so the container auto-sizes to the
   tallest panel (no fixed min-height that clips on mobile); inactive
   panels crossfade out in place. */
.tab-panels { display: grid; }

.tab-panel {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.tab-panel.active { opacity: 1; pointer-events: auto; }

@media (max-width: 760px) {
  .tab-panel {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
    justify-items: center;
  }
}

/* Real device-to-device screen recordings, in the "Share" tab. */

.transit-real {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: nowrap;
}

.transit-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 140px;
}

.transit-video {
  width: 100%;
  max-width: 150px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--raised);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

.transit-caption-sm {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--disabled);
}


/* ─── Story-progress bar (vault trust detail) ──────────────────────── */

.story-bar {
  display: flex;
  gap: 5px;
  width: min(280px, 60vw);
  margin: 0 auto;
}

.story-bar span {
  height: 2px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}

.story-bar span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0.85;
  transition: transform 1.4s var(--ease);
}

.story-bar.is-visible span:nth-child(1)::after { transform: scaleX(1); }
.story-bar.is-visible span:nth-child(2)::after { transform: scaleX(0.55); }

/* ─── Footer / closing ─────────────────────────────────────────────── */

.closing { text-align: center; }

.closing .container { width: 100%; }

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.closing-ring {
  position: relative;
  width: 240px;
  height: 240px;
  max-width: 62vw;
  max-height: 62vw;
  margin-bottom: 4px;
}

.closing-wordmark {
  font-size: clamp(24px, 6vw, 40px);
  letter-spacing: clamp(0.12em, 1.5vw, 0.32em);
  white-space: nowrap;
}
.closing-lede { text-align: center; }

.badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 24px;
  border: 1px solid var(--border);
  background: var(--raised);
  border-radius: var(--r-sm);
  cursor: default;
}

.badge .store { font-size: 14px; color: var(--text); }
.badge .soon {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--disabled);
}

/* Quiet "beta testing soon" marker, matching the coming-soon tone. */
.beta-note {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--disabled);
}

.beta-email {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color 0.2s, text-decoration-color 0.2s;
}

.beta-email:hover {
  color: var(--text);
  text-decoration-color: var(--muted);
}

.foot {
  padding: 56px 0 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.foot-note {
  font-size: 12px;
  color: var(--disabled);
  max-width: 420px;
  line-height: 1.6;
}

/* ─── Screenshot backdrop: grid + chroma ambient lights ─────────────── */

.slide { position: relative; }

.slide::before,
.sense-visual::before {
  content: '';
  position: absolute;
  inset: -48px -32px;
  z-index: 0;
  border-radius: 28px;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 18% 22%, rgba(43,255,224,0.055) 0%, transparent 62%),
    radial-gradient(ellipse 65% 65% at 83% 78%, rgba(138,92,255,0.055) 0%, transparent 62%),
    radial-gradient(ellipse 48% 38% at 68% 10%, rgba(255,59,92,0.038) 0%, transparent 56%),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: auto, auto, auto, 34px 34px, 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 82% 82% at 50% 50%, black 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 82% at 50% 50%, black 35%, transparent 100%);
}

.slide .phone-frame { position: relative; z-index: 1; }

/* ─── Mobile polish ────────────────────────────────────────────────────
   The scroll-jack layouts (pinned carousel / sense) never engage below
   901px — JS falls back to plain in-flow sections there — so these rules
   just tune the ordinary responsive flow: tighter vertical rhythm, a
   smaller hero ring, and swipe-only carousel controls. */
@media (hover: none) {
  .carousel-controls { display: none; }
}

@media (max-width: 900px) {
  .col-visual { height: clamp(300px, 68vw, 460px); }
  .hero { padding-top: 96px; }
  .sense-scrollytell { padding: 80px 0 96px; }
  .carousel-scrollytell { padding: 80px 0; }
  .carousel-head { margin-bottom: 32px; }
}

@media (max-width: 640px) {
  .stage { padding: 104px 0 88px; }
  #privacy, #rest { padding: 72px 0 88px !important; }
  .tabs-head { margin: 32px 0 36px; }
  .trust-grid { margin-top: 40px; }
  .mini-card { padding: 18px 18px; }
}
