:root {
  --ink: #302725;
  --muted: #776966;
  --paper: #fffdf9;
  --white: #ffffff;
  --line: #ece4dc;
  --teal: #f2a38d;
  --teal-dark: #8a5147;
  --coral: #ee8f9f;
  --pink: #ffdce7;
  --yellow: #fff0b8;
  --orange: #ffd9b7;
  --cream: #fff4de;
  --blush: #ffeaf1;
  --lavender: #f8e7ee;
  --shadow: 0 18px 50px rgba(92, 83, 72, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 244, 248, 0.72), rgba(255, 253, 249, 0) 360px),
    linear-gradient(180deg, #fffdf9 0%, #fff9f3 46%, #fffdf9 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

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

.site-header {
  align-items: center;
  background: rgba(255, 253, 249, 0.86);
  border-bottom: 1px solid rgba(92, 83, 72, 0.08);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 64px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #ee8f9f, #f4b06d);
  border-radius: 50%;
  color: var(--white);
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.site-nav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.site-nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 10px 14px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #fff0f4;
  color: var(--teal-dark);
}

.nav-toggle {
  background: #8a5147;
  border: 0;
  border-radius: 6px;
  color: var(--white);
  display: none;
  font-size: 1.1rem;
  height: 40px;
  width: 44px;
}

.hero {
  min-height: min(760px, calc(100vh - 72px));
  overflow: hidden;
  position: relative;
}

.home-launch {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 220, 231, 0.42), rgba(255, 247, 236, 0.9)),
    #fffdf9;
  display: flex;
  min-height: min(720px, calc(78vh - 72px));
  padding: clamp(54px, 8vw, 92px) clamp(20px, 7vw, 96px);
}

.home-launch-inner {
  max-width: 790px;
}

.home-launch h1 {
  font-size: clamp(2.8rem, 6vw, 6rem);
  max-width: 820px;
}

.home-launch p:not(.eyebrow) {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  max-width: 650px;
}

.clean-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 239, 0.88)),
    linear-gradient(180deg, #fff8fb, #fffdf9 58%, #fff7ef);
}

.hero-content {
  color: var(--ink);
  max-width: 840px;
  min-height: min(760px, calc(100vh - 72px));
  padding: clamp(56px, 9vw, 120px) clamp(20px, 6vw, 72px);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.tag {
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--teal-dark);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 5.7rem);
  line-height: 0.98;
  margin-bottom: 22px;
  max-width: 760px;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.12;
  margin-bottom: 12px;
}

.hero-copy {
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  max-width: 620px;
}

.hero-actions,
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.button {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 7px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  text-decoration: none;
}

.button.primary {
  background: linear-gradient(135deg, #ea8297, #f4a05d);
  color: var(--white);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.76);
  border-color: #f2d5c7;
  color: var(--teal-dark);
}

.launch-note {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #f2d5c7;
  border-radius: 8px;
  margin-top: 28px;
  max-width: 540px;
  padding: 16px 18px;
}

.launch-note span {
  color: var(--coral);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.launch-note p {
  color: var(--muted);
  margin: 0;
}

.section {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 48px);
}

.preview-section {
  padding-top: clamp(44px, 6vw, 70px);
}

.section-heading {
  max-width: 620px;
}

.preview-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.preview-card,
.resource-card,
.library-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(92, 83, 72, 0.06);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.preview-card,
.resource-card {
  padding: clamp(22px, 4vw, 34px);
}

.preview-card:hover,
.resource-card:hover,
.library-card:hover {
  box-shadow: 0 14px 40px rgba(92, 83, 72, 0.09);
  transform: translateY(-2px);
}

.preview-card h3,
.resource-card h3 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.1;
  margin: 0 0 12px;
}

.preview-card p:not(.tag),
.resource-card p:not(.tag) {
  color: var(--muted);
}

.resource-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-thumb {
  border: 1px solid #f1d9d2;
  border-radius: 8px;
  height: 132px;
  margin-bottom: 18px;
}

.resource-thumb span {
  background: rgba(74, 57, 53, 0.86);
  border-radius: 4px;
  color: var(--white);
  float: right;
  font-size: 0.78rem;
  font-weight: 900;
  margin: 10px;
  padding: 3px 7px;
}

