:root {
  --blue: #6c8cc7;
  --blue-deep: #526fa7;
  --ink: #17202c;
  --paper: #f4f2ed;
  --line: rgba(23, 32, 44, 0.14);
  --white: #ffffff;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, a { font: inherit; }
[hidden] { display: none !important; }

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--white);
  background: #1c2735;
}

.hero-video,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video { object-fit: cover; }
.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 12, 18, 0.62) 0%, rgba(7, 12, 18, 0.36) 52%, rgba(7, 12, 18, 0.2) 100%),
    linear-gradient(0deg, rgba(7, 12, 18, 0.58) 0%, transparent 52%);
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255,255,255,.26);
}

.brand { display: inline-flex; align-items: center; gap: 13px; color: white; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.16)); }
.brand-name { font-size: 15px; font-weight: 650; letter-spacing: .02em; }
.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  width: min(1320px, calc(100% - 64px));
  min-height: calc(100svh - 103px);
  margin: 0 auto;
  padding: 64px 0 110px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .2em;
}
.hero-kicker { color: rgba(255,255,255,.74); }
.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(48px, 7.6vw, 104px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 620;
}

.class-picker {
  width: min(850px, 100%);
  margin-top: clamp(42px, 7vh, 78px);
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.34);
}
.picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.picker-heading span { font-size: 10px; font-weight: 750; letter-spacing: .18em; }
.picker-heading small { color: rgba(255,255,255,.68); font-size: 11px; }
.grade-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.grade-button {
  min-height: 112px;
  padding: 17px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 4px;
  color: white;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.grade-button b { display: block; font-size: 37px; line-height: 1; font-weight: 540; }
.grade-button span { display: block; margin-top: 17px; font-size: 10px; letter-spacing: .06em; }
.grade-button.unavailable { opacity: .5; cursor: not-allowed; }
.grade-button.available {
  border-color: white;
  cursor: pointer;
  background: white;
  color: var(--ink);
  transition: transform .22s ease, background .22s ease;
}
.grade-button.available:hover { transform: translateY(-4px); background: #edf2fb; }
.grade-button.available:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.materials {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 96px 0 120px;
}
.materials.reveal { animation: reveal .55s cubic-bezier(.2,.8,.2,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.materials-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.section-kicker { color: var(--blue-deep); margin-bottom: 10px; }
.materials h2 { margin: 0; font-size: clamp(42px, 6vw, 76px); line-height: 1; letter-spacing: -.055em; font-weight: 590; }
.change-grade { border: 0; border-bottom: 1px solid var(--ink); padding: 5px 0; color: var(--ink); background: transparent; cursor: pointer; font-size: 12px; }

.material-grid { border-top: 1px solid var(--line); }
.material-card {
  display: grid;
  grid-template-columns: 50px 74px 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 164px;
  padding: 25px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: padding .25s ease, background .25s ease;
}
.material-card:hover { padding-inline: 22px; background: rgba(108,140,199,.09); }
.material-number { align-self: start; padding-top: 5px; color: #7b8189; font: 11px ui-monospace, monospace; }
.material-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 88px;
  border-radius: 3px;
  color: white;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(82,111,167,.18);
}
.material-icon svg { width: 38px; height: 38px; fill: currentColor; }
.material-icon svg text { fill: currentColor; font: 800 10px "Avenir Next", Avenir, "Segoe UI", sans-serif; letter-spacing: -.04em; }
.material-icon .icon-cut { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.material-icon--reading { color: var(--blue); background: rgba(108,140,199,.14); }
.material-icon--reading svg path:first-child { fill: var(--blue); }
.material-icon--reading .icon-cut { stroke: white; }
.material-icon--grammar { color: #248e69; background: rgba(36,142,105,.13); }
.material-icon--listening { color: #36a9d2; background: rgba(54,169,210,.14); }
.material-icon--grammar,
.material-icon--listening { box-shadow: none; }

.category-page { display: flex; flex-direction: column; min-height: 100vh; background: var(--paper); }
.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.category-header .brand { color: var(--ink); }
.back-link { color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 650; }
.back-link:hover { color: var(--blue-deep); }
.category-main { flex: 1; width: min(1120px, calc(100% - 64px)); margin: 0 auto; padding: 84px 0 120px; }
.category-intro { display: grid; grid-template-columns: 88px 1fr; gap: 28px; align-items: center; padding-bottom: 54px; }
.category-intro .material-icon { width: 88px; height: 88px; border-radius: 24px; }
.category-intro .material-icon svg { width: 42px; height: 42px; }
.category-intro h1 { margin: 0; font-size: clamp(48px, 8vw, 92px); line-height: .95; letter-spacing: -.06em; font-weight: 590; }
.category-intro p { margin: 12px 0 0; color: #747982; font-size: 14px; }
.resource-list { border-top: 1px solid var(--line); }
.resource-link {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 30px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: padding .2s ease, background .2s ease;
}
.resource-link:hover { padding-inline: 20px; background: rgba(108,140,199,.09); }
.resource-file { display: grid; place-items: center; width: 44px; height: 56px; color: white; background: var(--blue); border-radius: 3px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.resource-copy h2 { margin: 0 0 6px; font-size: clamp(20px, 3vw, 28px); font-weight: 600; letter-spacing: -.025em; }
.resource-copy p { margin: 0; color: #747982; font-size: 12px; }
.resource-action { font-size: 12px; font-weight: 650; }
.site-footer {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
  color: #747982;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.material-type { color: var(--blue-deep); font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.material-copy h3 { margin: 0; font-size: clamp(20px, 3vw, 31px); font-weight: 590; letter-spacing: -.03em; }
.material-copy p { margin: 0; color: #747982; font-size: 12px; }
.material-action { font-size: 12px; font-weight: 650; }
.material-action span { display: inline-block; margin-left: 7px; transition: transform .2s ease; }
.material-card:hover .material-action span { transform: translate(3px,-3px); }

@media (max-width: 720px) {
  .site-header,
  .hero-content,
  .materials { width: min(100% - 36px, 1320px); }
  .site-header { padding: 18px 0; }
  .brand-mark { width: 46px; height: 46px; }
  .brand-name { max-width: 170px; font-size: 12px; line-height: 1.15; }
  .hero-content { min-height: calc(100svh - 83px); padding: 54px 0 80px; }
  .hero h1 { font-size: clamp(42px, 11.5vw, 58px); line-height: .98; }
  .picker-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .grade-grid { grid-template-columns: repeat(2, 1fr); }
  .grade-button { min-height: 94px; }
  .materials { padding: 68px 0 86px; }
  .materials-heading { align-items: flex-start; flex-direction: column; }
  .material-card { grid-template-columns: 34px 58px 1fr; gap: 15px; min-height: 138px; }
  .material-icon { width: 56px; height: 72px; }
  .material-action { display: none; }
  .category-header,
  .category-main,
  .site-footer { width: min(100% - 36px, 1120px); }
  .category-header { padding: 18px 0; }
  .category-main { padding: 58px 0 86px; }
  .category-intro { grid-template-columns: 64px 1fr; gap: 18px; padding-bottom: 42px; }
  .category-intro .material-icon { width: 64px; height: 64px; border-radius: 18px; }
  .category-intro .material-icon svg { width: 32px; height: 32px; }
  .category-intro h1 { font-size: clamp(40px, 13vw, 58px); }
  .resource-link { grid-template-columns: 42px 1fr; gap: 15px; }
  .resource-action { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
