/* ============================================================
   StudyThorne — Design System
   Palette: white base, deep teal + soft green accents
   Type: Sora (display) / Inter (body)
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f3f9f8;
  --bg-soft-2: #eef7f3;
  --ink: #142524;
  --ink-soft: #4b6461;
  --ink-faint: #7c928f;
  --border: #dfeae7;
  --primary: #1f7a72;
  --primary-dark: #145a54;
  --primary-tint: #e4f3f1;
  --accent: #56b483;
  --accent-tint: #e8f6ee;
  --warn-bg: #fff7ed;
  --warn-border: #fbd9a5;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow: 0 4px 18px rgba(20, 60, 55, 0.07);
  --shadow-lift: 0 14px 40px rgba(20, 60, 55, 0.12);
  --max: 1120px;
  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.22;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1.1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 76px 0; }
@media (max-width: 720px) { section { padding: 52px 0; } }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* -------- header / nav -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; max-width: var(--max); 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(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--accent)); position: relative; flex-shrink: 0; }
.brand-mark::before {
  content: ""; position: absolute; inset: 8px;
  background: linear-gradient(90deg, #fff 0 33%, transparent 0 66%, #fff 0), linear-gradient(0deg, #fff 0 33%, transparent 0 66%, #fff 0);
  background-size: 100% 4px, 4px 100%; background-repeat: repeat-x, repeat-y; opacity: 0.9; border-radius: 2px;
}
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 0.96rem; }
.nav-links a.active, .nav-links a:hover { color: var(--primary-dark); }
.nav-cta { background: var(--primary); color: #fff !important; padding: 10px 20px; border-radius: 999px; font-weight: 600; }
.nav-cta:hover { background: var(--primary-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: 8px; width: 42px; height: 42px; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; transition: transform .2s, opacity .2s; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 24px 20px; border-bottom: 1px solid var(--border); display: none; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; width: 100%; }
  .nav-cta { display: inline-block; margin-top: 6px; }
}

/* -------- buttons -------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; font-size: 1rem; padding: 14px 26px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--primary-dark); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

/* -------- hero -------- */
.hero { padding: 64px 0 88px; background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.eyebrow-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-tint); color: var(--primary-dark); border-radius: 999px; padding: 7px 14px; font-size: 0.85rem; font-weight: 600; margin-bottom: 18px; }
.eyebrow-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-visual { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); padding: 28px; }
.hero-visual .mini-label { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 14px; }

/* -------- stat / trust bar -------- */
.trust-bar { display: flex; flex-wrap: wrap; gap: 34px; justify-content: space-between; margin-top: 46px; padding-top: 30px; border-top: 1px solid var(--border); }
.trust-item { min-width: 140px; }
.trust-item strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--primary-dark); }
.trust-item span { color: var(--ink-faint); font-size: 0.9rem; }

