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

:root {
  --bg: #111113;
  --surface: #1a1a1e;
  --border: #2e2e33;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --text: #e4e4e7;
  --muted: #a1a1aa;
  --green: #22c55e;
  --error: #ef4444;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
nav a:hover { color: var(--text); }

/* ── Main ── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  max-width: 700px;
}

h1 span { color: var(--accent); }

p.lead {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  margin-left: 0.75rem;
  transition: border-color 0.15s, transform 0.1s;
}
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ── Features ── */
.features {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 5rem;
  max-width: 900px;
  width: 100%;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  flex: 1 1 200px;
  text-align: left;
}

.feature-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.feature h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.4rem; }
.feature p  { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ── Footer ── */
footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ── Login page ── */
body.login-page {
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
body.login-page footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

a.back {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s;
}
a.back:hover { color: var(--text); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.card-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.card h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.4rem; }
.card p.sub { font-size: 0.875rem; color: var(--muted); margin-bottom: 2rem; }

/* ── Header actions (Round 21 UX-3) ── */
nav { display: flex; align-items: center; gap: 0.6rem; }
.nav-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-hover); color: #fff; }
/* Red exit-door button — signs the displayed session out on the spot */
.nav-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 8px;
  color: var(--error);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nav-exit:hover { background: rgba(239, 68, 68, 0.12); border-color: var(--error); }

/* ── Login audience dropdown (Panel / Console) ── */
.select-wrap { position: relative; }
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  padding: 0.65rem 2.2rem 0.65rem 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
select:focus { border-color: var(--accent); }
select option { background: var(--surface); color: var(--text); }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field { margin-bottom: 1.1rem; }

input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
input:focus { border-color: var(--accent); }
input::placeholder { color: var(--muted); }

.btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.5rem;
}
.btn:hover  { background: var(--accent-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  margin-top: 1rem;
  display: none;
}

/* ── Contact Us (Round 22) ── */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 2.5rem;
  width: 100%;
  max-width: 960px;
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  text-align: left;
}
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; gap: 1.75rem; }
}

.contact[hidden] { display: none; }

.contact-info h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.contact-info p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.contact-mail {
  display: inline-block;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}
.contact-mail:hover { text-decoration: underline; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
@media (max-width: 560px) {
  .contact-row { grid-template-columns: 1fr; }
}

textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0.65rem 0.9rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
}
textarea:focus { border-color: var(--accent); }

input[type="file"] {
  width: 100%;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.4rem 0;
}
input[type="file"]::file-selector-button {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  margin-right: 0.6rem;
  cursor: pointer;
}

.attach-list { margin-top: 0.4rem; }
.attach-item {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.15rem 0;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.captcha-box { flex-shrink: 0; line-height: 0; }
.captcha-box svg { border-radius: 8px; display: block; }
.captcha-refresh {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.captcha-refresh:hover { color: var(--text); border-color: var(--accent); }
.captcha-row input { flex: 1; min-width: 0; }

/* Off-screen, not display:none — bots skip hidden inputs, humans never see it. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-note {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.9rem;
  min-height: 1.2em;
}
.form-note.ok  { color: var(--green); }
.form-note.err { color: var(--error); }
