/* ==========================================================
   Sciencekakura website styles
   Brand colours come from the logo: red #CC0000 → navy #000066
   Fonts are self-hosted in assets/fonts (no external requests,
   which keeps the site GDPR-friendly). Licence: SIL OFL 1.1.
   ========================================================== */

@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --red: #CC0000;
  --red-dark: #A30000;
  --navy: #000066;
  --plum: #950049;              /* middle of the logo gradient */
  --gradient: linear-gradient(90deg, #CC0000 0%, #B9002D 20%, #A20041 40%, #870050 60%, #61005C 80%, #000066 100%);

  --ink: #14141F;
  --text: #3B3B4A;
  --muted: #5E5E6E;
  --line: #E2E1E8;
  --bg: #F7F6F9;
  --white: #FFFFFF;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 20px;
  --radius-lg: 28px;
  --max: 1200px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

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

a { color: var(--red); }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
}
h1 { font-size: clamp(40px, 5.2vw, 66px); }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: 23px; line-height: 1.25; letter-spacing: -0.005em; }
p  { margin: 0 0 16px; color: var(--text); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 96px; padding-bottom: 96px; }
.section-tight { padding-bottom: 96px; }

.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--navy); color: var(--white);
  padding: 10px 16px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { top: 16px; color: var(--white); }

/* ---------- Eyebrows, labels, tags ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.eyebrow-light { color: #FFD7D7; }
.meta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: #ECEBF5;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 15px; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: #00004A; color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: #F0F0F7; color: var(--navy); }
.text-link { font-weight: 600; text-decoration: none; padding: 8px 0; display: inline-block; }
.text-link:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 246, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-top: 12px; padding-bottom: 12px;
}
.brand img { height: 60px; width: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; display: inline-block; padding: 10px 0; }
.nav-list a:hover { color: var(--red); }

/* ---------- Hero ---------- */
.hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 56px;
  padding-top: 72px; padding-bottom: 96px;
}
.hero-text { flex: 999 1 520px; min-width: 0; }
.lead { font-size: 21px; max-width: 600px; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.episode-card {
  flex: 1 1 320px; min-width: 0;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.episode-card h2 { color: var(--white); font-size: 28px; margin: 0; }
.episode-card .cover { border-radius: 16px; }
.muted-light { color: #C9C9E6; margin: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  background: var(--white); color: var(--navy);
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 10px 16px; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.pill:hover { background: #E8E8F5; color: var(--navy); }

/* ---------- Bands ---------- */
.band { padding: 96px 0; }
.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-gradient { background: var(--gradient); color: var(--white); }
.band-gradient h2 { color: var(--white); }
.band-gradient p { color: #F3E6EE; }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.split {
  max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.section-head.split > div { max-width: 640px; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-offers { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grid-offers .card { padding: 24px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column;
}
.band-white .card { background: var(--bg); }
.card .grow { flex-grow: 1; font-size: 16px; }
.offer-featured { border: 2px solid var(--red); }

.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  color: var(--ink);
  margin: 4px 0 18px;
}
.price span { font-family: var(--font-body); font-weight: 400; font-size: 15px; color: var(--muted); }
.price-light, .price-light span { color: var(--white); }

.notice {
  margin-top: 32px; display: flex; gap: 14px; align-items: flex-start;
  background: #ECEBF5; color: var(--navy);
  padding: 20px 24px; border-radius: 16px; font-size: 16px;
}
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice span { color: var(--ink); }

/* ---------- Homepage teasers ---------- */
.podcast-teaser { align-items: center; }
.guest-strip p { font-size: 16px; color: var(--muted); margin: 18px 0 0; max-width: 460px; }
.avatar-stack { list-style: none; margin: 0; padding: 0 0 0 14px; display: flex; flex-wrap: wrap; }
.avatar-stack li { margin-left: -14px; }
.avatar-stack img {
  width: 66px; height: 66px; border-radius: 50%;
  border: 3px solid var(--white); background: var(--bg);
}


.path { gap: 0; }
.path-featured { border: 2px solid var(--red); }
.path h3 { font-size: 26px; margin-bottom: 10px; }
.path-detail {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--navy); margin: 8px 0 20px;
}
.path .btn { align-self: flex-start; }

/* ---------- Podcast page ---------- */
.page-head { padding-top: 72px; padding-bottom: 48px; }
.page-head .lead { margin-bottom: 24px; }
.nav-list a[aria-current="page"] { color: var(--red); }

.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 16px; }
.filters[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 300px; min-width: 0; }
.field-season { flex: 0 1 240px; }
.field label {
  font-family: var(--font-mono); font-weight: 500; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.field input, .field select {
  font: inherit; font-size: 16px; color: var(--ink);
  min-height: 48px; padding: 10px 16px;
  background: var(--white); border: 1px solid #CFCDD8; border-radius: 12px;
}
.field input:focus-visible, .field select:focus-visible { border-color: var(--navy); }
.results-count { font-family: var(--font-mono); font-size: 14px; color: var(--muted); margin: 0 0 20px; }

.episode-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.episode {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 24px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px;
}
.episode[hidden] { display: none; }
.ep-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.episode .meta { margin-bottom: 4px; }
.ep-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-bottom: 6px; }
.ep-head h2 { margin-bottom: 0; }
.ep-head h2 { flex: 1 1 300px; min-width: 0; font-size: clamp(22px, 2.2vw, 26px); margin-bottom: 6px; }
.icon-links { display: flex; gap: 6px; flex-shrink: 0; }
.icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--navy);
  transition: background-color .15s, color .15s;
}
.icon-link:hover { background: #ECEBF5; border-color: #ECEBF5; color: var(--red); }
.guest-line { font-weight: 500; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.summary { font-size: 16px; margin-bottom: 0; }

.listen { display: flex; flex-wrap: wrap; gap: 8px; }
.listen-link {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white);
  color: var(--navy); font-weight: 500; font-size: 15px; text-decoration: none;
}
.listen-link:hover { background: #ECEBF5; border-color: #ECEBF5; color: var(--navy); }
.listen-link svg { flex-shrink: 0; }
.no-results { padding: 32px 0; color: var(--muted); }

/* ---------- Courses page ---------- */
.why-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px;
}
.why-list li { border-top: 3px solid var(--red); padding-top: 20px; }
.why-list h3 { font-size: 22px; margin-bottom: 8px; }
.why-list p { font-size: 16px; margin: 0; }

.level { gap: 0; }
.level-featured { border: 2px solid var(--red); }
.level-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.level-top .meta { margin: 0; }
.level h3 { font-size: 30px; margin-bottom: 8px; }
.level-for { font-size: 16px; color: var(--muted); }
.check-list { list-style: none; margin: 4px 0 28px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.45; color: var(--text); }
.check-list svg { flex-shrink: 0; margin-top: 2px; color: var(--red); }
.level .btn { align-self: flex-start; }

.faq { margin: 0; max-width: 860px; }
.faq > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.faq > div:first-child { border-top: 1px solid var(--line); }
.faq dt { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--ink); margin-bottom: 6px; }
.faq dd { margin: 0; font-size: 16px; color: var(--text); }

/* ---------- Guidance page ---------- */
.topics { margin-top: 56px; }
.topics h3 { font-size: 22px; margin-bottom: 16px; }
.topic-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topic-list li {
  background: #ECEBF5; color: var(--navy);
  font-weight: 500; font-size: 15px;
  padding: 8px 16px; border-radius: 999px;
}

.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px;
}
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient); color: var(--white);
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
}
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { font-size: 16px; margin: 0; }

