/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg: #0a0a0a;
  --surface: #ffffff;
  --fg: #ffffff;
  --fg-dark: #1a1a1a;
  --muted: #a0a0a0;
  --muted-dark: #6b6b6b;
  --accent: #d4854a;
  --overlay-bg: #080808;
  --overlay-opacity: 0.6;

  --font: 'Inter', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input { font: inherit; border: none; outline: none; background: none; }

/* ============================================================
   VIDEO BACKGROUND
   ============================================================ */
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay-bg);
  opacity: var(--overlay-opacity);
  z-index: 1;
}

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  padding: 32px 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
}
.logo svg {
  height: 38px;
  width: auto;
}

/* ============================================================
   MAIN — two-column hero
   ============================================================ */
.main {
  flex: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  padding: 0 48px 40px;
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* LEFT — copy + form */
.hero-copy {
  max-width: 780px;
}
.hero-headline {
  font-family: var(--font);
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 20px;
  color: var(--fg);
}
.hero-sub {
  font-size: 18px;
  font-weight: 400;
  line-height: 32px;
  color: var(--fg);
  margin-bottom: 32px;
  max-width: 550px;
}

/* ============================================================
   EMAIL FORM — pill border around input only, button separate
   ============================================================ */
.waitlist-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  max-width: 600px;
}
.waitlist-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  border: 2px solid #cdd6de;
  border-radius: 30px;
  height: 60px;
  padding: 0 24px;
  transition: border-color 0.2s;
}
.waitlist-input-wrap:focus-within {
  border-color: var(--fg);
}
.waitlist-input-wrap.error {
  border-color: #e74c3c;
}
.waitlist-input {
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 18px;
  font-weight: 400;
  line-height: 36px;
}
.waitlist-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.waitlist-btn {
  padding: 12px 48px;
  background: var(--fg);
  color: #000000;
  font-weight: 500;
  font-size: 18px;
  line-height: 36px;
  border-radius: 30px;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  flex-shrink: 0;
  height: 60px;
}
.waitlist-btn .btn-short { display: none; }
.waitlist-btn:hover {
  background: var(--fg);
}
.waitlist-btn:active {
  transform: scale(0.97);
}

/* Success state — green pill banner per Figma */
.form-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 24px 12px 16px;
  margin-bottom: 16px;
  max-width: 600px;
  background: rgba(0, 215, 136, 0.3);
  border-radius: 30px;
}
.form-success.visible {
  display: flex;
}
.form-success .check-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-success .check-icon svg {
  width: 36px;
  height: 36px;
}
.form-success span {
  font-size: 18px;
  font-weight: 600;
  line-height: 36px;
  color: var(--fg);
  white-space: nowrap;
}

/* Error message */
.form-error {
  display: none;
  font-size: 13px;
  color: #e74c3c;
  margin-top: -8px;
  margin-bottom: 8px;
}
.form-error.visible {
  display: block;
}

.privacy-note {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--fg);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  max-width: 560px;
}
/* Custom checkbox: white outline, white check — 24x24, 1px border, 8px radius per Figma */
.privacy-note input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: 1px solid var(--fg);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  position: relative;
  margin-top: 0;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.privacy-note input[type="checkbox"]:checked {
  border-color: var(--fg);
}
.privacy-note input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 7px;
  height: 12px;
  border: solid var(--fg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.privacy-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.privacy-note.error input[type="checkbox"] {
  border-color: #e74c3c;
}
.privacy-note.error {
  color: #e74c3c;
}

/* ============================================================
   RIGHT — phone + card mockups
   Card overlaps phone bottom-right corner
   ============================================================ */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 520px;
}

.mockup-cluster {
  position: relative;
  width: 420px;
  height: 560px;
}

