/* ─── Reset & Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #09090e;
  --surface:     #13131c;
  --surface-2:   #1a1a26;
  --border:      #1e1e2e;
  --border-gold: rgba(200, 160, 40, 0.18);
  --gold:        #c8a028;
  --gold-hover:  #e6b83a;
  --gold-dim:    #8a6a10;
  --gold-glow:   rgba(200, 160, 40, 0.15);
  --text:        #e8dfc8;
  --text-muted:  #8a8090;
  --danger:      #7a1a1a;
  --success:     #1a5c2a;
  --radius:      6px;
  --radius-lg:   10px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-hover); }

/* ─── Typography ─────────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; letter-spacing: 0.06em; color: var(--gold); }

code, kbd {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--gold);
}

/* ─── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 transparent;
}
.btn-primary:hover {
  background: var(--gold-glow);
  box-shadow: 0 0 16px var(--gold-glow);
  color: var(--gold-hover);
  border-color: var(--gold-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* ─── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 14, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-gold);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

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

.logo-emblem {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--gold);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  letter-spacing: 0;
}

.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

nav { display: flex; gap: 24px; }
nav a {
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
nav a:hover, nav a.active { color: var(--gold); }

/* ─── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(200,160,40,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 100%, rgba(100,20,20,0.15) 0%, transparent 60%);
}

.hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--text);
  text-shadow: 0 0 60px rgba(200,160,40,0.2);
  margin-bottom: 16px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 28px;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 24px;
}

.hero-voice {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ─── Voice section ──────────────────────────────────────────────────── */
.section-voice {
  padding: 40px 0 80px;
}

.voice-card {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.voice-info { flex: 1; }
.voice-info h2 { margin-bottom: 10px; }
.voice-info p { color: var(--text-muted); margin-bottom: 16px; }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.feature-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold-dim);
}

.voice-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

/* ─── Apply section ──────────────────────────────────────────────────── */
.section-apply {
  padding: 60px 0 80px;
  background: linear-gradient(180deg, transparent, rgba(200,160,40,0.03) 50%, transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 { margin-bottom: 8px; }
.section-header p { color: var(--text-muted); }

.apply-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ─── Tabs ───────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ─── Form ───────────────────────────────────────────────────────────── */
form { padding: 28px 32px 32px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

label {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.req { color: var(--gold-dim); }

input[type="text"],
input[type="number"],
textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 9px 12px;
  width: 100%;
  transition: border-color 0.2s;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(200,160,40,0.06);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 0.5; }

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

/* ─── Group members ──────────────────────────────────────────────────── */
.group-members-label {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hint { color: var(--border); font-size: 0.78rem; text-transform: none; letter-spacing: 0; }

.member-row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.btn-remove-member {
  background: transparent;
  border: 1px solid var(--danger);
  color: #e05050;
  border-radius: var(--radius);
  width: 32px;
  height: 36px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-remove-member:hover { background: rgba(122,26,26,0.3); }

.btn-add-member {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  width: 100%;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.btn-add-member:hover { border-color: var(--gold-dim); color: var(--gold); }

/* ─── Form message ───────────────────────────────────────────────────── */
.form-message {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.form-message.success { background: rgba(26,92,42,0.3); border: 1px solid #2a7a3a; color: #6dcf85; }
.form-message.error   { background: rgba(122,26,26,0.3); border: 1px solid #7a1a1a; color: #e07070; }

.btn-submit { width: 100%; justify-content: center; padding: 12px; }

/* ─── Page hero (download page) ──────────────────────────────────────── */
.page-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border-gold);
}
.page-hero h1 { margin-bottom: 8px; }
.page-hero p { color: var(--text-muted); }

/* ─── Download section ───────────────────────────────────────────────── */
.section-download { padding: 60px 0 80px; }

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.download-card-header {
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.download-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 10px;
  font-weight: 600;
}

.download-card-header h2 { margin-bottom: 8px; }
.download-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }

.download-buttons { display: flex; flex-direction: column; gap: 8px; }
.btn-download { justify-content: center; }

/* ─── Instructions ───────────────────────────────────────────────────── */
.instructions {
  padding: 24px 28px;
  flex: 1;
}
.instructions h3 { margin-bottom: 16px; }

.steps { list-style: none; display: flex; flex-direction: column; gap: 16px; }

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  min-width: 26px;
  height: 26px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-family: 'Cinzel', serif;
  color: var(--gold-dim);
  margin-top: 2px;
  flex-shrink: 0;
}

.steps li strong { display: block; margin-bottom: 3px; font-size: 0.92rem; }
.steps li p { color: var(--text-muted); font-size: 0.88rem; }
.steps li em { color: var(--text); font-style: normal; }

.info-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.info-box svg { flex-shrink: 0; color: var(--gold-dim); margin-top: 1px; }

/* ─── Requirements ───────────────────────────────────────────────────── */
.requirements {
  border-top: 1px solid var(--border-gold);
  padding-top: 32px;
}
.requirements h3 { margin-bottom: 16px; }

.req-list { display: flex; gap: 32px; flex-wrap: wrap; }
.req-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.req-item svg { color: var(--gold-dim); }

/* ─── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-gold);
  padding: 24px 0;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo { font-family: 'Cinzel', serif; font-size: 0.88rem; color: var(--gold-dim); }
.footer-info  { font-size: 0.82rem; color: var(--text-muted); }

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .voice-card { flex-direction: column; padding: 24px; gap: 24px; }
  .voice-actions { flex-direction: row; min-width: unset; }
  .form-row { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  form { padding: 20px; }
  .member-row { grid-template-columns: 1fr 1fr; }
  .member-row input[data-field="level"] { grid-column: 1; }
  .member-row .btn-remove-member { grid-column: 2; justify-self: end; }
  nav { gap: 16px; }
  .req-list { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
  .logo-text { display: none; }
  .hero { padding: 60px 0 50px; }
  .voice-actions { flex-direction: column; }
  .apply-card { border-radius: 0; border-left: none; border-right: none; }
}
