/* Finsi quiz — palette mirrored from finsi.ai
 *   navy   #1A1A2E (primary text + dark sections)
 *   deep   #0c1428 (headers, footer)
 *   accent #ff7a00 (CTAs, score highlights)
 *   blue   #106eea (secondary link)
 *   off    #f8f9fb (page background)
 *   line   #e8ecf1
 *   muted  #5a6577
 */

:root {
  --navy: #1A1A2E;
  --deep: #0c1428;
  --accent: #ff7a00;
  --accent-hover: #e66a00;
  --blue: #106eea;
  --off: #f8f9fb;
  --line: #e8ecf1;
  --muted: #5a6577;
  --green: #1ABC9C;
  --red: #C0392B;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(12, 20, 40, 0.04), 0 2px 6px rgba(12, 20, 40, 0.06);
  --shadow-md: 0 6px 24px rgba(12, 20, 40, 0.08);
  --shadow-lg: 0 16px 48px rgba(12, 20, 40, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  background: var(--off);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(248, 249, 251, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-mark { color: var(--navy); }
.brand-divider { color: var(--line); font-weight: 400; }
.brand-tag { color: var(--muted); font-weight: 500; font-size: 15px; letter-spacing: 0; }

.progress-pill {
  font-size: 13px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
}
.progress-pill strong { color: var(--navy); font-weight: 600; }

/* ---------- generic ---------- */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.screen { animation: fade-in 0.35s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  transition: transform 0.06s, background 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(1px); }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--navy); background: white; text-decoration: none; }

/* ---------- intro ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  margin-top: 32px;
}
.intro-copy { max-width: 560px; }
.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--navy);
}
.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 16px;
}
.micro { font-size: 13px; color: var(--muted); margin-top: 14px; }

.intro-visual {
  position: relative;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-stack {
  position: relative;
  width: 240px;
  height: 320px;
}
.stack-card {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.stack-card-1 {
  transform: rotate(-6deg) translate(-30px, 10px);
  background: linear-gradient(160deg, #fff 0%, #f0f2f8 100%);
}
.stack-card-2 {
  transform: rotate(2deg);
  background: linear-gradient(160deg, #fff 0%, #ffe4d0 100%);
}
.stack-card-3 {
  transform: rotate(8deg) translate(30px, -10px);
  background: linear-gradient(160deg, #fff 0%, var(--accent) 220%);
}

/* ---------- quiz ---------- */

.quiz-prompt {
  text-align: center;
  margin-bottom: 28px;
}
.quiz-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.quiz-title strong { color: var(--accent); }
.quiz-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.quiz-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.choice {
  display: flex;
  flex-direction: column;
  background: white;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.06s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.choice:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-md);
}
.choice:active { transform: translateY(1px); }

.choice-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.choice-letter {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.choice-hint {
  font-size: 12px;
  color: var(--muted);
}

.choice-frame {
  position: relative;
  flex: 1;
  background: #f0f2f8;
  border-radius: 8px;
  overflow-y: auto; /* full email visible via internal scroll — no crop bias between real (4.6:1) and AI (3:1) aspect ratios */
  overflow-x: hidden;
  height: 540px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.choice-img {
  width: 100%;
  height: auto;
  display: block;
}
/* Subtle scrollbar so it doesn't visually scream "AI vs real" — both cards have an identical scroll indicator. */
.choice-frame::-webkit-scrollbar { width: 6px; }
.choice-frame::-webkit-scrollbar-track { background: transparent; }
.choice-frame::-webkit-scrollbar-thumb { background: rgba(26, 26, 46, 0.18); border-radius: 3px; }
.choice-frame::-webkit-scrollbar-thumb:hover { background: rgba(26, 26, 46, 0.32); }

/* Reveal states (after a choice is made) */
.choice.locked { cursor: default; }
.choice.correct {
  border-color: var(--green);
  background: rgba(26, 188, 156, 0.04);
}
.choice.wrong {
  border-color: var(--red);
  background: rgba(192, 57, 43, 0.04);
}
.choice-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: white;
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  z-index: 2;
  display: none;
}
.choice.correct .choice-badge { display: block; color: var(--green); border-color: var(--green); }
.choice.wrong .choice-badge { display: block; color: var(--red); border-color: var(--red); }
.choice.real-revealed .choice-badge { display: block; }

.quiz-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  min-height: 44px;
}
.streak {
  font-size: 14px;
  color: var(--muted);
}
.streak strong { color: var(--navy); }

/* ---------- results ---------- */

.screen-results { text-align: center; max-width: 720px; margin: 60px auto 0; }
.results-headline {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.results-score {
  font-size: 22px;
  color: var(--muted);
  margin: 0 0 22px;
}
.results-score strong { color: var(--navy); font-weight: 700; }

.results-bar {
  height: 10px;
  width: 100%;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 40px;
}
.results-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffb27d);
  transition: width 0.8s ease-out;
}

.cta-card {
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: left;
  box-shadow: var(--shadow-lg);
}
.cta-eyebrow { color: var(--accent); }
.cta-title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.cta-sub {
  color: rgba(255, 255, 255, 0.74);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 22px;
}
.cta-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cta-input {
  flex: 1;
  min-width: 240px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.cta-input::placeholder { color: rgba(255, 255, 255, 0.42); }
.cta-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
}
.cta-confirmation {
  margin: 18px 0 0;
  color: var(--green);
  font-weight: 600;
}

.results-secondary {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: white;
  padding: 24px 28px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 60px;
}
.site-footer a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .intro-grid { grid-template-columns: 1fr; gap: 32px; }
  .intro-visual { height: 240px; }
  .quiz-pair { grid-template-columns: 1fr; }
  .choice-frame { max-height: 420px; }
}
