/* ============================================================
   CVLens — style.css
   Theme: Dark, editorial, refined
   ============================================================ */

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

:root {
  --bg:           #0d0d0d;
  --bg-card:      #161616;
  --bg-card-2:    #1c1c1c;
  --border:       rgba(255,255,255,0.09);
  --border-hover: rgba(255,255,255,0.18);
  --text:         #f0ede8;
  --text-muted:   #888880;
  --text-dim:     #555550;
  --accent:       #c8f04a;
  --accent-muted: rgba(200,240,74,0.10);
  --accent-text:  #0d0d0d;
  --danger:       #e24b4a;
  --success:      #4ab87a;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --font-serif:   'Instrument Serif', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, sans-serif;
  --max-w:        680px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.logo {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}
.logo span { color: var(--accent); }

.header-nav {
  display: flex;
  gap: 1.5rem;
}
.header-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--text); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(200,240,74,0.2);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.5s ease both;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
  animation: fadeUp 0.5s 0.1s ease both;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  animation: fadeUp 0.5s 0.2s ease both;
}

/* ── Upload section ──────────────────────────────────────── */
.upload-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ── Card base ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  animation: fadeUp 0.5s 0.3s ease both;
}

.step-badge {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

/* ── Drop zone ───────────────────────────────────────────── */
.drop-zone {
  border: 1.5px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.drop-icon { margin-bottom: 1rem; }

.drop-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.drop-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-upload {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(200,240,74,0.25);
  border-radius: 100px;
  padding: 8px 22px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-upload:hover {
  background: rgba(200,240,74,0.18);
  border-color: rgba(200,240,74,0.45);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 100px;
  padding: 10px 24px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover  { opacity: 0.88; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── File selected state ─────────────────────────────────── */
.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 1.25rem;
}
.file-icon { flex-shrink: 0; opacity: 0.8; }
.file-name { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.file-size { font-size: 0.78rem; color: var(--text-muted); }
.file-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.file-remove:hover { color: var(--danger); }

/* ── Loading ─────────────────────────────────────────────── */
.loading-card {
  text-align: center;
  padding: 3rem 2rem;
}

.loading-anim {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.loading-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 260px;
  margin: 0 auto;
}
.loading-step {
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: color 0.4s;
}
.loading-step.active  { color: var(--accent); }
.loading-step.done    { color: var(--text-muted); }

/* ── Results header ──────────────────────────────────────── */
.results-wrap {
  animation: fadeUp 0.5s ease both;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1rem;
}

.results-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.score-number {
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
}
.score-max {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.score-gauge-wrap { width: 120px; }
.score-gauge { width: 100%; overflow: visible; }
.gauge-fill {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Metrics grid ────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1rem;
}
.metric-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.metric-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.metric-value.small { font-size: 1rem; font-family: var(--font-sans); font-weight: 500; line-height: 1.3; }
.metric-sub { font-size: 0.75rem; color: var(--text-muted); }

/* ── Teaser / gate ───────────────────────────────────────── */
.teaser-section {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.teaser-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.teaser-row:last-of-type { border-bottom: none; }

.teaser-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 2px;
}
.teaser-icon.warn { background: rgba(226,75,74,0.15); color: var(--danger); }
.teaser-icon.ok   { background: rgba(74,184,122,0.12); color: var(--success); }

.teaser-title { font-size: 0.9rem; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.teaser-text  { font-size: 0.82rem; color: var(--text-muted); }

.blurred { filter: blur(5px); user-select: none; pointer-events: none; }

/* Gate overlay */
.gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(13,13,13,0) 0%, rgba(13,13,13,0.92) 35%, rgba(13,13,13,0.98) 100%);
  backdrop-filter: blur(1px);
  padding: 1.5rem;
}

.gate-box {
  text-align: center;
  max-width: 380px;
}

.gate-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.gate-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.gate-form {
  display: flex;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.gate-form input[type="email"] {
  flex: 1;
  background: var(--bg-card-2);
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.gate-form input[type="email"]:focus { border-color: var(--accent); }
.gate-form input[type="email"]::placeholder { color: var(--text-dim); }

.gate-privacy {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── Full results (post-gate) ────────────────────────────── */
.full-results {
  animation: fadeUp 0.5s ease both;
}

.full-results-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(74,184,122,0.08);
  border: 1px solid rgba(74,184,122,0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.check-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.full-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}
.full-section h3 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.issues-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.issues-list li {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}
.issues-list li::before {
  content: '!';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(226,75,74,0.15);
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.keywords-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.keyword-tag {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border-hover);
  color: var(--text-muted);
}
.keyword-tag.missing {
  border-color: rgba(226,75,74,0.35);
  color: var(--danger);
  background: rgba(226,75,74,0.07);
}

.plan-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 0;
  list-style: none;
  counter-reset: plan-counter;
}
.plan-list li {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text);
  counter-increment: plan-counter;
}
.plan-list li::before {
  content: counter(plan-counter);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ── Clera CTA ───────────────────────────────────────────── */
.clera-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-top: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.clera-cta::before {
  content: '';
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 150px;
  background: radial-gradient(ellipse, rgba(200,240,74,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.clera-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.clera-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.clera-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto 1.5rem;
}
.btn-clera {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--accent);
  border-radius: 100px;
  padding: 12px 28px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-clera:hover  { opacity: 0.88; }
.btn-clera:active { transform: scale(0.97); }

/* ── How it works ────────────────────────────────────────── */
.how-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 2.5rem;
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.step-item {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.step-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.step-item h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--border-hover); }

.faq-item summary {
  padding: 1.1rem 1.25rem;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--text-dim);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  content: '–';
}

.faq-item p {
  padding: 0 1.25rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer p { font-size: 0.8rem; color: var(--text-dim); }
.footer-disc { font-size: 0.72rem !important; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 3rem 1.25rem 2rem; }
  .upload-section { padding: 0 1.25rem 3rem; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .metrics-grid .metric-card:last-child { grid-column: 1 / -1; }
  .steps-grid { grid-template-columns: 1fr; }
  .results-header { flex-direction: column; gap: 1rem; }
  .score-gauge-wrap { width: 80px; }
  .gate-form { flex-direction: column; }
  .gate-form input[type="email"] { width: 100%; }
}