.mockup-phone {
  position: absolute;
  left: 20px;
  top: 0;
  z-index: 1;
  width: 250px;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
}
.mockup-phone img {
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.mockup-card {
  position: absolute;
  left: 130px;
  bottom: -20px;
  z-index: 2;
  width: 210px;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.45));
}
.mockup-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Mockup entrance animations */
.mockup-phone {
  opacity: 0;
  transform: translateX(-30px) translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.mockup-card {
  opacity: 0;
  transform: translateX(30px) translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}
.hero-visual.visible .mockup-phone,
.hero-visual.visible .mockup-card {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* ============================================================
   FEATURES STRIP
   ============================================================ */
.features {
  padding: 28px 48px;
  display: flex;
  gap: 40px;
  flex-shrink: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--fg);
}
.feature-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.feature-icon svg {
  width: 100%;
  height: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 20px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  color: var(--fg);
  flex-shrink: 0;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  color: var(--fg);
  opacity: 0.5;
  text-decoration: none;
}
.footer-links a:hover {
  opacity: 1;
}
.footer a {
  color: var(--fg);
  text-decoration: none;
}
.footer a:hover {
  opacity: 0.8;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-social a {
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.footer-social a:hover {
  opacity: 0.8;
}
.footer-social svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 24px;
  z-index: 100;
  background: var(--surface);
  border-radius: 90px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: #000000;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  height: 64px;
  max-width: 999px;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.hidden {
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
}
.cookie-text {
  flex: 1;
  color: #000000;
}
.cookie-text .cookie-text-short { display: none; }
.cookie-text a {
  font-weight: 500;
  color: #000000;
  text-decoration: none;
}
.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}
.cookie-btn {
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: background 0.2s, transform 0.1s;
  background: #010101;
  color: var(--surface);
  white-space: nowrap;
}
.cookie-btn:active { transform: scale(0.97); }
.cookie-btn:hover { background: #333; }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up-d1 { transition-delay: 0.08s; }
.fade-up-d2 { transition-delay: 0.16s; }
.fade-up-d3 { transition-delay: 0.24s; }

/* ============================================================
   TABLET — ≤ 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .header { padding: 24px 32px; }
  .main { padding: 0 32px 32px; gap: 32px; }
  .waitlist-btn .btn-full { display: none; }
  .waitlist-btn .btn-short { display: inline; }
  .mockup-cluster { width: 350px; height: 480px; }
  .mockup-phone { width: 210px; left: 10px; }
  .mockup-card { width: 180px; left: 110px; }
  .features { padding: 24px 32px; gap: 28px; }
  .footer { padding: 16px 32px; }
}

/* ============================================================
   MOBILE — ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  /* Video covers only top hero portion, not full screen */
  .video-bg {
    position: absolute;
    height: 852px;
  }

  /* Body background white so bottom section is white */
  body { background: var(--surface); }

  /* Header: logo 131x28 at 24,24 */
  .header { padding: 24px 24px; }
  .logo svg { height: 28px; }

  .main {
    grid-template-columns: 1fr;
    padding: 0 24px 0;
    gap: 0;
    align-items: start;
  }

  /* Hero copy — large gap from logo to headline per Figma (logo bottom ~52px, headline at 330px) */
  .hero-copy { max-width: 100%; order: 1; padding-top: 250px; }
  .hero-headline {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 24px;
  }
  .hero-sub {
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 24px;
    max-width: 324px;
  }

  /* Form: button INSIDE the input pill on mobile */
  .waitlist-form {
    gap: 0;
    position: relative;
    margin-bottom: 16px;
  }
  .waitlist-input-wrap {
    width: 100%;
    flex: 1;
    padding: 0 24px;
    height: 60px;
    border-width: 2px;
  }
  .waitlist-input {
    font-size: 18px;
    line-height: 36px;
  }
  .waitlist-btn {
    position: absolute;
    right: 0;
    top: 0;
    padding: 12px 24px;
    font-size: 18px;
    height: 60px;
    z-index: 2;
  }
  .waitlist-btn .btn-full { display: none; }
  .waitlist-btn .btn-short { display: inline; }

  /* Privacy: 12px/16px per Figma, checkbox 24x24 same as desktop */
  .privacy-note { font-size: 12px; line-height: 16px; }
  .privacy-note input[type="checkbox"] {
    width: 24px; height: 24px; min-width: 24px;
    border-radius: 8px;
  }

  /* Mockups — on white background below the video area */
  .hero-visual {
    order: 2;
    min-height: 400px;
    margin-top: 40px;
    padding-top: 40px;
  }
  .mockup-cluster { width: 280px; height: 400px; }
  .mockup-phone {
    width: 173px;
    left: 16px;
    top: 0;
    /* smaller shadow on mobile so its left edge can't reach the viewport
       edge and get clipped by body { overflow-x: hidden } */
    filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.42));
  }
  .mockup-phone img { border-radius: 24px; }
  .mockup-card { width: 136px; left: 121px; bottom: 10px; }
  .mockup-card img { border-radius: 15px; }

  /* White background section below video overlay */
  .features {
    flex-direction: column;
    padding: 32px 24px;
    gap: 12px;
    background: var(--surface);
  }
  .feature-item {
    font-size: 16px;
    line-height: 24px;
    color: #0a0a0a;
    gap: 8px;
  }
  .feature-icon { width: 24px; height: 24px; }
  /* icons use stroke="white" on their paths — recolor the shapes, not just the <svg> */
  .feature-icon svg * { stroke: #0a0a0a; }

  /* Footer on white background — mobile layout:
     Row 1: links (gray)
     [gap]
     Row 2: Contact (black, left) + X icon (right)
     Row 3: © copyright (gray, left) */
  .footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 24px 24px 32px;
    text-align: left;
    font-size: 14px;
    line-height: 24px;
    color: #777;
    background: var(--surface);
  }
  .footer-left {
    display: contents;
  }
  .footer-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
    font-size: 14px;
    margin-bottom: 48px;
    order: 1;
  }
  .footer-links a { color: #777; opacity: 1; }
  .footer-right a { color: #000; }
  .footer-left > span {
    color: #777;
    order: 3;
    width: 100%;
  }
  .footer-right {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    order: 2;
    margin-bottom: 0;
  }
  .footer-right > span { color: #000; }
  .footer-social a { color: #000; }
  .footer-social svg { width: 24px; height: 24px; }

  /* Cookie: 76px tall, radius 15px, text + buttons side-by-side */
  .cookie-banner {
    bottom: 16px; left: 16px; right: 16px;
    border-radius: 15px;
    height: 76px;
    flex-direction: row;
    padding: 8px 12px;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    align-items: center;
  }
  .cookie-text {
    font-size: 14px;
    line-height: 20px;
    flex: 1;
  }
  /* Show short text, hide long text on mobile */
  .cookie-text .cookie-text-full { display: none; }
  .cookie-text .cookie-text-short { display: inline; }
  .cookie-actions {
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    width: auto;
  }
  .cookie-btn {
    text-align: center;
    padding: 6px 24px;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
  }
  /* On mobile, Accept on top, Reject below */
  #cookie-accept { order: -1; }
}

/* ============================================================
   SMALL MOBILE — ≤ 390px
   ============================================================ */
@media (max-width: 390px) {
  .hero-headline { font-size: 42px; }
}