.resource-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.save-button,
.remove-button {
  background: #fff8f0;
  border: 1px solid #f0d6cb;
  border-radius: 7px;
  color: var(--teal-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 42px;
  padding: 9px 13px;
  transition: background 180ms ease, transform 180ms ease;
}

.save-button:hover,
.remove-button:hover {
  background: #fff0f4;
  transform: translateY(-1px);
}

.save-button.saved {
  background: #4a3935;
  border-color: #4a3935;
  color: var(--white);
}

.chapter-card .save-button,
.resource-card .save-button {
  margin-top: 18px;
}

.intro-grid,
.card-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature,
.note-card,
.video-card,
.contact-panel,
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(92, 83, 72, 0.06);
}

.feature {
  padding: 26px;
}

.icon {
  align-items: center;
  background: #f8e9d2;
  border-radius: 50%;
  color: var(--teal-dark);
  display: inline-flex;
  font-size: 1.2rem;
  height: 42px;
  justify-content: center;
  margin-bottom: 18px;
  width: 42px;
}

.icon.pink {
  background: var(--pink);
}

.icon.yellow {
  background: var(--yellow);
}

.icon.peach {
  background: var(--cream);
}

.icon.cream {
  background: var(--blush);
}

.feature p,
.note-card p,
.video-card p,
.spotlight p,
.contact-panel p {
  color: var(--muted);
}

.spotlight {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 220, 231, 0.42), rgba(255, 246, 226, 0.78)),
    #fffaf4;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: none;
  padding-left: clamp(18px, 8vw, 120px);
  padding-right: clamp(18px, 8vw, 120px);
}

.spotlight > div:first-child {
  max-width: 700px;
}

.stats-row div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 126px;
  padding: 18px;
}

.stats-row strong {
  color: var(--teal-dark);
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.stats-row span {
  color: var(--muted);
  font-weight: 700;
}

.page-hero {
  padding: clamp(70px, 11vw, 132px) clamp(18px, 8vw, 120px);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 4.9rem);
  margin-bottom: 18px;
  max-width: 940px;
}

.page-copy {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 760px;
}

.notes-band {
  background:
    linear-gradient(135deg, rgba(255, 220, 231, 0.48), rgba(255, 248, 238, 0.92)),
    #fffdf9;
}

.video-band {
  background:
    linear-gradient(135deg, rgba(255, 217, 183, 0.62), rgba(255, 248, 251, 0.94)),
    #fffdf9;
}

.contact-band {
  background:
    linear-gradient(135deg, rgba(255, 240, 184, 0.42), rgba(255, 247, 236, 0.96)),
    #fffdf9;
}

.library-band {
  background:
    linear-gradient(135deg, rgba(255, 220, 231, 0.42), rgba(255, 247, 236, 0.96)),
    #fffdf9;
}

.library-grid {
  display: grid;
  gap: 18px;
}

.library-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  padding: 18px;
}

.library-card .resource-thumb {
  height: 108px;
  margin: 0;
}

.library-card h2 {
  margin-bottom: 8px;
}

.empty-library {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 800;
  padding: clamp(28px, 6vw, 54px);
  text-align: center;
}

.notes-toolbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding-bottom: 22px;
}

.notes-toolbar div {
  display: grid;
  gap: 3px;
}

.notes-toolbar strong {
  font-size: 1.15rem;
}

.notes-toolbar span {
  color: var(--muted);
  font-weight: 700;
}

.unit-stack {
  display: grid;
  gap: 18px;
  padding-top: 10px;
}

.unit-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.unit-card summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  list-style: none;
  padding: 22px clamp(18px, 4vw, 34px);
  position: relative;
}

.unit-card summary::-webkit-details-marker {
  display: none;
}

.unit-card summary span {
  background: var(--pink);
  border-radius: 999px;
  color: var(--teal-dark);
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 8px 12px;
  text-transform: uppercase;
}

.unit-card summary strong {
  flex: 1;
  font-size: clamp(1.18rem, 2vw, 1.7rem);
}

.unit-card summary::after {
  color: var(--coral);
  content: "+";
  font-size: 1.8rem;
  font-weight: 800;
}

.unit-card[open] summary::after {
  content: "-";
}

.chapter-list {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: clamp(18px, 4vw, 34px);
}

