/* ---------- Base + Theme ---------- */
:root {
  --bg: #090b10;
  --bg-soft: #151822;
  --panel: #181c28;
  --border: #262b3a;
  --text: #ffffff;
  --muted: #a5adbf;
  --accent: #8b80ff;   /* purple tag */
  --cta: #ffd54a;      /* yellow button */
  --cta-hover: #ffca28;
  --danger: #ff6b6b;
  --ok: #67e8a6;
}

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

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background:
    radial-gradient(1200px 1200px at 50% -10%, #191b27 0%, var(--bg) 55%)
    no-repeat,
    var(--bg);
  color: var(--text);
}

/* subtle geometric pattern */
.bg-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background:
    linear-gradient(60deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(-60deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 110px 110px;
}

/* ---------- Layout ---------- */

.page {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 56px;
  display: grid;
  gap: 32px;
  align-items: start;
}

@media (min-width: 880px) {
  .page {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    padding-top: 72px;
  }
}

/* ---------- Hero ---------- */

.hero-header {
  max-width: 540px;
}

.hero-tag {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-title {
  margin: 0 0 14px;
  font-size: 2.15rem;
  line-height: 1.25;
  font-weight: 800;
}

.hero-title span {
  display: inline-block;
}

.hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.hero-badges {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-badges li {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---------- Panel / Form ---------- */

.panel {
  background: linear-gradient(
      160deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0) 40%
    ),
    var(--panel);
  border-radius: 22px;
  border: 1px solid var(--border);
  padding: 22px 20px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  max-width: 420px;
  margin: 0 auto;
}

@media (min-width: 880px) {
  .panel {
    max-width: none;
  }
}

.panel-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
}

.panel-sub {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Form */

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.9rem;
  color: #e5e7f3;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--border);
  background-color: #10131c;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #737993;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 128, 255, 0.35);
  background-color: #0d1019;
}

.checkbox-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.checkbox-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Honeypot field (hidden) */
.honeypot {
  position: absolute;
  left: -5000px;
  opacity: 0;
  pointer-events: none;
}

/* Button */

.btn {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 11px 18px;
  border-radius: 999px;
  border: none;
  background-color: var(--cta);
  color: #111;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease,
    box-shadow 0.18s ease;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
}

.btn:hover {
  background-color: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.5);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.45);
}

.btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

/* Spinner in button */

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-top-color: rgba(0, 0, 0, 0.8);
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.loading .btn-spinner {
  display: inline-block;
}

.btn.loading .btn-label {
  opacity: 0.75;
}

/* Form message */

.form-footnote {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.form-message {
  margin: 8px 0 0;
  font-size: 0.86rem;
}

.form-message.ok {
  color: var(--ok);
}

.form-message.error {
  color: var(--danger);
}

/* Success box */

.success {
  text-align: left;
  margin-top: 16px;
  padding: 18px 16px;
  border-radius: 16px;
  background-color: #10131c;
  border: 1px solid rgba(103, 232, 166, 0.4);
}

.success-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(103, 232, 166, 0.16);
  color: var(--ok);
  font-weight: 800;
  margin-bottom: 10px;
}

.success h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.success p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Celebration modal */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: radial-gradient(circle at 20% 20%, rgba(255, 213, 74, 0.08), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(139, 128, 255, 0.08), transparent 30%),
    rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  max-width: 420px;
  width: min(100%, 420px);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0))
      padding-box,
    #10131c;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 20px 20px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal-backdrop.visible .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 213, 74, 0.14);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.modal-card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.modal-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.modal-btn {
  width: 100%;
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding: 0 20px 26px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Utilities ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
