/* ═══════════════════════════════════════════════════════
   GradeGenius — Shared Stylesheet
   Replace yourdomain.com with your real domain
════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

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

/* ─── VARIABLES ─────────────────────────────────────── */
:root {
  --bg:        #0b0d12;
  --surface:   #12151e;
  --surface2:  #191d29;
  --border:    #232840;
  --accent:    #4ade80;
  --accent2:   #22d3ee;
  --accent3:   #f472b6;
  --warn:      #fbbf24;
  --text:      #dde1ee;
  --muted:     #6b7491;
  --heading:   #ffffff;
  --radius:    14px;
  --font-h:    'Syne', sans-serif;
  --font-b:    'DM Sans', sans-serif;
  --nav-h:     66px;
  --max-w:     1100px;
  --content-w: 860px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── SKIP LINK (accessibility) ─────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--accent); color: #000;
  padding: .5rem 1rem; border-radius: 6px;
  font-size: .85rem; font-weight: 700;
  text-decoration: none; z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ─── NAVBAR ─────────────────────────────────────────── */
#site-nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(11,13,18,.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem,4vw,2.5rem);
  gap: 1rem;
}
.nav-logo {
  font-family: var(--font-h);
  font-weight: 800; font-size: 1.3rem;
  color: var(--heading);
  text-decoration: none;
  display: flex; align-items: center; gap: .4rem;
  flex-shrink: 0;
}
.nav-logo em { font-style: normal; color: var(--accent); }
.logo-pulse {
  width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
  display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.4;transform:scale(.6)}
}
.nav-links {
  display: flex; align-items: center;
  gap: .15rem; list-style: none;
}
.nav-links a {
  font-size: .85rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  padding: .4rem .8rem; border-radius: 8px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--heading); background: var(--surface2); }
.nav-links a.active { color: var(--accent); background: rgba(74,222,128,.08); }
.nav-links a.nav-cta {
  background: var(--accent); color: #0b0d12 !important;
  font-weight: 700; margin-left: .5rem;
}
.nav-links a.nav-cta:hover { background: #86efac; }
.hamburger {
  display: none; flex-direction: column;
  gap: 5px; cursor: pointer; padding: 5px;
  flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .3s;
}

/* ─── AD SLOT SYSTEM ─────────────────────────────────── */
.ad-slot {
  display: none; /* hidden by default */
  width: 100%; text-align: center;
  overflow: hidden; clear: both;
}
.ad-slot.active { display: block; } /* add "active" class to show */
.ad-wrap-leaderboard { max-width: 728px; min-height: 90px; margin: 0 auto; }
.ad-wrap-rectangle   { max-width: 336px; min-height: 280px; margin: 0 auto; }
.ad-wrap-inline      { max-width: 100%;  min-height: 250px; margin: 0 auto; }

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  min-height: calc(92vh - var(--nav-h));
  display: grid; place-items: center;
  text-align: center;
  padding: 5rem clamp(1rem,5vw,3rem) 4rem;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 15% 25%, rgba(74,222,128,.09) 0%, transparent 65%),
    radial-gradient(ellipse 50% 55% at 85% 75%, rgba(34,211,238,.07) 0%, transparent 65%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .22;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}
.hero-inner { position: relative; max-width: 780px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.22);
  border-radius: 100px; padding: .3rem .9rem;
  font-size: .75rem; font-weight: 700;
  color: var(--accent); letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 1.5rem;
  animation: fadeUp .6s ease both;
}
.hero h1 {
  font-family: var(--font-h);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 800; color: var(--heading);
  line-height: 1.08; letter-spacing: -.025em;
  margin-bottom: 1.2rem;
  animation: fadeUp .6s .1s ease both;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: clamp(.95rem, 2vw, 1.1rem);
  color: var(--muted); max-width: 560px;
  margin: 0 auto 2.5rem; font-weight: 300;
  animation: fadeUp .6s .2s ease both;
}
.hero-btns {
  display: flex; gap: .85rem;
  justify-content: center; flex-wrap: wrap;
  animation: fadeUp .6s .3s ease both;
}

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-b); font-size: .9rem; font-weight: 600;
  border-radius: 10px; padding: .72rem 1.5rem;
  cursor: pointer; border: none; text-decoration: none;
  transition: all .2s; line-height: 1;
}
.btn-primary { background: var(--accent); color: #0b0d12; }
.btn-primary:hover { background: #86efac; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(74,222,128,.25); }
.btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); transform: translateY(-1px); }

