:root {
  --bg: #f8f7f4;
  --paper: #ffffff;
  --ink: #22201c;
  --mute: #6b6862;
  --line: #e6e3dc;
  --accent: #4f4b45;
  --accent-soft: #8f8a80;
  --danger: #8a3d36;
  --ok: #2f5a48;
  --shadow: 0 18px 40px rgba(34, 32, 28, 0.06);
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
  --wrap: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.04rem;
  line-height: 1.72;
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3,
.wordmark,
.footer-brand {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.16;
}

h1 {
  font-size: clamp(2.15rem, 4.6vw, 3.7rem);
  margin: 0 0 0.55em;
}

h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
  margin: 0 0 0.5em;
}

h3 {
  font-size: 1.18rem;
  margin: 0 0 0.35em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: min(calc(100% - 3.2rem), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.8rem;
  z-index: 40;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(calc(100% - 3.2rem), var(--wrap));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.08rem;
}

.mark {
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid var(--ink);
  background:
    linear-gradient(var(--ink) 0 0) 0 100% / 38% 55% no-repeat,
    linear-gradient(var(--accent-soft) 0 0) 100% 100% / 38% 38% no-repeat;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.35rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--mute);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 0.38rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.hero-magazine {
  padding: clamp(2.4rem, 6vw, 4.4rem) 0 0;
}

.hero-photo {
  overflow: hidden;
  animation: fade 0.9s ease both;
}

.hero-photo img {
  width: 100%;
  height: min(52vh, 460px);
  object-fit: cover;
  filter: grayscale(12%);
}

.hero-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0 2.2rem;
  color: var(--mute);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 40rem;
  padding-bottom: clamp(2.6rem, 6vw, 4.4rem);
  animation: fade 0.7s ease 0.1s both;
}

.hero-copy .lede {
  font-size: 1.12rem;
  color: var(--mute);
}

.text-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.08rem;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--ink);
  color: var(--bg);
}

.btn-solid:hover {
  color: var(--bg);
  background: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.section {
  padding: clamp(3.6rem, 7vw, 6.4rem) 0;
}

.section-paper {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent-soft);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.grid-3,
.grid-2,
.card-grid {
  display: grid;
  gap: 1.4rem;
}

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

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.card,
.quote,
.price-card,
.article-card,
.course-card,
.case,
.refuse {
  background: var(--paper);
  border: 1px solid var(--line);
}

.course-card img,
.article-card img,
.cover img {
  width: 100%;
  height: 198px;
  object-fit: cover;
}

.pad {
  padding: 1.25rem 1.3rem 1.45rem;
}

.quote {
  padding: 1.45rem 1.5rem 1.55rem;
}

.quote p {
  font-family: var(--serif);
  font-size: 1.12rem;
}

.quote footer {
  color: var(--mute);
  font-size: 0.88rem;
}

.muted {
  color: var(--mute);
}

.featured-course {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.featured-course img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-row div {
  padding: 1.7rem 1.15rem;
  border-right: 1px solid var(--line);
}

.stat-row div:last-child {
  border-right: 0;
}

.stat-row strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.55rem;
}

.price-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}

.price-card:hover {
  transform: translateY(-4px);
}

.price {
  font-family: var(--serif);
  font-size: 1.85rem;
  margin: 0.35rem 0 1rem;
}

.price-card ul {
  padding-left: 1.1rem;
  flex: 1;
}

.price-card.featured {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.price-card.featured a,
.price-card.featured .muted {
  color: #d5d1c8;
}

.review-mix {
  display: grid;
  gap: 1.15rem;
}

.stars {
  letter-spacing: 0.16em;
  color: var(--accent-soft);
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}

.person {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.person img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 50%;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 0.95rem 0;
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

form {
  display: grid;
  gap: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.28rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.7rem 0.78rem;
  font: inherit;
  color: var(--ink);
}

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

.field-error {
  min-height: 1.2em;
  color: var(--danger);
  font-size: 0.88rem;
  margin: 0.22rem 0 0;
}

.form-status {
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
}

.form-status.is-success {
  border-color: var(--ok);
  color: var(--ok);
}

.form-status.is-error,
.inline-error {
  border-color: var(--danger);
  color: var(--danger);
}

.inline-error {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--danger);
  background: #f6ecea;
}

.cookie-banner {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 30;
  max-width: 28rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: fade 0.4s ease;
}

.cookie-banner-inner {
  padding: 1.05rem 1.15rem 1.15rem;
}

.cookie-actions {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}

.site-footer {
  background: #1b1a18;
  color: #eceae6;
  padding: 3.4rem 0 1.35rem;
  margin-top: 2.6rem;
}

.site-footer a {
  color: #eceae6;
}

.footer-grid {
  width: min(calc(100% - 3.2rem), var(--wrap));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.75fr;
  gap: 1.7rem;
}

.footer-brand {
  font-size: 1.35rem;
  margin: 0 0 0.45rem;
}

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

.site-footer h2 {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b2ada4;
}

.footer-copy {
  width: min(calc(100% - 3.2rem), var(--wrap));
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a7a299;
  font-size: 0.88rem;
}

.page-hero {
  padding: 3.7rem 0 1.2rem;
}

.prose {
  max-width: 42rem;
}

.prose.wide {
  max-width: 52rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
}

th,
td {
  text-align: left;
  padding: 0.68rem 0.78rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.92rem;
}

.module {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 0.85rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

.module b {
  font-family: var(--serif);
}

.case {
  padding: 1.6rem;
  border-left: 3px solid var(--accent);
}

.cover {
  margin: 1.5rem 0 2rem;
}

.cover img {
  height: 286px;
  width: 100%;
  object-fit: cover;
}

.legal table {
  margin: 1.4rem 0 1.8rem;
}

.page-404 {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
}

.refuse {
  padding: 1.3rem 1.35rem;
}

.split-address {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.4rem;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .featured-course,
  .grid-3,
  .grid-2,
  .stat-row,
  .footer-grid,
  .split-address {
    grid-template-columns: 1fr;
  }

  .hero-caption {
    flex-direction: column;
    gap: 0.25rem;
  }

  .stat-row div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 4.4rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1.5rem 1.15rem;
    flex-direction: column;
  }

  .site-nav.is-open {
    display: flex;
  }

  .cookie-banner {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }

  .featured-course img,
  .cover img,
  .hero-photo img {
    height: 220px;
  }
}