.chapter-card {
  background: linear-gradient(180deg, #ffffff, #fffaf4);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.concept-list {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.concept-list a {
  align-items: center;
  background: #fffaf5;
  border: 1px solid #f0ded2;
  border-radius: 7px;
  color: var(--teal-dark);
  display: flex;
  font-weight: 800;
  min-height: 42px;
  padding: 9px 12px;
  text-decoration: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 16px;
}

.chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 15px;
}

.chip.active,
.chip:hover {
  background: var(--teal-dark);
  color: var(--white);
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 22px;
}

.card-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note-card,
.video-card {
  overflow: hidden;
}

.note-card {
  padding: 0 22px 24px;
}

.note-topper,
.thumb {
  height: 130px;
  margin: 0 -22px 22px;
}

.cells {
  background: linear-gradient(135deg, #ffe8ef, #fff2c9);
}

.genetics {
  background: repeating-linear-gradient(115deg, #f2a6b5 0 12px, #ffe5bd 12px 18px, #fff8ee 18px 32px);
}

.systems {
  background: linear-gradient(135deg, #ffd1c1, #ffe6ef 50%, #fff2c9);
}

.ecology {
  background: linear-gradient(135deg, #ffe5bd, #fff8ee);
}

.lab {
  background: linear-gradient(135deg, #fff4de, #ffffff 45%, #ffe8ef);
}

.exam {
  background: linear-gradient(135deg, #ffdf9b, #fff7df);
}

.text-link {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.video-feature {
  align-items: center;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.video-frame {
  align-items: center;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, #fff8fb, #fff3e5 48%, #fffdf9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
}

.play-button {
  align-items: center;
  background: var(--white);
  border-radius: 50%;
  color: var(--coral);
  display: flex;
  font-size: 2rem;
  height: 76px;
  justify-content: center;
  padding-left: 4px;
  width: 76px;
}

.video-card {
  padding: 18px;
}

.thumb {
  align-items: end;
  border-radius: 7px;
  display: flex;
  justify-content: end;
  margin: 0 0 18px;
  padding: 10px;
}

.thumb span {
  background: rgba(37, 50, 48, 0.82);
  border-radius: 4px;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 3px 7px;
}

.osmosis {
  background: linear-gradient(135deg, #ffe8ef, #fff2c9);
}

.mitosis {
  background: linear-gradient(135deg, #ffd1c1, #ffe8ef);
}

.enzymes {
  background: linear-gradient(135deg, #fff0b8, #ffd9b7);
}

.ecology-thumb {
  background: linear-gradient(135deg, #fff4de, #ffe8ef);
}

.contact-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
}

.contact-panel,
.contact-form {
  padding: clamp(22px, 4vw, 36px);
}

.contact-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.contact-list li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-top: 14px;
}

.contact-list strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.contact-list a {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration: none;
}

.contact-form {
  display: grid;
  gap: 16px;
}

label {
  color: var(--muted);
  display: grid;
  font-weight: 800;
  gap: 8px;
}

input,
select,
textarea {
  background: #fffefa;
  border: 1px solid #ead8ce;
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.form-status {
  color: var(--teal-dark);
  font-weight: 800;
  margin: 0;
}

.site-footer {
  align-items: center;
  background: #4a3935;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 26px clamp(18px, 5vw, 64px);
}

.site-footer a {
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  .intro-grid,
  .card-grid,
  .card-grid.compact,
  .spotlight,
  .video-feature,
  .contact-layout,
  .chapter-list,
  .preview-grid,
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }

  .spotlight,
  .video-feature,
  .contact-layout,
  .chapter-list,
  .preview-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: none;
    left: 0;
    padding: 10px 18px 18px;
    position: absolute;
    right: 0;
    top: 66px;
  }

  .site-nav.open {
    display: grid;
  }

  .site-nav a {
    border-radius: 7px;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .intro-grid,
  .card-grid,
  .card-grid.compact,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .library-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .library-card .resource-thumb {
    height: 132px;
  }

  .notes-toolbar,
  .unit-card summary {
    align-items: stretch;
    flex-direction: column;
  }

  .unit-card summary::after {
    position: absolute;
    right: 22px;
  }

  .page-hero {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .brand span:last-child {
    max-width: 150px;
  }

  .home-launch {
    align-items: center;
    min-height: auto;
    padding: 82px 20px 68px;
  }

  .home-launch h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }
}