/* ─── LAYOUT HELPERS ─────────────────────────────────── */
.container  { max-width: var(--max-w);   margin: 0 auto; padding: 0 clamp(1rem,4vw,2rem); }
.content-w  { max-width: var(--content-w); margin: 0 auto; padding: 0 clamp(1rem,4vw,2rem); }
.section    { padding: 4.5rem 0; }
.section-sm { padding: 2.5rem 0; }

.section-label {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem;
  display: block;
}
.section-title {
  font-family: var(--font-h);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800; color: var(--heading);
  line-height: 1.15; letter-spacing: -.02em;
  margin-bottom: .85rem;
}
.section-sub {
  font-size: .975rem; color: var(--muted);
  max-width: 540px; font-weight: 300;
  margin-bottom: 2.5rem; line-height: 1.75;
}

/* ─── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(74,222,128,.07);
}
.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.2rem; margin-bottom: .9rem;
}
.card h3 {
  font-family: var(--font-h); font-size: .98rem;
  font-weight: 700; color: var(--heading);
  margin-bottom: .35rem;
}
.card p { font-size: .84rem; color: var(--muted); line-height: 1.6; }

/* ─── CALCULATOR BOX ─────────────────────────────────── */
.calc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 2rem;
  margin-bottom: 1.75rem;
}
.calc-box-title {
  font-family: var(--font-h); font-size: 1.1rem;
  font-weight: 700; color: var(--heading);
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: .5rem;
}

