/* ── GPA Suite — Shared Stylesheet ───────────────────────────────────
   Colors extracted from logo:
   Primary green:  #52796F (sage green — logo icon fill)
   Dark green:     #354F45 (darker green — wordmark "GPA")
   Amber accent:   #C17F3A (crossbar accent on logo A)
   Background:     #F2EFE7 (warm cream — logo background)
   Card white:     #FFFFFF
   Muted text:     #6B7B74
   Border:         #DDD9CF
─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
  --green:      #52796F;
  --green-dark: #354F45;
  --green-lt:   #E8F0EE;
  --amber:      #C17F3A;
  --amber-lt:   #FAF0E2;
  --bg:         #F2EFE7;
  --bg2:        #E8E4D8;
  --card:       #FFFFFF;
  --ink:        #1E2D28;
  --muted:      #6B7B74;
  --border:     #DDD9CF;
  --shadow:     0 2px 8px rgba(0,0,0,0.06), 0 8px 28px rgba(0,0,0,0.04);
  --radius:     14px;
  --font-head:  'Playfair Display', serif;
  --font-body:  'Instrument Sans', sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── NAV ─────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(242,239,231,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; height: 58px;
  gap: 0; overflow-x: auto;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: 2rem; flex-shrink: 0;
}
.nav-logo-icon {
  width: 34px; height: 34px;
  background: var(--green-dark);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 800; font-size: 0.75rem;
  color: #fff; letter-spacing: -0.02em;
}
.nav-logo-text {
  font-family: var(--font-head);
  font-weight: 700; font-size: 1rem;
  color: var(--green-dark); letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav-logo-text span { font-weight: 400; color: var(--muted); }

.nav-links {
  display: flex; gap: 2px; list-style: none;
}
.nav-links a {
  display: block;
  font-size: 0.79rem; font-weight: 500;
  color: var(--muted);
  padding: 6px 11px; border-radius: 8px;
  text-decoration: none; white-space: nowrap;
  transition: all 0.17s;
}
.nav-links a:hover  { color: var(--green); background: var(--green-lt); }
.nav-links a.active { color: var(--green-dark); background: var(--green-lt); font-weight: 600; }

/* ── HERO ────────────────────────────────────────────────────────── */
.hero {
  background: var(--green-dark);
  color: #fff; padding: 4rem 1.5rem 3.2rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 65% 80% at 88% -15%, rgba(82,121,111,0.55) 0%, transparent 55%),
    radial-gradient(ellipse 40% 55% at 5% 110%,  rgba(82,121,111,0.25) 0%, transparent 50%);
}
.hero-inner { max-width: 860px; margin: 0 auto; position: relative; }
.hero-eyebrow {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #8FBF9F; margin-bottom: 1rem; display: block;
}
.hero h1 {
  font-family: var(--font-head);
  font-weight: 800; font-size: clamp(1.9rem, 4.5vw, 3rem);
  letter-spacing: -0.04em; line-height: 1.06;
  margin-bottom: 0.9rem;
}
.hero h1 em { font-style: normal; color: #8FBF9F; }
.hero-sub {
  color: rgba(255,255,255,0.58);
  font-size: 0.93rem; max-width: 460px; margin-bottom: 2rem;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-tag {
  font-size: 0.73rem; font-weight: 500;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  color: rgba(255,255,255,0.65);
  border-radius: 20px; padding: 4px 13px;
}
.hero-tag.amber { background: rgba(193,127,58,0.18); border-color: rgba(193,127,58,0.35); color: #D4A574; }

/* ── LAYOUT ──────────────────────────────────────────────────────── */
.main { max-width: 860px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

/* ── CARDS ───────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem; margin-bottom: 1.2rem;
  box-shadow: var(--shadow);
}
.card-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--green); margin-bottom: 1rem;
}

/* ── RESULT CARD ─────────────────────────────────────────────────── */
.result-card {
  background: var(--green-dark); color: #fff;
  border-radius: var(--radius); padding: 2rem;
  margin-bottom: 1.2rem; position: relative; overflow: hidden;
}
.result-card::before {
  content: ''; position: absolute;
  top: -40%; right: -8%; width: 260px; height: 260px;
  background: rgba(255,255,255,0.04); border-radius: 50%;
}
.result-card::after {
  content: ''; position: absolute;
  bottom: -55%; left: -5%; width: 200px; height: 200px;
  background: rgba(255,255,255,0.03); border-radius: 50%;
}
.result-inner { position: relative; z-index: 1; }

.result-gpa-wrap { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.35rem; }
.result-gpa {
  font-family: var(--font-head);
  font-weight: 800; font-size: 4rem;
  letter-spacing: -0.04em; line-height: 1;
  color: #8FBF9F; transition: all 0.25s;
}
.result-scale { font-size: 1rem; color: rgba(255,255,255,0.35); font-weight: 500; }
.result-letter {
  display: inline-block;
  font-family: var(--font-head); font-weight: 700; font-size: 1rem;
  background: rgba(143,191,159,0.18); color: #8FBF9F;
  border-radius: 6px; padding: 2px 10px; margin-bottom: 1rem;
}
.result-meta { display: flex; gap: 2rem; flex-wrap: wrap; }
.result-meta-val {
  font-family: var(--font-head); font-weight: 700;
  font-size: 1.2rem; color: #fff;
}
.result-meta-lbl {
  font-size: 0.7rem; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.result-empty { font-size: 0.87rem; color: rgba(255,255,255,0.38); font-style: italic; }

.result-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.result-side {
  background: rgba(255,255,255,0.06);
  border-radius: 10px; padding: 1.1rem;
}
.result-side-label {
  font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.38); margin-bottom: 0.4rem;
}
.result-side-gpa {
  font-family: var(--font-head); font-weight: 800;
  font-size: 2.3rem; letter-spacing: -0.03em;
  color: #8FBF9F; line-height: 1;
}
.result-side-letter { font-size: 0.8rem; color: rgba(255,255,255,0.42); margin-top: 3px; }
.result-divider { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 1rem 0; }

/* ── COURSE TABLE ────────────────────────────────────────────────── */
.courses-table { width: 100%; border-collapse: separate; border-spacing: 0 5px; }
.courses-table thead th {
  font-size: 0.67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); padding: 0 8px 8px; text-align: left;
}
.courses-table tbody tr { background: var(--bg); }
.courses-table tbody td { padding: 3px 3px; }
.courses-table tbody td:first-child { padding-left: 0; }
.courses-table tbody td:last-child  { padding-right: 0; }

.courses-table input,
.courses-table select {
  width: 100%; padding: 9px 11px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: var(--font-body); font-size: 0.87rem;
  color: var(--ink); background: #fff; outline: none;
  transition: border-color 0.15s;
}
.courses-table input:focus,
.courses-table select:focus { border-color: var(--green); }
.courses-table input::placeholder { color: #bbb; }

.btn-remove {
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); font-size: 1.1rem;
  transition: all 0.15s; flex-shrink: 0;
}
.btn-remove:hover { border-color: #e05c5c; color: #e05c5c; background: #fff5f5; }

/* ── BUTTONS ─────────────────────────────────────────────────────── */
.btn-row { display: flex; gap: 0.7rem; margin-top: 1rem; flex-wrap: wrap; }
.btn {
  font-family: var(--font-body); font-size: 0.84rem; font-weight: 600;
  border: none; border-radius: 9px; padding: 10px 18px;
  cursor: pointer; transition: all 0.17s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-danger  { background: #fff5f5; color: #c0392b; border: 1px solid #fdd; }
.btn-danger:hover { background: #fee; }

/* ── FIELD GROUP (cumulative inputs) ─────────────────────────────── */
.cum-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label {
  font-size: 0.72rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em;
}
.field-group input {
  padding: 10px 13px; border: 1.5px solid var(--border);
  border-radius: 9px; font-family: var(--font-body);
  font-size: 0.9rem; color: var(--ink); background: #fff;
  outline: none; transition: border-color 0.15s;
}
.field-group input:focus { border-color: var(--green); }

/* ── GRADE SCALE ─────────────────────────────────────────────────── */
.grade-scale {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 6px;
}
.grade-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 11px;
  display: flex; justify-content: space-between; align-items: center;
}
.grade-letter { font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.grade-point  { font-family: var(--font-head); font-weight: 700; font-size: 0.88rem; color: var(--green); }

/* ── WEIGHT BADGES ───────────────────────────────────────────────── */
.weight-info { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.weight-badge { font-size: 0.71rem; font-weight: 600; border-radius: 6px; padding: 3px 9px; }
.wb-regular { background: #f0ede6; color: #5a574e; }
.wb-honors  { background: var(--amber-lt); color: var(--amber); }
.wb-ap      { background: var(--green-lt); color: var(--green-dark); }

/* ── HOW TO USE ──────────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0.7rem; }
.step  { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  font-family: var(--font-head); font-weight: 800;
  font-size: 1.2rem; color: var(--amber);
  line-height: 1; min-width: 26px; margin-top: 2px;
}
.step-text { font-size: 0.87rem; color: var(--ink); line-height: 1.5; }
.step-text strong { color: var(--green-dark); }

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); padding: 0.95rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
  cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem; user-select: none;
}
.faq-q::after {
  content: '+'; font-size: 1.3rem; color: var(--amber);
  font-weight: 300; flex-shrink: 0; transition: transform 0.2s;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  display: none; font-size: 0.86rem; color: var(--muted);
  line-height: 1.7; margin-top: 0.55rem;
}
.faq-item.open .faq-a { display: block; }

/* ── RELATED TOOLS ───────────────────────────────────────────────── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.7rem;
}
.related-btn {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 0.85rem 1rem;
  cursor: pointer; text-align: left;
  transition: all 0.17s; font-family: var(--font-body);
  text-decoration: none; display: block;
}
.related-btn:hover { border-color: var(--green); background: var(--green-lt); }
.related-btn-title { font-weight: 600; font-size: 0.84rem; color: var(--ink); display: block; margin-bottom: 2px; }
.related-btn-sub   { font-size: 0.71rem; color: var(--muted); }

/* ── INFO BOX ────────────────────────────────────────────────────── */
.info-box {
  background: var(--green-lt); border-left: 3px solid var(--green);
  border-radius: 0 9px 9px 0; padding: 1rem 1.3rem;
  font-size: 0.86rem; color: var(--green-dark); line-height: 1.65;
  margin: 1rem 0;
}

/* ── SECTION GAP ─────────────────────────────────────────────────── */
.section-gap { margin-top: 1.8rem; }

/* ── FOOTER ──────────────────────────────────────────────────────── */
.site-footer {
  background: var(--green-dark); color: rgba(255,255,255,0.5);
  text-align: center; padding: 2.5rem 1.5rem;
  font-size: 0.78rem; line-height: 1.8;
}
.site-footer a { color: #8FBF9F; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 2.5rem 1.2rem 2rem; }
  .main { padding: 1.5rem 1rem 3rem; }
  .result-dual { grid-template-columns: 1fr; }
  .cum-inputs  { grid-template-columns: 1fr; }
  .result-gpa  { font-size: 3rem; }
  .courses-table thead { display: none; }
  .courses-table tbody tr {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 8px; padding: 8px;
    background: var(--bg); border-radius: 10px;
  }
  .courses-table tbody td { padding: 2px; }
  .courses-table tbody td:nth-child(1) { flex: 1 1 100%; }
  .courses-table tbody td:nth-child(2) { flex: 1; }
  .courses-table tbody td:nth-child(3) { flex: 1; }
  .courses-table tbody td:nth-child(4) { flex: 0 0 auto; }
}

/* ── ANIMATIONS ──────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-inner > * { animation: fadeUp 0.5s ease both; }
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.13s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.2s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.27s; }
