/* =============================================
   SAT CALCULATOR – MAIN STYLESHEET
   Aesthetic: Editorial Precision / Warm Academic
   Fonts: DM Serif Display + DM Sans
============================================= */

:root {
  --navy: #0f2033;
  --ink: #1a2e42;
  --sky: #2563eb;
  --sky-light: #3b82f6;
  --gold: #f59e0b;
  --cream: #fdfaf5;
  --warm-gray: #f3f0eb;
  --border: #e2ddd6;
  --text: #2d3748;
  --muted: #6b7280;
  --math-color: #2563eb;
  --rw-color: #059669;
  --red: #dc2626;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(15,32,51,0.10);
  --shadow-lg: 0 12px 48px rgba(15,32,51,0.15);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  color: var(--navy);
  line-height: 1.25;
}

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ========================
   HEADER / NAV
======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,250,245,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}
.logo strong { color: var(--sky); }
.logo-icon { font-size: 1.1rem; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--warm-gray);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--navy);
  margin-left: auto;
}

/* ========================
   HERO
======================== */
.hero {
  position: relative;
  padding: 72px 24px 56px;
  text-align: center;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  color: var(--navy);
}

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

.hero-bg-shape {
  position: absolute;
  top: -80px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, rgba(37,99,235,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ========================
   PAGE HERO (inner pages)
======================== */
.page-hero {
  padding: 56px 24px 40px;
  text-align: center;
  background: var(--warm-gray);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -1px; }
.page-hero .hero-sub a { font-weight: 600; }

/* ========================
   CALCULATOR SECTION
======================== */
.calculator-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.tool-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 40px;
}

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

.tab-btn {
  flex: 1;
  padding: 14px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  background: #fff;
  color: var(--navy);
  border-bottom-color: var(--sky);
}

.tab-panel { display: none; padding: 32px; }
.tab-panel.active { display: block; }

/* Sections Grid */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.section-block {
  background: var(--warm-gray);
  border-radius: 10px;
  padding: 24px;
  border: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.section-header.math .section-icon { background: rgba(37,99,235,0.12); color: var(--math-color); }
.section-header.ebrw .section-icon { background: rgba(5,150,105,0.12); color: var(--rw-color); }

.section-header h2 { font-size: 1.1rem; margin-bottom: 2px; }
.section-header p { font-size: 0.8rem; color: var(--muted); font-family: 'DM Sans', sans-serif; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.total-note { font-weight: 400; text-transform: none; color: var(--muted); }

.score-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 1.3rem;
  font-weight: 600;
  font-family: 'DM Serif Display', serif;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  transition: border-color var(--transition);
  outline: none;
}

.score-input:focus { border-color: var(--sky); }

/* Slider */
.slider-wrap { margin: 14px 0; }

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  margin-bottom: 4px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--sky);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 1px 8px rgba(37,99,235,0.3);
}
.slider-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--muted); }

/* Section result */
.section-result {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.result-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); flex: 1; }
.result-value { font-family: 'DM Serif Display', serif; font-size: 1.8rem; color: var(--navy); }
.result-range { font-size: 0.72rem; color: var(--muted); }

/* Total Score Card */
.total-score-card {
  background: var(--navy);
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  color: white;
  margin-bottom: 16px;
}

.total-inner { flex: 1; }
.total-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; margin-bottom: 6px; }
.total-value { font-family: 'DM Serif Display', serif; font-size: 4rem; letter-spacing: -2px; line-height: 1; }
.total-scale { font-size: 0.85rem; opacity: 0.5; margin-top: 4px; }

/* Gauge */
.score-gauge-wrap { flex-shrink: 0; }
.score-gauge { width: 160px; height: 90px; }
.gauge-bg { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 14; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: var(--gold); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.gauge-label { font-family: 'DM Serif Display', serif; font-size: 20px; fill: white; text-anchor: middle; font-weight: bold; }
.gauge-sub { font-size: 9px; fill: rgba(255,255,255,0.5); text-anchor: middle; font-family: 'DM Sans', sans-serif; }

/* Interpretation */
.interpretation-bar {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.interp-band { height: 6px; width: 100%; transition: background 0.4s; }
.interp-text { font-size: 0.875rem; padding: 12px 16px; background: var(--warm-gray); color: var(--text); }

/* Reset */
.reset-btn {
  display: block;
  margin: 0 auto;
  background: none;
  border: 1px solid var(--border);
  padding: 8px 24px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
}
.reset-btn:hover { background: var(--warm-gray); color: var(--navy); }

/* ========================
   TARGET PLANNER TAB
======================== */
.target-intro { margin-bottom: 24px; color: var(--muted); font-size: 0.9rem; }
.target-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.target-block { background: var(--warm-gray); border-radius: 10px; padding: 20px; border: 1px solid var(--border); }
.target-block h3 { font-size: 1rem; margin-bottom: 16px; }
.target-block label { margin-top: 14px; }

.target-result-card {
  background: var(--navy);
  border-radius: 12px;
  padding: 24px 28px;
  color: white;
  min-height: 80px;
}
.target-result-card h3 { color: white; font-size: 1.1rem; margin-bottom: 12px; }
.target-result-card p { font-size: 0.9rem; opacity: 0.8; margin-bottom: 6px; }
.target-result-card .highlight { color: var(--gold); font-weight: 700; }

/* ========================
   HOW TO USE
======================== */
.how-to {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
}

.how-to h2 { font-size: 1.4rem; margin-bottom: 20px; }

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

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.95rem;
  color: var(--text);
}

.steps li span {
  width: 30px; height: 30px;
  background: var(--sky);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ========================
   SCORE TABLE
======================== */
.score-table-section {
  padding: 64px 0;
  background: var(--warm-gray);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.score-table-section h2 { font-size: 1.8rem; margin-bottom: 10px; }
.section-intro { color: var(--muted); margin-bottom: 28px; font-size: 0.9rem; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

.score-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.88rem;
}

.score-table th {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
}

.score-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.score-table tr:last-child td { border-bottom: none; }
.score-table tr:hover td { background: var(--warm-gray); }

/* ========================
   FAQ
======================== */
.faq-section { padding: 72px 0; }
.faq-section h2 { font-size: 2rem; margin-bottom: 32px; }

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

.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--navy);
  user-select: none;
  transition: background var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--sky); font-weight: 400; }
