@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=DM+Sans:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface2: #f0ede4;
  --border: #e0dccf;
  --border-strong: #d2c7b7;
  --accent: #c8551e;
  --accent-dark: #9f3e11;
  --accent-soft: #f4e4d6;
  --gold: #b8860b;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --text-dim: #7b746c;
  --overlay: rgba(20, 18, 16, 0.46);
  --radius: 12px;
  --header-height: 76px;
  --content-max: 1180px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 2px rgba(20, 18, 16, 0.06);
  --shadow-lg: -18px 0 50px rgba(20, 18, 16, 0.18);
  --glow: 0 8px 28px rgba(200, 85, 30, 0.13);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
}
.breadcrumb-wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--content-max));
  margin: 1.25rem auto 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.55rem 0.8rem;

  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);

  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--border-strong);
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.breadcrumb-separator {
  color: var(--text-dim);
}

.breadcrumb-current {
  color: var(--accent-dark);
}
body.nav-open {
  overflow: hidden;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  transform: translateY(-150%);
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---- NAVBAR ---- */
.masthead-top {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.masthead-top.scrolled {
  border-bottom-color: var(--border);
  background: rgba(250, 250, 247, 0.97);
  box-shadow: var(--shadow-sm);
}

.masthead {
  width: min(100% - 2rem, var(--content-max));
  height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  position: relative;
  z-index: 1101;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.logo:hover {
  color: var(--accent);
}

.logo-icon,
.footer-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: linear-gradient(135deg, #fff, var(--accent-soft));
  border: 1px solid rgba(200, 85, 30, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.logo:hover .logo-icon {
  transform: translateY(-1px) rotate(-4deg);
  background: var(--accent);
  color: #fff;
}

.logo-icon svg,
.footer-logo-icon svg {
  width: 20px;
  height: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(240, 237, 228, 0.78);
}

.nav-link:active {
  transform: translateY(1px);
}

.nav-link[aria-current="page"] {
  color: var(--accent-dark);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(200, 85, 30, 0.16);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.menu-toggle {
  position: relative;
  z-index: 1101;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.menu-toggle:hover {
  border-color: rgba(200, 85, 30, 0.42);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.menu-toggle:active {
  transform: scale(0.97);
}

.menu-toggle-bars {
  position: relative;
  width: 22px;
  height: 16px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after,
.menu-toggle-bars span {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition:
    transform 0.24s ease,
    opacity 0.18s ease;
}

.menu-toggle[aria-expanded="true"] {
  border-color: rgba(200, 85, 30, 0.5);
  background: var(--accent);
  color: #fff;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars span {
  opacity: 0;
  transform: scaleX(0.4);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid rgba(200, 85, 30, 0.22);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

/* ---- GRID ---- */
.subject-grid {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.subject-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition:
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

.subject-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.subject-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.subject-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

.subject-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- PROSE ---- */
.prose {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  background: transparent;
}

.prose h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text);
}

.prose h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  font-weight: 800;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.75;
}

.prose a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.prose th {
  background: var(--surface2);
  color: var(--text);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  font-weight: 700;
}

.prose td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.prose tr:last-child td {
  border-bottom: none;
}

.prose tr:hover td {
  background: rgba(200, 85, 30, 0.06);
}

.prose .highlight {
  background: #fff8e7;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text);
}

.tag {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

/* ---- FOOTER ---- */
.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: clamp(2.5rem, 5vw, 4rem) 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(240, 237, 228, 0.86),
    rgba(238, 232, 220, 0.98)
  );
  color: var(--text-muted);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.footer-top {
  width: min(100%, var(--content-max));
  margin: 0 auto 2.25rem;
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  transition: color 0.2s ease;
}

.footer-logo:hover {
  color: var(--accent);
}

.footer-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.footer-logo:hover .footer-logo-icon {
  color: #fff;
  background: var(--accent);
}

.footer-tagline {
  max-width: 280px;
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.75;
}

.footer-col-title {
  margin-bottom: 0.85rem;
  color: var(--text);
  font-family: "Playfair Display", serif;
  font-size: 1.16rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-link {
  position: relative;
  width: fit-content;
  padding: 0.1rem 0;
  font-size: 0.92rem;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.footer-link:hover {
  color: var(--accent-dark);
  transform: translateX(3px);
}

.footer-link:hover::after {
  transform: scaleX(1);
}

.footer-disclaimer,
.footer-bottom {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  border-top: 1px solid rgba(210, 199, 183, 0.72);
}

.footer-disclaimer {
  margin-bottom: 1.25rem;
  padding-top: 1.3rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.75;
  font-style: italic;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1.15rem;
  color: var(--text-dim);
  font-size: 0.83rem;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 940px) {
  :root {
    --header-height: 68px;
  }

  .masthead {
    width: min(100% - 1.5rem, var(--content-max));
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1100;
    width: min(86vw, 360px);
    height: 100dvh;
    padding: calc(var(--header-height) + 1rem) 1rem
      max(1rem, env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    overflow-y: auto;
    background: linear-gradient(
      180deg,
      rgba(251, 250, 246, 0.98),
      rgba(244, 238, 228, 0.98)
    );
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateX(105%);
    visibility: hidden;
    transition:
      transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
      visibility 0.28s ease;
  }

  .main-nav.open {
    transform: translateX(0);
    visibility: visible;
  }

  .main-nav::before {
    content: "Menu";
    display: block;
    margin: 0 0 0.55rem;
    padding: 0 0.2rem 0.7rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
  }

  .nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 50px;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    font-size: 1rem;
    color: var(--text);
  }

  .nav-link:hover {
    background: var(--surface2);
  }

  .nav-link[aria-current="page"] {
    background: var(--accent-soft);
    box-shadow:
      inset 4px 0 0 var(--accent),
      inset 0 0 0 1px rgba(200, 85, 30, 0.13);
  }

  .nav-link[aria-current="page"]::after {
    display: none;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-tagline {
    max-width: 620px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 64px;
  }

  .masthead {
    width: min(100% - 1rem, var(--content-max));
    gap: 0.75rem;
  }

  .logo {
    font-size: 1.35rem;
    gap: 0.5rem;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .main-nav {
    width: 100vw;
    border-left: 0;
  }

  .hero {
    padding: 3rem 1.25rem 2rem;
  }

  .subject-grid {
    padding: 0 1.25rem 3rem;
  }

  .prose {
    padding: 3rem 1.25rem 4rem;
  }

  .prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
.visible-faq {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.visible-faq-header {
  margin-bottom: 1.5rem;
}

.visible-faq .tag {
  display: inline-block;
  background: var(--surface2, #f0ede4);
  border: 1px solid var(--border, #e0dccf);
  color: var(--text-muted, #4a4a4a);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.visible-faq h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text, #1a1a1a);
  margin-bottom: 0.75rem;
}

.visible-faq-intro {
  max-width: 620px;
  color: var(--text-muted, #4a4a4a);
  font-size: 1rem;
  line-height: 1.75;
}

.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #e0dccf);
  border-radius: var(--radius, 12px);
  box-shadow: var(
    --shadow,
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04)
  );
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  color: var(--text, #1a1a1a);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: var(--accent-soft, #f4e4d6);
  color: var(--accent-dark, #9f3e11);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--accent, #c8551e);
  color: #fff;
}

.faq-item summary:hover {
  background: rgba(240, 237, 228, 0.58);
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--accent, #c8551e);
  outline-offset: -3px;
}

.faq-answer {
  border-top: 1px solid var(--border, #e0dccf);
  padding: 0.95rem 1.15rem 1.1rem;
  color: var(--text-muted, #4a4a4a);
  line-height: 1.75;
}

.faq-answer a {
  color: var(--accent, #c8551e);
  font-weight: 700;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .visible-faq {
    padding: 0 1.25rem 4rem;
  }

  .faq-item summary {
    align-items: flex-start;
    padding: 0.95rem 1rem;
  }

  .faq-answer {
    padding: 0.85rem 1rem 1rem;
  }
}
