/* ============================================================
   TOKENS

   One accent color: #1fcd9e. Everything else is grayscale.
   Inspired by Apple's cinematic restraint, Linear's dark-native
   luminance stepping, and Superhuman's confident minimalism.
   ============================================================ */
:root {
  /* Accent — the only chromatic color */
  --green:          #1fcd9e;
  --green-hover:    #3dd9af;
  --green-dim:      rgba(31, 205, 158, 0.06);
  --green-glow:     rgba(31, 205, 158, 0.12);

  /* Feedback */
  --error:          #ff453a;  /* iOS systemRed */

  /* Surfaces */
  --bg:             #000000;
  --surface-1:      rgba(255, 255, 255, 0.03);
  --surface-2:      rgba(255, 255, 255, 0.05);

  /* Borders — semi-transparent white, never solid */
  --border-subtle:  rgba(255, 255, 255, 0.07);
  --border:         rgba(255, 255, 255, 0.12);
  --border-focus:   rgba(31, 205, 158, 0.3);

  /* Text — Apple-style hierarchy */
  --text-primary:   #f5f5f7;  /* Apple near-white */
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary:  rgba(255, 255, 255, 0.35);

  /* Typography */
  --font-sans:  "SF Pro Display", "SF Pro Text",
                -apple-system, BlinkMacSystemFont, "Segoe UI",
                Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "New York Extra Large", "New York",
                "Iowan Old Style", "Apple Garamond", Baskerville,
                "Times New Roman", ui-serif, serif;

  /* Radius — binary system (Superhuman-inspired) */
  --radius:     8px;
  --radius-lg:  16px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.069) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  color: var(--text-primary);
  line-height: 1.47;  /* Apple body default */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  /* Apple-style universal negative tracking */
  letter-spacing: -0.022em;
}

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

/* ============================================================
   LAYOUT
   ============================================================ */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   NAV — mobile base
   ============================================================ */
.nav {
  padding: 14px 0;
}

.nav__logo {
  height: 56px;
  width: auto;
  display: block;
}

/* ============================================================
   MAIN GRID — stacked mobile, side-by-side desktop
   ============================================================ */
.main {
  flex: 1;
  overflow: hidden;
}

.main__grid {
  display: flex;
  flex-direction: column;
}

.main__content {
  position: relative;
  z-index: 1;
}

.main__asset {
  position: relative;
  padding-top: 40px;
  overflow: hidden;
  max-height: 560px;
}

/* Fade-to-black at the bottom of the phone */
.main__asset::after {
  content: "";
  position: absolute;
  bottom: -4px;           /* slight offset to cover the crop edge */
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(to bottom, transparent, var(--bg) 90%);
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   HERO — mobile base, 3-tier hierarchy
   Tier 1: sub     — smallest, muted, context
   Tier 2: tagline — bold, main message
   Tier 3: brand   — largest, serif, green accent
   ============================================================ */
.hero {
  position: relative;
  padding: 24px 0 0;
  overflow: hidden;
}

/* The glow */
.hero::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 30%;
  width: 500px;
  height: 400px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(31, 205, 158, 0.07) 0%,
    rgba(31, 205, 158, 0.02) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* Tier 1: context line — same font as waitlist desc */
.hero__sub {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: -0.022em;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* Tier 2: main tagline */
.hero__tagline {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.032em;
  color: var(--text-primary);
  margin: 0;
}

/* Tier 3: brand name — serif, green, ~15% smaller than tagline */
.hero__brand {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--green);
  /* Optical alignment: serif "F" overshoots left, nudge right */
  margin-left: 0.04em;
}

/* ============================================================
   WAITLIST SECTION — mobile base
   ============================================================ */
.waitlist-section {
  padding: 28px 0 0;
}

.waitlist-section__label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.waitlist-section__desc {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 380px;
}

/* ============================================================
   FORM — mobile: stacked
   ============================================================ */
.waitlist-form {
  max-width: 420px;
}

.waitlist-form__row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.waitlist-form__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;     /* iOS no-zoom */
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  letter-spacing: -0.022em;
}

.waitlist-form__input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-dim);
}

.waitlist-form__input::placeholder {
  color: var(--text-tertiary);
}