/* ─── FORM ELEMENTS ──────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .38rem; }
.form-label {
  font-size: .76rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .07em;
}
.form-input, .form-select, .form-textarea {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: var(--font-b); font-size: .93rem;
  padding: .65rem 1rem; outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74,222,128,.1);
}
.form-textarea { resize: vertical; min-height: 110px; }
.form-check { display: flex; align-items: center; gap: .55rem; cursor: pointer; font-size: .875rem; color: var(--muted); }
.form-check input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

/* ─── BUTTONS IN FORMS ───────────────────────────────── */
.calc-btn {
  width: 100%; background: var(--accent);
  color: #0b0d12; font-family: var(--font-h);
  font-size: .95rem; font-weight: 700;
  border: none; border-radius: 12px;
  padding: .85rem; cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
  margin-top: .25rem;
}
.calc-btn:hover { background: #86efac; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(74,222,128,.2); }
.reset-btn {
  background: var(--surface2); color: var(--muted);
  border: 1px solid var(--border);
  font-family: var(--font-b); font-size: .85rem;
  font-weight: 500; border-radius: 10px;
  padding: .6rem 1.1rem; cursor: pointer;
  transition: all .2s;
}
.reset-btn:hover { color: var(--text); background: var(--border); }
.add-row-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  background: transparent;
  border: 1.5px dashed var(--border);
  color: var(--muted); font-family: var(--font-b);
  font-size: .85rem; font-weight: 500;
  border-radius: 10px; padding: .55rem 1rem;
  cursor: pointer; transition: all .2s; margin-top: .35rem;
}
.add-row-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── RESULT BOX ─────────────────────────────────────── */
.result-box {
  background: linear-gradient(135deg, rgba(74,222,128,.06), rgba(34,211,238,.04));
  border: 1.5px solid rgba(74,222,128,.18);
  border-radius: 14px; padding: 1.5rem;
  margin-top: 1.25rem;
  display: none;
}
.result-box.show { display: block; animation: fadeUp .4s ease; }
.result-main { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.result-badge {
  background: var(--accent); color: #0b0d12;
  font-family: var(--font-h); font-size: 2.4rem;
  font-weight: 800; border-radius: 12px;
  padding: .4rem 1rem; min-width: 86px; text-align: center;
}
.result-info h3 { font-family: var(--font-h); font-size: 1.2rem; font-weight: 700; color: var(--heading); }
.result-info p  { font-size: .875rem; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 1rem; margin-top: 1.2rem; }
.stat-card { background: var(--surface2); border-radius: 12px; padding: 1.1rem; text-align: center; }
.stat-val  { font-family: var(--font-h); font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.stat-lbl  { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-top: .2rem; }

/* ─── TABLES ─────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--surface2);
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); padding: .75rem 1rem; text-align: left;
}
.data-table td { padding: .7rem 1rem; font-size: .875rem; color: var(--text); border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.015); }
.grade-pill {
  display: inline-block; padding: .15rem .55rem;
  border-radius: 100px; font-size: .73rem; font-weight: 700;
  font-family: var(--font-h);
}

/* ─── CONTENT BLOCKS ─────────────────────────────────── */
.content-block { margin-bottom: 1.75rem; }
.content-block h2 {
  font-family: var(--font-h); font-size: 1.35rem;
  font-weight: 700; color: var(--heading);
  margin-bottom: .9rem; line-height: 1.3;
}
.content-block h3 {
  font-family: var(--font-h); font-size: 1.05rem;
  font-weight: 700; color: var(--heading);
  margin: 1.3rem 0 .5rem;
}
.content-block p { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; line-height: 1.75; }
.content-block ul { list-style: none; padding: 0; margin-bottom: .75rem; }
.content-block ul li {
  font-size: .9rem; color: var(--muted);
  padding: .3rem 0 .3rem 1.4rem; position: relative; line-height: 1.65;
}
.content-block ul li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-weight: 700; font-size: 1.1rem; }
.code-block {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace; font-size: .83rem;
  color: var(--accent2); margin: .6rem 0 1rem; overflow-x: auto;
}

/* ─── FAQ ────────────────────────────────────────────── */
.faq-wrap { display: flex; flex-direction: column; gap: .55rem; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color .2s;
}
.faq-item:hover { border-color: rgba(34,211,238,.3); }
.faq-q {
  padding: 1.05rem 1.25rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: .93rem; color: var(--text);
  user-select: none; background: var(--surface);
}
.faq-q .ico { transition: transform .3s; font-size: 1rem; color: var(--muted); flex-shrink: 0; margin-left: 1rem; }
.faq-item.open .faq-q .ico { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .38s ease, padding .3s ease;
  font-size: .875rem; color: var(--muted);
  background: var(--surface); line-height: 1.75; padding: 0 1.25rem;
}
.faq-item.open .faq-a { max-height: 500px; padding: 0 1.25rem 1.1rem; }

/* ─── BREADCRUMB ─────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--muted); margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border); }

/* ─── COURSE ROW (GPA) ───────────────────────────────── */
.course-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: .75rem; align-items: end; margin-bottom: .75rem;
}
.remove-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); border-radius: 8px;
  width: 38px; height: 38px; cursor: pointer;
  font-size: 1.1rem; transition: all .2s;
  display: grid; place-items: center; flex-shrink: 0;
}
.remove-btn:hover { border-color: var(--accent3); color: var(--accent3); }

/* ─── FOOTER ─────────────────────────────────────────── */
#site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3,1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.footer-brand-text {
  font-size: .85rem; color: var(--muted);
  margin-top: .75rem; max-width: 230px; line-height: 1.7;
}
.footer-col h4 {
  font-family: var(--font-h); font-size: .8rem; font-weight: 700;
  color: var(--heading); text-transform: uppercase;
  letter-spacing: .09em; margin-bottom: .9rem;
}
.footer-col a {
  display: block; font-size: .85rem; color: var(--muted);
  text-decoration: none; margin-bottom: .5rem; transition: color .2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap;
  gap: 1rem; font-size: .78rem; color: var(--muted);
}

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; padding: 1rem; gap: .2rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .course-row { grid-template-columns: 1fr 1fr auto; }
  .result-main { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
}
