/* ============================================
   LSAT Final Page — "Ember & Slate" Theme
   Light Mode Default + Dark Mode Toggle
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@200,300,400,500,600,700&display=swap');

/* ============================================
   NON-COLOR LAYOUT VARIABLES
   (Color variables are managed by the Color Customizer mu-plugin)
   ============================================ */
:root {
  --card-border: rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 16px 60px rgba(0, 0, 0, 0.14);
  --section-divider: rgba(0, 0, 0, 0.08);
  --font-display: 'Clash Display', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
  --container-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   DARK MODE — NON-COLOR OVERRIDES
   ============================================ */
[data-theme="dark"] {
  --card-border: rgba(255, 255, 255, 0.05);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 20px 60px rgba(0, 0, 0, 0.35);
  --section-divider: rgba(255, 255, 255, 0.04);
}

/* ============================================
   RESET & BASE
   ============================================ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  height: 100%;
}

body.lsat-final {
  font-family: var(--font-body);
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  margin: 0;
  padding: 0;
  height: 100%;
}

*, *::before, *::after { box-sizing: border-box; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ember); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================
   CONTAINER
   ============================================ */
.lsat-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   SECTION LABEL
   ============================================ */
.lsat-section__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ember);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 100px;
  padding: 6px 14px;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.lsat-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.lsat-reveal--visible {
  opacity: 1;
  transform: none;
}

/* ============================================
   FINAL MAIN — FULL VIEWPORT CENTERING
   ============================================ */
.lsat-final-main {
  position: relative;
  height: 100%;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
}

/* Background gradient */
.lsat-final-bg {
  position: fixed;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}

/* Grain texture overlay */
.lsat-final-grain {
  position: fixed;
  inset: -20px;
  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='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.06;
  animation: grainShift 8s steps(10) infinite;
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .lsat-final-grain { opacity: 0.03; }

@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  10%       { transform: translate(-2%, -3%); }
  30%       { transform: translate(2%, 2%); }
  50%       { transform: translate(-1%, 3%); }
  70%       { transform: translate(3%, -1%); }
  90%       { transform: translate(-3%, 2%); }
}

.lsat-final-main .lsat-container {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ============================================
   CARD
   ============================================ */
.lsat-final-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 64px 56px;
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Light mode: opaque card so grain doesn't bleed */
body.lsat-final .lsat-final-card {
  background: rgba(255, 255, 255, 0.96);
}

/* Dark mode: override back to translucent dark */
[data-theme="dark"] .lsat-final-card {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   ICON
   ============================================ */
.lsat-final-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--badge-bg);
  border: 2px solid var(--badge-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  color: var(--accent-ember);
  animation: popIn 0.6s var(--transition-bounce) both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================
   EYEBROW LABEL
   ============================================ */
.lsat-final-label {
  margin-bottom: 20px;
}

/* ============================================
   HEADLINE
   ============================================ */
.lsat-final-headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

/* ============================================
   BODY TEXT
   ============================================ */
.lsat-final-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 40px;
}

.lsat-final-body p { margin-bottom: 14px; }
.lsat-final-body p:last-child { margin-bottom: 0; }
.lsat-final-body a { color: var(--accent-ember); text-decoration: underline; text-underline-offset: 2px; }
.lsat-final-body strong { color: var(--text-primary); font-weight: 600; }

/* ============================================
   ACTIONS
   ============================================ */
.lsat-final-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Primary CTA button */
.lsat-final-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-cta);
  background-size: 200% auto;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 16px 36px;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: background-position var(--transition-smooth),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
  box-shadow: 0 4px 20px var(--accent-ember-glow);
  text-decoration: none;
  white-space: nowrap;
}

.lsat-final-cta-btn:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-ember-glow);
  text-decoration: none;
  color: #fff;
}

.lsat-final-cta-btn svg {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.lsat-final-cta-btn:hover svg {
  transform: translateX(4px);
}

/* Secondary text link */
.lsat-final-secondary-link {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.lsat-final-secondary-link:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  .lsat-final-card {
    padding: 40px 24px;
    border-radius: var(--radius-lg);
  }

  .lsat-final-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
  }

  .lsat-final-cta-btn {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 15px 24px;
  }
}