.waitlist-form__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--bg);
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.waitlist-form__button:hover {
  background: var(--green-hover);
}

.waitlist-form__button:active {
  transform: scale(0.97);
}

.waitlist-form__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Honeypot */
.honeypot {
  position: absolute; left: -9999px;
  opacity: 0; height: 0; width: 0;
  pointer-events: none;
}

/* Spinner (dark on green bg) */
.loader {
  width: 14px; height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* Status message */
.waitlist-form__message {
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 400;
  min-height: 1.3em;
  letter-spacing: -0.01em;
}

.waitlist-form__message--success { color: var(--green); }
.waitlist-form__message--error   { color: var(--error); }

/* ============================================================
   ASSET — 3D perspective, cropped at bottom
   ============================================================ */
.asset__perspective {
  perspective: 1200px;
  max-width: 320px;
  margin: 0 auto;
}

.asset__img {
  width: 100%;
  aspect-ratio: 428 / 868;
  background-image: url('../assets/preview.svg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: top center;
  transform: rotateY(-12deg) rotateX(4deg);
  transform-origin: top center;
  filter: drop-shadow(0 8px 32px rgba(31, 205, 158, 0.06));
  transition: transform 0.4s ease;
}

.asset__img:hover {
  transform: rotateY(-6deg) rotateX(2deg);
}



/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 24px 0;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copy {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-tertiary);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer__social {
  color: var(--text-tertiary);
  transition: color 0.15s;
  display: flex;
}

.footer__social:hover {
  color: var(--text-primary);
}

.footer__link {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__sep {
  display: none;
}

/* ============================================================
   TABLET — min-width: 540px
   ============================================================ */
@media (min-width: 540px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding: 80px 0 48px;
  }

  .hero__tagline {
    font-size: 2.6rem;
  }

  .hero__brand {
    font-size: 2.8rem;
  }

  .hero::before {
    width: 700px;
    height: 500px;
  }

  .waitlist-form__row {
    flex-direction: row;
  }

  .waitlist-form__input {
    flex: 1;
    width: auto;
  }

  .waitlist-form__button {
    width: auto;
    padding: 12px 28px;
  }
}

/* ============================================================
   DESKTOP — min-width: 768px
   Side-by-side: content left, device mockup right
   ============================================================ */
@media (min-width: 768px) {
  /* Lock desktop to viewport — no scroll */
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .page {
    position: relative;
    height: 100vh;
  }

  .footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: none;
    padding: 16px 0;
  }

  .container {
    padding: 0 32px;
    max-width: 1200px;
  }

  .nav {
    padding: 18px 0;
  }

  .main__grid {
    flex-direction: row;
    align-items: center;
    gap: 40px;
    min-height: calc(100vh - 120px);
  }

  .main__content {
    flex: 1;
    min-width: 0;
  }

  .main__asset {
    flex: 0 0 300px;
    padding-top: 20px;   /* room for 3D tilt top edge */
    max-height: 620px;
  }

  .asset__perspective {
    max-width: 300px;
    margin: 0;
  }

  .hero {
    padding: 0 0 36px;
  }

  .hero__sub {
    font-size: 0.9rem;
  }

  .hero__tagline {
    font-size: clamp(2.2rem, 3vw, 2.8rem);
  }

  .hero__brand {
    font-size: clamp(2.4rem, 3.2vw, 3rem);
  }

  .hero::before {
    width: 600px;
    height: 400px;
    top: 40%;
    left: 30%;
  }

  .waitlist-section {
    padding: 28px 0 0;
  }

  .waitlist-section__desc {
    margin-bottom: 32px;
  }

  .waitlist-form {
    max-width: 420px;
  }

}

/* ============================================================
   LARGE DESKTOP — min-width: 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .main__asset {
    flex: 0 0 340px;
    max-height: 620px;
  }

  .asset__perspective {
    max-width: 340px;
  }

  .hero__tagline {
    font-size: clamp(2.6rem, 3.2vw, 3rem);
  }

  .hero__brand {
    font-size: clamp(2.8rem, 3.5vw, 3.4rem);
  }

  .main__grid {
    gap: 56px;
  }
}
