/* ===========================================================
   Gradely support site — design system
   Self-hosted variable fonts: Quicksand (display) + Nunito (body)
=========================================================== */

@font-face {
  font-family: 'Quicksand';
  src: url('../fonts/Quicksand-Variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('../fonts/Nunito-Variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Surfaces */
  --bg: #15161a;
  --bg-alt: #1a1c21;
  --surface: #1f2228;
  --surface-2: #262a32;
  --border: #2d313a;
  --border-soft: rgba(255, 255, 255, 0.07);

  /* Text */
  --text: #e9ebef;
  --text-muted: #9ba0ac;
  --text-faint: #6b7080;

  /* Accent — darkish light blue */
  --accent: #5ea1d8;
  --accent-bright: #82c0f2;
  --accent-dim: #3c6f96;
  --accent-wash: rgba(94, 161, 216, 0.12);

  /* Secondary accent — warm, used sparingly for Pro / rewards */
  --gold: #e0b465;
  --gold-wash: rgba(224, 180, 101, 0.12);

  --danger: #d9827a;
  --success: #6cbf9a;

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  /* Type */
  --font-display: 'Quicksand', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.24), 0 12px 32px -12px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.3), 0 20px 48px -16px rgba(0, 0, 0, 0.55);

  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle background texture — soft dot grid, not a flat void */
body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.035) 1px, transparent 0);
  background-size: 28px 28px;
}

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
}

@media (max-width: 640px) {
  section { padding: 40px 0; }
}

/* ---------- Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(21, 22, 26, 0.78);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-links a.active {
  color: var(--accent-bright);
  background: var(--accent-wash);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 8px;
  cursor: pointer;
}

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    right: 16px;
    left: auto;
    width: 190px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-lift);
  }
  .nav-links.open a { width: 100%; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #0e1520;
  box-shadow: 0 8px 20px -8px rgba(94, 161, 216, 0.55);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(94, 161, 216, 0.65); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent-dim); }

.btn-sm { padding: 9px 16px; font-size: 0.88rem; border-radius: var(--radius-sm); }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card-hover { transition: border-color 0.2s ease, transform 0.2s ease; }
.card-hover:hover { border-color: var(--accent-dim); transform: translateY(-3px); }

.icon-tile {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--accent-wash);
  color: var(--accent-bright);
  border: 1px solid rgba(94, 161, 216, 0.25);
}

.badge-gold {
  background: var(--gold-wash);
  color: var(--gold);
  border-color: rgba(224, 180, 101, 0.3);
}

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .grid { gap: 14px; }
  .card { padding: 20px; }
  .icon-tile { width: 40px; height: 40px; margin-bottom: 12px; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(94, 161, 216, 0.16), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 28px 0 36px; }
  .hero-inner { gap: 32px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-bright);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.accent-underline {
  position: relative;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ---------- Mock panel (hero visual) ---------- */

.mock-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-lift);
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 4px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
}

.mock-row:last-child { border-bottom: none; }

.mock-course { color: var(--text); font-weight: 700; }
.mock-grade { color: var(--accent-bright); font-weight: 800; font-family: var(--font-display); }

.mock-gpa {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-wash), transparent);
  border: 1px solid rgba(94, 161, 216, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 640px) {
  .mock-panel { padding: 16px; }
  .mock-row { padding: 10px 4px; }
  .mock-gpa { margin-top: 12px; padding: 14px; }
}

.mock-gpa .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--accent-bright);
}

/* ---------- Sections ---------- */

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

@media (max-width: 640px) {
  .section-head { margin-bottom: 28px; }
}

.section-head p { margin: 0; }

/* ---------- FAQ ---------- */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.faq-question .plus {
  flex-shrink: 0;
  color: var(--accent-bright);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-question .plus { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer-inner {
  padding: 0 22px 20px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .faq-question { padding: 14px 16px; }
  .faq-answer-inner { padding: 0 16px 16px; }
  .faq-item { margin-bottom: 10px; }
}

/* ---------- Forms ---------- */

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 7px;
  color: var(--text);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}

.field textarea { resize: vertical; min-height: 120px; }

/* ---------- Pricing ---------- */

.price-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.price-card .amount {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0 2px;
}

.price-card .amount span {
  font-size: 0.95rem;
  color: var(--text-faint);
  font-weight: 600;
  font-family: var(--font-body);
}

.price-card ul {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  flex-grow: 1;
}

.price-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.price-card li svg { flex-shrink: 0; margin-top: 3px; color: var(--accent-bright); }

.price-card.featured {
  border-color: var(--accent-dim);
  background: linear-gradient(180deg, var(--accent-wash), var(--surface) 40%);
  position: relative;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-alt);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

@media (max-width: 700px) {
  .site-footer { padding: 32px 0 20px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
    margin-bottom: 20px;
  }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-grid h4 { margin-bottom: 8px; }
  .footer-grid ul { gap: 5px; }
  .footer-grid a { font-size: 0.85rem; }
}

.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-grid a {
  color: var(--text-muted);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.footer-grid a:hover { color: var(--accent-bright); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 0.85rem;
}

.footer-disclaimer {
  color: var(--text-faint);
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 760px;
  margin: 0 0 24px;
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 64px 0 100px;
}

@media (max-width: 640px) {
  .legal { padding: 32px 0 56px; }
}

.legal h2 {
  margin-top: 2em;
  font-size: 1.4rem;
}

.legal h2:first-of-type { margin-top: 0; }

.legal ul { color: var(--text-muted); padding-left: 1.2em; }
.legal li { margin-bottom: 0.5em; }

.legal-updated {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: 2.5em;
}

.notice-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 2.5em;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Misc ---------- */

.text-center { text-align: center; }
.mt-lg { margin-top: 48px; }

.divider {
  height: 1px;
  background: var(--border-soft);
  border: none;
  margin: 0;
}

.cta-band {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
  padding: 56px;
  text-align: center;
}

@media (max-width: 640px) {
  .cta-band { padding: 28px 20px; }
}

/* ---------- Coming soon ---------- */

.coming-soon {
  position: relative;
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 64px 0;
}

.coming-soon canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.coming-soon-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 520px;
}

.coming-soon-inner p {
  font-size: 1.05rem;
  margin: 16px 0 28px;
}
