:root {
  --bg: #202124;
  --surface: #303134;
  --surface-soft: #3c4043;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --blue: #8ab4f8;
  --shadow: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.center-stack {
  width: min(100%, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-7.5vh);
}

.logo {
  margin: 0 0 24px;
  font-family: Arial, sans-serif;
  font-size: clamp(4.3rem, 11vw, 5.8rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.logo-b { color: #8ab4f8; }
.logo-r { color: #f28b82; }
.logo-y { color: #fdd663; }
.logo-g { color: #81c995; }

.search-shell {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface);
}

.search-shell:focus-within {
  border-color: var(--surface-soft);
  box-shadow: 0 2px 10px var(--shadow);
}

.search-icon,
.tool-icon,
.sparkle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.search-icon svg,
.tool-icon svg,
.sparkle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.search-tools {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.accent-blue,
.sparkle {
  color: var(--blue);
}

.ai-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid #5f6368;
  color: var(--text);
  white-space: nowrap;
}

.ai-label {
  font-size: 14px;
}

.cta-row {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.action-btn,
.submit-btn {
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid #3c4043;
  border-radius: 4px;
  background: #303134;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.action-btn:hover,
.submit-btn:hover,
.action-btn:focus-visible,
.submit-btn:focus-visible {
  border-color: #5f6368;
  background: #36383b;
  outline: none;
}

.languages {
  margin: 28px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.languages a {
  margin-left: 8px;
  color: var(--blue);
  text-decoration: none;
}

.languages a:hover,
.languages a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 36, 0.76);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: min(92vw, 440px);
  margin: 10vh auto 0;
  padding: 28px 24px 24px;
  border: 1px solid #3c4043;
  border-radius: 20px;
  background: #202124;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
}

.modal-panel h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.modal-copy {
  margin: 12px 0 0;
  color: #bdc1c6;
  font-size: 15px;
  line-height: 1.55;
}

.waitlist-form {
  margin-top: 22px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #5f6368;
  border-radius: 12px;
  background: #303134;
  color: var(--text);
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(138, 180, 248, 0.16);
}

.submit-btn {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  border-radius: 12px;
  background: var(--blue);
  border-color: var(--blue);
  color: #202124;
  font-weight: 700;
}

.submit-btn.secondary {
  background: #303134;
  border-color: #3c4043;
  color: var(--text);
}

.form-note,
.form-error {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.form-note {
  color: var(--muted);
}

.form-error {
  color: #f28b82;
}

@media (max-width: 767px) {
  .hero {
    padding: 20px;
  }

  .center-stack {
    width: 100%;
    transform: translateY(-5vh);
  }

  .logo {
    margin-bottom: 18px;
    font-size: clamp(3.6rem, 18vw, 4.8rem);
  }

  .search-shell {
    min-height: 56px;
    padding: 10px 14px 10px 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px 12px;
    border-radius: 28px;
  }

  .search-input {
    order: 2;
    width: calc(100% - 34px);
    flex: 0 0 calc(100% - 34px);
    height: 26px;
  }

  .search-tools {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
  }

  .ai-mode {
    padding-left: 10px;
  }

  .cta-row {
    margin-top: 22px;
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .action-btn {
    width: min(100%, 280px);
  }

  .languages {
    max-width: 320px;
    margin-top: 22px;
    font-size: 12.5px;
  }

  .modal-panel {
    width: min(94vw, 440px);
    margin-top: 7vh;
    padding: 24px 18px 20px;
    border-radius: 18px;
  }
}
