:root {
  --bg: #212121;
  --surface: #2f2f2f;
  --surface-hover: #3a3a3a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #ececec;
  --text-secondary: #b4b4b4;
  --text-muted: #9b9b9b;
  --accent: #10a37f;
  --accent-hover: #1a7f64;
  --radius: 0.75rem;
  --radius-lg: 1.5rem;
  --radius-full: 9999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: "Söhne", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

/* OpenAI logo mark */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 48px;
  height: 48px;
  fill: var(--text);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Geo block */
.geo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Card */
.card {
  width: 100%;
  max-width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  overflow-wrap: break-word;
}

.card h1 {
  font-size: 1.375rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.card h1.hero-question {
  font-size: clamp(1.25rem, 4.5vw, 1.5rem);
  margin-bottom: 0.35rem;
  line-height: 1.25;
  text-wrap: balance;
}

.lead {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.lead.lead-tight {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Buttons */
.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: max(0.9375rem, 16px);
  font-weight: 500;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.btn:focus-visible,
.footnote a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.75rem 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Question section */
.question {
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 1rem;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.choice-row .btn-secondary {
  width: auto;
}

/* Promo section */
.hidden {
  display: none !important;
}

.promo {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn:active {
    transform: none;
  }

  .promo {
    animation: none;
  }
}

.promo p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.promo-intl-plain {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.chatgpt-note {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.chatgpt-note-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.chatgpt-note-body {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--text);
}

.modal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.25rem;
}

.modal-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.25rem;
}

.modal label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.modal input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: max(0.9375rem, 16px);
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: border-color 0.15s ease;
}

.modal input:focus {
  outline: none;
  border-color: var(--accent);
}

.modal input::placeholder {
  color: var(--text-muted);
}

.lead-error {
  font-size: 0.8125rem;
  color: #ef4444;
  text-align: center;
  margin-bottom: 0.75rem;
}

.modal .btn-primary {
  margin-top: 0.25rem;
}

.modal .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-skip {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.modal-skip:hover {
  color: var(--text);
}

/* Footer */
.footnote {
  margin-top: 2.5rem;
  max-width: 440px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}

.footnote a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.footnote a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.25rem;
    border-radius: var(--radius);
  }

  .brand {
    margin-bottom: 1.5rem;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.75rem 1.25rem 1.5rem;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 360px) {
  .choice-row {
    grid-template-columns: 1fr;
  }

  .choice-row .btn-secondary {
    width: 100%;
  }
}
