/* ============================================================
   GOLDBAR ASSESSMENT — Premium Black & Gold Theme
   Matches the training platform aesthetic.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:           #000000;
  --bg-1:         #07060a;
  --bg-card:      #0c0a08;
  --bg-elev:      #14110c;

  --gold:         #e8c45a;   /* warm honey gold — luminous, premium */
  --gold-bright:  #f3d683;
  --gold-dim:     #8a7232;
  --gold-line:    rgba(232, 196, 90, 0.22);
  --gold-line-2:  rgba(232, 196, 90, 0.45);
  --gold-glow:    0 0 18px rgba(232, 196, 90, 0.30);

  --cream:        #ffffff;   /* primary text — pure white for max readability */
  --cream-2:      #e8e8e8;   /* body / secondary text — bright off-white */
  --muted:        #9a9285;   /* labels, captions */
  --muted-2:      #6a6355;

  --danger:       #c97a6a;
  --success:      #8ab57c;

  --serif:        'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius:       2px;
  --radius-lg:    4px;

  --max-w:        1200px;
  --max-w-narrow: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232, 185, 35, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(232, 185, 35, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--cream);
}

h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
}
h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
}

em, .italic {
  font-style: italic;
  color: var(--gold);
  text-shadow: var(--gold-glow);
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

p { color: var(--cream-2); margin: 0 0 1em; }
.lead { font-size: 19px; color: var(--cream-2); line-height: 1.7; }

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}
.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 80px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(232,185,35,0.05) 0%, rgba(232,185,35,0.01) 100%);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 44px 36px;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0.6;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 18px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn:hover {
  background: var(--gold);
  color: #000;
  transform: translateY(-1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.btn-ghost {
  border-color: var(--gold-line-2);
  color: var(--cream-2);
}
.btn-ghost:hover {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn-solid {
  background: var(--gold);
  color: #000;
}
.btn-solid:hover {
  background: var(--gold-bright);
  color: #000;
}

/* ─── Forms ──────────────────────────────────────────────── */
label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cream);
  transition: border-color 0.2s ease;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e8b923' width='16' height='16'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 48px;
}

.field { margin-bottom: 22px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ─── Rating Scale (1-10) ────────────────────────────────── */
.rating-group {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin-top: 14px;
}
@media (max-width: 600px) {
  .rating-group { grid-template-columns: repeat(5, 1fr); gap: 8px; }
}
.rating-btn {
  background: var(--bg-1);
  border: 1px solid var(--gold-line);
  color: var(--cream-2);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 0;
  cursor: pointer;
  transition: all 0.18s ease;
  border-radius: var(--radius);
  text-align: center;
}
@media (max-width: 600px) {
  .rating-btn { padding: 18px 0; font-size: 18px; }
}
.rating-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.rating-btn.selected {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 600;
}
.rating-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

/* ─── Assessment Categories ──────────────────────────────── */
.category {
  padding: 36px 0;
  border-bottom: 1px solid var(--gold-line);
}
.category:last-child { border-bottom: none; }
.category-num {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.category-title {
  font-size: 28px;
  margin-bottom: 10px;
}
.category-desc { color: var(--cream-2); font-size: 17px; margin-bottom: 6px; }
.category-q {
  color: var(--cream-2);
  font-size: 19px;
  line-height: 1.5;
  margin-bottom: 24px;
}
.category-10 {
  background: rgba(232, 185, 35, 0.05);
  border-left: 2px solid var(--gold);
  padding: 14px 20px;
  margin-top: 18px;
  font-size: 15px;
  color: var(--cream-2);
}
.category-10 strong {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
}
.hero-inner { max-width: 880px; padding: 0 28px; }
.hero h1 { margin-bottom: 28px; }
.hero p { font-size: 19px; color: var(--cream-2); margin-bottom: 36px; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ─── Step indicator ─────────────────────────────────────── */
.steps {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 60px;
}
.step-dot {
  width: 28px;
  height: 1px;
  background: var(--gold-line);
  transition: background 0.3s;
}
.step-dot.active { background: var(--gold); }
.step-dot.done { background: var(--gold-dim); }

/* ─── Result Screen ──────────────────────────────────────── */
.result-tier {
  text-align: center;
  padding: 60px 0 40px;
}
.result-score {
  font-size: clamp(80px, 14vw, 180px);
  line-height: 1;
  font-style: italic;
  color: var(--gold);
  margin: 16px 0;
  font-weight: 500;
}
.result-score-suffix { font-size: 0.4em; color: var(--muted); font-style: normal; }
.tier-label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}
@media (max-width: 720px) {
  .impact-grid { grid-template-columns: 1fr; }
}
.impact-cell {
  text-align: center;
  padding: 28px 20px;
  background: rgba(232, 185, 35, 0.04);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
}
.impact-num {
  font-size: 42px;
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 8px;
}
.impact-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Score breakdown bars ───────────────────────────────── */
.breakdown { margin: 40px 0; }
.breakdown-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--gold-line);
}
.breakdown-bar {
  background: var(--bg-1);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.breakdown-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 3px;
}
.breakdown-name {
  font-size: 15px;
  color: var(--cream);
}
.breakdown-score {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 22px;
  min-width: 60px;
  text-align: right;
}

/* ─── Helpers ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.gold { color: var(--gold); }
.divider {
  height: 1px;
  background: var(--gold-line);
  margin: 40px 0;
  position: relative;
}
.divider::before {
  content: '';
  position: absolute;
  top: 0; left: 30%; right: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}

.hidden { display: none !important; }

/* Question fade-in transition */
.q-anim {
  animation: qFadeIn 0.42s ease;
}
@keyframes qFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  padding: 28px 0;
  border-bottom: 1px solid var(--gold-line);
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 50;
}
.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-decoration: none;
}
.logo em { color: var(--gold); font-style: italic; }
.logo-img {
  display: block;
  height: 110px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  margin: -32px 0;   /* let logo extend beyond header padding so the wordmark reads bigger */
}
@media (max-width: 720px) {
  .logo-img { height: 70px; margin: -18px 0; max-width: 200px; }
}
.logo-tag {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: 14px;
  border-left: 1px solid var(--gold-line);
}

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--gold-line);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: var(--gold-glow);
  text-align: center;
}

