:root {
  --brand: #0f4c81;
  --brand-dark: #0a3560;
  --accent: #f2a541;
  --ink: #1c2733;
  --muted: #56646f;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --border: #dbe3ea;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(12, 42, 70, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

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

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3 { line-height: 1.25; color: var(--brand-dark); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.2rem 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 780px; }
.center { justify-content: center; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; flex-wrap: wrap; }

.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--brand-dark); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__text { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.brand__oy { font-weight: 400; color: var(--muted); }

.primary-nav { margin-left: auto; }
.primary-nav a {
  display: inline-block; padding: 0.45rem 0.7rem; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.primary-nav a:hover { background: var(--bg-alt); color: var(--brand-dark); }
.primary-nav a.active { color: var(--brand); background: var(--bg-alt); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 0.5rem; margin-left: auto; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--brand-dark); margin: 4px 0; border-radius: 2px; }

.header-cta { margin-left: auto; }
.primary-nav + .header-cta { margin-left: 0; }

/* Hero */
.hero {
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(242, 165, 65, 0.22), transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; padding: 4.5rem 0 4rem;
}
.hero h1 { color: #fff; max-width: 22ch; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: #ffd9a0; margin: 0 0 0.8rem; }
.lead { font-size: 1.15rem; max-width: 58ch; color: rgba(255, 255, 255, 0.92); }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-actions.center { justify-content: center; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.7rem 1.4rem; border-radius: 999px;
  background: var(--accent); color: #33230a; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: #ffb95a; color: #33230a; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
main .btn--ghost, section .btn--ghost { color: var(--brand); border-color: var(--brand); }
main .btn--ghost:hover, section .btn--ghost:hover { background: var(--bg-alt); color: var(--brand-dark); }
.btn--small { padding: 0.45rem 1rem; font-size: 0.9rem; }

/* Sections */
.section { padding: 3.2rem 0; }
.section--alt { background: var(--bg-alt); }
.section--stats { background: var(--brand-dark); color: #fff; padding: 2.2rem 0; }
.section--stats h2 { color: #fff; }
.section--cta { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; text-align: center; }
.section--cta h2 { color: #fff; }
.section--cta .container { max-width: 760px; }
.section-intro { color: var(--muted); max-width: 60ch; }
.section--cta .btn { background: var(--accent); color: #33230a; }
.section--cta .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.7); }
.section--cta .btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; text-align: center; }
.stats strong { display: block; font-size: 2.2rem; font-weight: 800; color: var(--accent); }
.stats span { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }

/* Grids and cards */
.grid { display: grid; gap: 1.2rem; margin: 1.5rem 0 0.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--subjects { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--books { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem 1.4rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.45rem; text-decoration: none; color: inherit;
}
.card > p { margin: 0; }
.card-actions { margin-top: auto; display: flex; gap: 0.6rem; padding-top: 0.7rem; }

.subject-tile {
  border-radius: var(--radius); padding: 1.5rem 1.3rem; text-decoration: none; color: inherit;
  background: linear-gradient(150deg, #fff, var(--bg-alt)); border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.subject-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.subject-tile p { color: var(--muted); margin: 0; }

.badge-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.badge {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(15, 76, 129, 0.12); color: var(--brand-dark);
  padding: 0.2rem 0.6rem; border-radius: 999px;
}
.badge--muted { background: var(--bg-alt); color: var(--muted); }
.book-code { color: var(--muted); font-size: 0.85rem; margin: 0; }
.book-format { color: var(--muted); font-size: 0.9rem; margin: 0; }
.book-price { font-size: 1.15rem; font-weight: 800; color: var(--brand-dark); margin: 0.2rem 0 0; }

/* Filters */
.filters { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filters select {
  padding: 0.5rem 0.8rem; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font: inherit; color: var(--ink);
}
.filter-count { margin: 0 0 0 auto; color: var(--muted); font-size: 0.9rem; }
.book-card[hidden] { display: none; }

/* Quotes */
.quote {
  margin: 1.5rem 0; padding: 1.2rem 1.5rem; border-left: 4px solid var(--accent);
  background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0;
}
.quote p { margin: 0; font-size: 1.1rem; }
.quote footer { color: var(--muted); margin-top: 0.5rem; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--border); }
.timeline li { position: relative; padding: 0 0 1.4rem 1.4rem; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 6px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--border);
}
.timeline strong { display: block; color: var(--brand-dark); font-size: 1.05rem; }
.timeline p { margin: 0.2rem 0 0; }

/* News */
.news-item { padding: 1.3rem 0; border-bottom: 1px solid var(--border); }
.news-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 0.3rem; }
.news-item h2 { margin: 0 0 0.5rem; }
.news-item p { margin: 0; }

/* FAQ */
.faq details { border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1.2rem; margin-bottom: 0.7rem; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 1rem; background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.form-row label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.form-row input, .form-row textarea {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; background: #fff; color: var(--ink);
}
.form-row input:focus-visible, .form-row textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.form-check { display: flex; align-items: flex-start; gap: 0.5rem; }
.form-check input { width: auto; margin-top: 0.3rem; }
.form-check label { font-weight: 400; }
.contact-list { padding-left: 1.1rem; }

/* Footer */
.site-footer { background: var(--brand-dark); color: rgba(255, 255, 255, 0.85); margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding: 3rem 1.25rem 2rem; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand__text { color: #fff; }
.footer-brand .brand__oy { color: rgba(255, 255, 255, 0.6); }
.footer-col h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-contact { font-size: 0.9rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid rgba(255, 255, 255, 0.15); padding: 1.1rem 1.25rem; font-size: 0.85rem; }
.footer-bottom a { color: #ffd9a0; }

:where(a, button, input, select, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .primary-nav {
    display: none; width: 100%; margin: 0 0 0.8rem; padding-top: 0.6rem;
    border-top: 1px solid var(--border);
  }
  .primary-nav.open { display: block; }
  .primary-nav a { display: block; padding: 0.55rem 0.3rem; }
  .nav-toggle { display: block; }
  .header-cta { margin-left: 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0; }
}