/* ---------- Institutes page ---------- */
.service-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.service-grid .grow { flex-grow: 0; color: var(--muted); }
.service-grid .check-list { margin-bottom: 0; }
.check-list a { color: var(--red); }

/* ---------- Two-column panels ---------- */
.split-panel { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split-panel > * { flex: 1 1 400px; min-width: 0; }

.cohort-box {
  flex: 0 1 340px;
  background: rgba(0, 0, 40, 0.35);
  border-radius: var(--radius);
  padding: 28px;
}
.cohort-box p { margin-bottom: 6px; }

/* ---------- About ---------- */
.about { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about > div:last-child { flex: 999 1 460px; min-width: 0; }
.about > div:only-child { max-width: 760px; }
.host-list {
  list-style: none; margin: 32px 0 20px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.host-list li { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px 26px; }
.host-list h3 { font-size: 22px; margin-bottom: 4px; }
.host-list p { margin: 0; font-size: 16px; }
.photo-placeholder {
  flex: 1 1 280px; max-width: 400px; aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: #E6E4EC; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- CTA ---------- */
.cta {
  background: var(--gradient);
  border-radius: 32px;
  padding: clamp(36px, 6vw, 72px);
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
}
.cta > div { flex: 999 1 440px; min-width: 0; }
.cta h2 { color: var(--white); }
.cta p { color: #F3E6EE; font-size: 19px; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px 32px; padding-top: 32px; padding-bottom: 32px; font-size: 15px;
}
.footer-inner p { margin: 0; color: var(--muted); }
.footer-inner .nav-list a { font-weight: 400; color: var(--text); text-decoration: underline; font-size: 15px; }
.social-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.social-list a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  color: var(--navy);
  transition: background-color .15s, color .15s;
}
.social-list a:hover { background: #ECEBF5; color: var(--red); }
.social-list svg { display: block; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; padding-top: 64px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(36px, 5vw, 56px); }
.legal h2 { font-size: 28px; margin-top: 40px; }
.legal .todo {
  background: #FFF4D6; border: 1px solid #E9C766; color: #5A4300;
  padding: 16px 20px; border-radius: 12px; font-size: 16px;
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .section, .band { padding-top: 64px; padding-bottom: 64px; }
  .hero { padding-top: 40px; padding-bottom: 64px; gap: 40px; }
  .header-inner nav { order: 3; width: 100%; }
  .nav-list { gap: 0 18px; }
  .brand img { height: 48px; }
  .page-head { padding-top: 40px; padding-bottom: 32px; }
  .episode { grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; padding: 20px 18px; }
  .ep-photo { width: 48px; height: 48px; }
  .ep-head .icon-links { order: 2; margin-bottom: 8px; }
  .avatar-stack img { width: 60px; height: 60px; }
  .steps li { padding: 4px 0 0 64px; min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