/* -------- benefit cards -------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 42px; }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }
.benefit-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px 22px; }
.benefit-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-tint); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--primary-dark); }
.benefit-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.benefit-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0; }

/* -------- section headers -------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head p { color: var(--ink-soft); margin: 6px 0 0; max-width: 60ch; }
.section-alt { background: var(--bg-soft); }

/* -------- blog cards -------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease; }
.post-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.post-thumb { height: 150px; background: linear-gradient(135deg, var(--primary-tint), var(--accent-tint)); display: flex; align-items: center; justify-content: center; }
.post-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-tag { font-size: 0.78rem; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.post-card h3 { font-size: 1.06rem; margin-bottom: 0; }
.post-card p { color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 0; flex: 1; }
.read-more { font-weight: 600; font-size: 0.92rem; margin-top: 6px; }

/* -------- footer CTA -------- */
.cta-band { background: var(--primary); color: #fff; border-radius: var(--radius-lg); padding: 52px 44px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.82); margin-bottom: 0; }
.cta-band .btn-outline { background: #fff; border-color: #fff; color: var(--primary-dark); }

/* -------- footer -------- */
footer.site-footer { background: var(--ink); color: #cfe0dd; padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,0.12); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand p { color: #9fb6b2; font-size: 0.92rem; max-width: 34ch; }
.footer-col h4 { color: #fff; font-size: 0.92rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: #b7cbc7; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 22px; font-size: 0.85rem; color: #85a19c; }

/* -------- generic tool panel -------- */
.tool-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
@media (max-width: 820px) { .tool-panel { grid-template-columns: 1fr; padding: 24px; } }
.tool-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tool-tab { border: 1px solid var(--border); background: #fff; padding: 8px 14px; border-radius: 999px; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.tool-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input[type=text], .field input[type=url], .field input[type=email], .field input[type=tel], .field input[type=number], .field input[type=date], .field input[type=time], .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-family: var(--font-body); font-size: 0.96rem; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 100px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

.qr-output { background: var(--bg-soft); border-radius: var(--radius-md); padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; gap: 16px; }
.qr-hint { font-size: 0.85rem; color: var(--ink-faint); text-align: center; }

.steps-list { counter-reset: step; list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.steps-list li { display: flex; gap: 16px; }
.steps-list .num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
.steps-list strong { display: block; margin-bottom: 2px; }
.steps-list p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

.tool-chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 22px; }
@media (max-width: 820px) { .tool-chip-grid { grid-template-columns: repeat(2, 1fr); } }
.tool-chip { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; background: #fff; }
.tool-chip h4 { margin-bottom: 4px; font-size: 0.98rem; }
.tool-chip p { font-size: 0.86rem; color: var(--ink-faint); margin-bottom: 8px; }
.tool-chip .soon { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; }

.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; font-family: var(--font-display); font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--primary); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 12px 0 0; color: var(--ink-soft); }

/* -------- blog article -------- */
.article-header { max-width: 74ch; margin: 0 auto; text-align: left; }
.article-meta { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 14px; }
.article-body { max-width: 74ch; margin: 0 auto; }
.article-body h2 { margin-top: 1.6em; }
.article-body h3 { margin-top: 1.3em; }
.article-body ul, .article-body ol { padding-left: 1.3em; color: var(--ink-soft); }
.article-body li { margin-bottom: 0.5em; }
.article-body blockquote { border-left: 3px solid var(--accent); margin: 1.6em 0; padding: 4px 0 4px 20px; color: var(--ink-soft); font-style: italic; }
.article-cover { height: 220px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--primary-tint), var(--accent-tint)); margin: 26px 0 8px; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; }
.tag-pill { background: var(--primary-tint); color: var(--primary-dark); font-size: 0.78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.internal-link-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; margin: 2em 0; }
.internal-link-box p { margin: 0; font-size: 0.96rem; }

/* -------- generic content pages -------- */
.page-head { text-align: center; max-width: 62ch; margin: 0 auto; }
.page-head p.lead { margin: 0 auto; }
.prose { max-width: 74ch; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }

.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 46px; align-items: center; }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }
.avatar-placeholder { width: 100%; aspect-ratio: 1; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-size: 3rem; font-weight: 700; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-card { background: var(--bg-soft); border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--border); }
.contact-info-card h3 { font-size: 1rem; margin: 18px 0 4px; }
.contact-info-card h3:first-child { margin-top: 0; }
.contact-info-card p { color: var(--ink-soft); margin-bottom: 0; font-size: 0.95rem; }
.form-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 10px; }
.form-success { display: none; background: var(--accent-tint); border: 1px solid var(--accent); color: var(--primary-dark); padding: 14px 16px; border-radius: var(--radius-sm); margin-top: 16px; font-size: 0.92rem; }

.breadcrumb { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--primary); }

.divider { height: 1px; background: var(--border); border: none; margin: 0; }
.text-center { text-align: center; }
.small-note { font-size: 0.85rem; color: var(--ink-faint); }
.legal-updated { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 30px; }

.category-table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.category-table th, .category-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.category-table th { font-family: var(--font-display); font-size: 0.9rem; }

/* -------- result stat blocks -------- */
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
@media (max-width: 560px) { .result-grid { grid-template-columns: repeat(2, 1fr); } }
.result-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 14px; text-align: center; }
.result-stat .big-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--primary-dark); line-height: 1.1; }
.result-stat .stat-label { font-size: 0.78rem; color: var(--ink-faint); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.headline-result { text-align: center; padding: 10px 0 20px; }
.headline-result .big-line { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--ink); }
.headline-result .sub-line { color: var(--ink-soft); margin-top: 6px; }

.countdown-display { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.countdown-unit { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 16px; min-width: 84px; text-align: center; box-shadow: var(--shadow); }
.countdown-unit .cd-num { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--primary-dark); }
.countdown-unit .cd-label { font-size: 0.75rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }

/* -------- table-row builder (GPA / grade tools) -------- */
.row-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.row-table th { text-align: left; font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.03em; padding: 0 8px 8px; }
.row-table td { padding: 6px 8px; vertical-align: middle; }
.row-table input, .row-table select { width: 100%; padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 0.92rem; }
.row-remove-btn { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; }
.row-remove-btn:hover { color: #c0392b; }
.add-row-btn { margin-top: 12px; }

.code-block { background: var(--ink); color: #dff0ec; border-radius: var(--radius-md); padding: 18px 20px; font-family: monospace; font-size: 0.85rem; line-height: 1.7; overflow-x: auto; white-space: pre-wrap; margin-top: 14px; }
.copy-row { display: flex; justify-content: flex-end; margin-top: 10px; }