/* ─── Admin Dashboard ────────────────────────────────────── */
.admin-shell { padding: 40px 0; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.metric-card {
  background: linear-gradient(180deg, rgba(232,185,35,0.05), rgba(232,185,35,0.01));
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 24px 22px;
  position: relative;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 18%; right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}
.metric-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.metric-value {
  font-size: 38px;
  font-style: italic;
  color: var(--cream);
  line-height: 1;
}
.metric-sub { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-top: 6px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14px;
}
th, td {
  padding: 16px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gold-line);
}
th {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  background: rgba(232, 185, 35, 0.04);
}
tbody tr { cursor: pointer; transition: background 0.15s; }
tbody tr:hover { background: rgba(232, 185, 35, 0.04); }

.tier-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  border: 1px solid;
}
.tier-critical { color: #e89282; border-color: #e89282; background: rgba(232,146,130,0.05); }
.tier-ceiling  { color: #e8b923; border-color: #e8b923; background: rgba(232,185,35,0.06); }
.tier-scaling  { color: #9bc28a; border-color: #9bc28a; background: rgba(155,194,138,0.05); }

.status-pill {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--bg-elev);
  color: var(--cream-2);
  border: 1px solid var(--gold-line);
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  align-items: center;
}
.toolbar select, .toolbar input {
  background: var(--bg-1);
  border: 1px solid var(--gold-line);
  color: var(--cream);
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 13px;
  border-radius: var(--radius);
  min-width: 160px;
}

/* ─── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--gold-line-2);
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  padding: 40px 36px;
  position: relative;
}
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 18%; right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.modal-close:hover { color: var(--gold); }

.detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gold-line);
  font-size: 14px;
}
.detail-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}
.detail-value { color: var(--cream); }

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev);
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* ─── Loading ────────────────────────────────────────────── */
.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gold-line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
