/* Modern, monochrome “OpenAI/Cursor-ish” landing page styling. */
:root {
  color-scheme: light dark;

  --bg: #fcfcfd;
  --bg2: #f3f5f8;
  --ink: #0b0d10;
  --muted: rgba(11, 13, 16, 0.7);
  --muted2: rgba(11, 13, 16, 0.56);

  --card: rgba(255, 255, 255, 0.72);
  --border: rgba(2, 6, 23, 0.12);
  --shadow: 0 18px 56px rgba(2, 6, 23, 0.1);
  --grid: rgba(2, 6, 23, 0.08);

  --focus: rgba(2, 6, 23, 0.24);
  --header-bg: rgba(252, 252, 253, 0.74);
  --hover-bg: rgba(2, 6, 23, 0.04);
  --hover-border: rgba(2, 6, 23, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070a0f;
    --bg2: #0b1220;
    --ink: rgba(248, 250, 252, 0.96);
    --muted: rgba(248, 250, 252, 0.72);
    --muted2: rgba(248, 250, 252, 0.58);

    --card: rgba(255, 255, 255, 0.04);
    --border: rgba(148, 163, 184, 0.18);
    --shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
    --grid: rgba(148, 163, 184, 0.12);

    --focus: rgba(248, 250, 252, 0.24);
    --header-bg: rgba(7, 10, 15, 0.66);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --hover-border: rgba(148, 163, 184, 0.18);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--ink);
  letter-spacing: -0.01em;
  overflow-x: hidden;
  /* Use the full viewport height and place footer at bottom */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(127, 127, 127, 0.35);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: rgba(127, 127, 127, 0.7); }

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 20% 0%, rgba(2, 6, 23, 0.06), transparent 60%),
    radial-gradient(900px 520px at 80% 10%, rgba(2, 6, 23, 0.05), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.25;
  mask-image: radial-gradient(closest-side at 50% 18%, rgba(0, 0, 0, 0.55), transparent 72%);
  pointer-events: none;
}

.container {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(127, 127, 127, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mark-img {
  width: 32px;
  height: 32px;
  display: block;
  /* Default to dark mark on light UI */
  filter: invert(1);
}

.wordmark {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 16px;
}

.nav { display: flex; gap: 14px; }
.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-link:hover {
  color: var(--ink);
  background: var(--hover-bg);
  border: 1px solid var(--hover-border);
  padding: 7px 9px; /* compensate for border */
}

.main {
  /* Fill remaining height under the sticky header */
  flex: 1;
  display: flex;
  align-items: center;
  padding: 32px 0 56px 0;
}

.hero {
  padding-top: 0;
  padding-bottom: 0;
  /* Keep the hero composition tight on wide screens */
  max-width: 1080px;
  margin-inline: auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-media {
  min-width: 0;
  /* Make the image feel intentional on mobile */
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(127, 127, 127, 0.16);
  box-shadow: var(--shadow);
  background: rgba(127, 127, 127, 0.06);
}

.hero-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0.92;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(127, 127, 127, 0.18);
  background: rgba(127, 127, 127, 0.06);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.08);
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  color: rgba(0, 128, 255, 0.72);
  background-color: rgba(0, 128, 255, 0.96);
  opacity: 0.85;
}

.title {
  margin: 18px 0 12px 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 850;
  /* Improve readability + reduce “left-heavy / empty-right” feel */
  max-width: 26ch;
}

.subtitle {
  margin: 0 0 16px 0;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 36ch;
}

.title-em {
  color: rgba(0, 128, 255, 0.96);
}

.cta {
  display: flex;
  gap: 10px;
  width: min(520px, 100%);
  margin-top: 16px;
}

input[type="email"] {
  flex: 1;
  height: 44px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 12px;
  border: 1px solid rgba(127, 127, 127, 0.22);
  background: rgba(127, 127, 127, 0.06);
  color: var(--ink);
  padding: 0 14px;
  font-size: 14px;
  line-height: 1.2;
  outline: none;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

input[type="email"]::placeholder { color: var(--muted2); }
input[type="email"]:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(127, 127, 127, 0.22);
}

button {
  height: 44px;
  padding: 0 14px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 12px;
  border: 1px solid rgba(127, 127, 127, 0.22);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.18);
}

button:hover { filter: brightness(1.02); }
button:active { transform: translateY(1px); }

.fineprint {
  margin: 12px 0 0 0;
  color: var(--muted2);
  font-size: 13px;
  line-height: 1.55;
}

.footer {
  padding: 18px 0 26px 0;
  border-top: 1px solid rgba(127, 127, 127, 0.16);
  color: var(--muted2);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-sep { opacity: 0.7; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(127, 127, 127, 0.16);
  background: rgba(127, 127, 127, 0.08);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.16);
  color: var(--muted);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  max-width: min(560px, calc(100% - 24px));
  text-align: center;
}

.toast[data-open="1"] { opacity: 1; }

@media (prefers-color-scheme: dark) {
  /* In dark mode we want the original (light) mark */
  .mark-img { filter: none; }
  button { color: rgba(2, 6, 23, 0.9); }
}

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

@media (max-width: 860px) {
  /* On smaller screens, prefer a standard top flow */
  .main { align-items: flex-start; padding: 40px 0 64px 0; }
}

@media (max-width: 520px) {
  .container { width: min(1080px, calc(100% - 28px)); }
  .cta { flex-direction: column; }
  button, input[type="email"] { width: 100%; }

  /* iOS/Android: make the email input feel tappable and avoid iOS zoom */
  button, input[type="email"] {
    height: 52px;
    border-radius: 14px;
    font-size: 16px;
  }

  /* In column layout, don't let flex control the height */
  input[type="email"],
  .cta button {
    flex: 0 0 auto;
  }
}

@media (min-width: 1100px) {
  /* Slightly tighter vertical rhythm on large displays */
  .main { padding: 32px 0 64px 0; }

  .hero-grid {
    grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
    gap: 48px;
  }

  .hero-media {
    aspect-ratio: 4 / 3;
    max-height: min(520px, calc(100svh - 220px));
  }
}