.faq-item[open] summary { background: var(--warm-gray); }
.faq-item[open] summary::after { content: '−'; }

.faq-item p {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ========================
   BLOG TEASER
======================== */
.blog-teaser {
  padding: 72px 0;
  background: var(--warm-gray);
  border-top: 1px solid var(--border);
}

.blog-teaser h2 { font-size: 2rem; margin-bottom: 10px; }

.blog-cards {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 28px;
}

.blog-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.blog-card:hover { box-shadow: var(--shadow-lg); }
.blog-card.large h3 { font-size: 1.3rem; margin: 10px 0 12px; }
.blog-card.large p { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }

.blog-card.cta-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  background: var(--navy);
  color: white;
}
.blog-card.cta-card p { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

.blog-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(37,99,235,0.1);
  color: var(--sky);
  margin-bottom: 8px;
}

.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sky);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* ========================
   BUTTONS
======================== */
.btn-primary {
  display: inline-block;
  background: var(--sky);
  color: white;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-primary:hover { background: var(--sky-light); box-shadow: 0 4px 16px rgba(37,99,235,0.3); text-decoration: none; }

.btn-outline {
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.3);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all var(--transition);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

.full-width { width: 100%; text-align: center; display: block; }

/* ========================
   BLOG PAGES
======================== */
.blog-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 64px;
}

.blog-grid { display: grid; gap: 20px; }
.blog-card.large h2 { font-size: 1.4rem; margin: 10px 0 12px; }
.blog-card.large h2 a { color: var(--navy); }
.blog-card.large h2 a:hover { color: var(--sky); text-decoration: none; }
.blog-excerpt { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
.blog-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; }

.blog-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.blog-cta-banner h3 { color: white; font-size: 1.2rem; margin-bottom: 4px; }
.blog-cta-banner p { font-size: 0.875rem; opacity: 0.7; }

.blog-cta-section { padding: 40px 0 64px; }

/* ========================
   ARTICLE PAGE
======================== */
.article-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding-top: 32px;
  padding-bottom: 64px;
  align-items: start;
}

.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 24px;
  grid-column: 1 / -1;
}
.breadcrumb a { color: var(--sky); }

.article-header { margin-bottom: 32px; }
.article-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 12px 0 16px; }
.article-meta { display: flex; gap: 20px; font-size: 0.8rem; color: var(--muted); margin-bottom: 20px; }

.article-tool-cta {
  background: rgba(37,99,235,0.07);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text);
}

.article-body h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-body h3 {
  font-size: 1.15rem;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--ink);
}

.article-body p { margin-bottom: 16px; font-size: 0.95rem; line-height: 1.75; color: var(--text); }
.article-body a { font-weight: 600; }

.placeholder-notice {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.875rem;
  color: #92400e;
  margin: 24px 0;
}

.article-bottom-cta {
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 48px;
}
.article-bottom-cta h3 { color: white; font-size: 1.3rem; margin-bottom: 8px; }
.article-bottom-cta p { font-size: 0.9rem; opacity: 0.75; margin-bottom: 16px; }

/* Aside */
.article-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 80px; }

.aside-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.aside-card h3 { font-size: 1rem; margin-bottom: 10px; }
.aside-card p { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.aside-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.aside-links a { font-size: 0.875rem; font-weight: 500; }

/* ========================
   FOOTER
======================== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 40px;
  flex-wrap: wrap;
}

.footer-brand .logo { color: white; margin-bottom: 10px; }
.footer-brand .logo strong { color: var(--gold); }
.footer-brand p { font-size: 0.85rem; max-width: 280px; }

.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: rgba(255,255,255,0.6); font-size: 0.875rem; text-decoration: none; }
.footer-nav a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.78rem;
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--cream); flex-direction: column; padding: 12px 24px 20px; border-bottom: 1px solid var(--border); z-index: 99; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .section-grid { grid-template-columns: 1fr; }
  .total-score-card { flex-direction: column; text-align: center; }
  .score-gauge-wrap { display: none; }
  .target-grid { grid-template-columns: 1fr; }
  .blog-cards { grid-template-columns: 1fr; }
  .article-main { grid-template-columns: 1fr; }
  .article-aside { display: none; }
  .blog-cta-banner { flex-direction: column; text-align: center; }
  .footer-inner { flex-direction: column; }
  .tab-panel { padding: 20px; }
}
