/* Midlife Moxie Warrior — site styles
   Palette pulled from the channel art: midnight-to-electric blue with
   silvery white, plus one warm accent taken from Karina's headshot. */

:root {
  --midnight: #060e2a;
  --royal: #0f2c86;
  --electric: #2a7be8;
  --ice: #cfe2ff;
  --frost: #eef4fc;
  --white: #ffffff;
  --ink: #13203f;
  --ink-soft: #3d4a68;
  --magenta: #a8286a;
  --magenta-deep: #861d53;

  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: var(--serif); /* whole site is Garamond (Karina's request) */

  --step--1: 1.05rem;
  --step-0: 1.3rem;
  --step-1: 1.5rem;
  --step-2: 1.75rem;
  --step-3: 2.4rem;
  --step-4: clamp(2.4rem, 5.5vw, 3.9rem);

  --measure: 66ch;
  --wide: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--midnight);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--magenta); text-underline-offset: 0.18em; }
a:hover { color: var(--magenta-deep); }

:focus-visible {
  outline: 3px solid var(--electric);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--white);
  color: var(--midnight);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--midnight);
  color: var(--white);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.3rem;
}
.brand:hover { color: var(--ice); }
.brand img { width: 44px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.site-nav a {
  color: var(--ice);
  text-decoration: none;
  font-size: 1.2rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--white); border-bottom-color: var(--electric); }
.site-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--ice); }

/* ---------- Night sky bands (hero, page heads, footer) ---------- */

.night {
  position: relative;
  color: var(--white);
  background-color: var(--midnight);
  background-image:
    /* the sweep of light from the channel banner */
    linear-gradient(160deg, transparent 38%, rgba(74, 163, 240, 0.22) 50%, transparent 62%),
    linear-gradient(160deg, transparent 52%, rgba(42, 123, 232, 0.28) 60%, transparent 70%),
    radial-gradient(ellipse 70% 60% at 60% 55%, rgba(15, 44, 134, 0.9), transparent 75%),
    linear-gradient(180deg, var(--midnight), #0a1a4d);
  overflow: hidden;
}
/* Bright banner, matched to the channel icon: deep royal blue in the
   corners, sky blue through the middle, soft white sweeps rising to the right */
.hero,
.page-head {
  background-color: #1a5cc8;
  background-image:
    linear-gradient(160deg, transparent 30%, rgba(255, 255, 255, 0.10) 36%, transparent 42%),
    linear-gradient(160deg, transparent 47%, rgba(255, 255, 255, 0.14) 52%, rgba(255, 255, 255, 0.04) 56%, transparent 60%),
    linear-gradient(160deg, transparent 64%, rgba(255, 255, 255, 0.10) 69%, transparent 74%),
    radial-gradient(ellipse 80% 70% at 62% 55%, rgba(110, 190, 240, 0.85), transparent 72%),
    linear-gradient(160deg, #0b3a9e 0%, #1d63cc 38%, #3b8fdc 58%, #1d63cc 82%, #0f46b0 100%);
}
.night.hero p,
.night.page-head p { color: var(--white); text-shadow: 0 1px 8px rgba(6, 30, 90, 0.45); }
.hero h1,
.page-head h1 { text-shadow: 0 2px 14px rgba(6, 30, 90, 0.5); }

.night h1,
.night h2,
.night h3 { color: var(--white); }
.night p { color: var(--ice); }
.night a:not(.button) { color: var(--white); }

/* Home hero: the shield is the star */
.hero {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 9vw, 6.5rem);
}
.hero-logo {
  width: min(420px, 78vw);
  margin: 0 auto 2rem;
  filter: drop-shadow(0 6px 18px rgba(6, 30, 90, 0.45));
  animation: rise 1.4s ease-out both;
}
.hero h1 {
  font-size: var(--step-4);
  max-width: 18ch;
  margin: 0 auto 0.5em;
}
.hero p {
  font-size: var(--step-1);
  margin: 0 auto 2rem;
  max-width: 34ch;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: drop-shadow(0 0 0 rgba(120, 180, 255, 0)); }
  to { opacity: 1; transform: none; filter: drop-shadow(0 6px 18px rgba(6, 30, 90, 0.45)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; }
}

.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page-head h1 { margin-bottom: 0.3em; }
/* A banner with just a title stays snug: no empty space under the name */
.page-head h1:last-child { margin-bottom: 0; }
.page-head p { font-size: var(--step-1); margin: 0; }

/* ---------- Buttons ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
}
.actions.start { justify-content: flex-start; }

.button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  line-height: 1.2;
}
.button-primary { background: var(--magenta); color: var(--white); }
.button-primary:hover { background: var(--magenta-deep); color: var(--white); }
.button-ghost { border-color: var(--white); color: var(--white); background: rgba(6, 30, 90, 0.18); }
.button-ghost:hover { background: rgba(207, 226, 255, 0.12); color: var(--white); }
.button-outline { border-color: var(--royal); color: var(--royal); }
.button-outline:hover { background: var(--royal); color: var(--white); }

/* ---------- Content sections ---------- */

.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section + .section { padding-top: 0; }

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.split.top { align-items: start; }
@media (min-width: 760px) {
  .split { grid-template-columns: 5fr 7fr; }
  .split.flip { grid-template-columns: 7fr 5fr; }
  .split.flip > :first-child { order: 2; }
}

.portrait {
  /* Photo print: thick white border, like a printed snapshot (Karina's pick) */
  border: 10px solid var(--white);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 18px 40px -18px rgba(6, 14, 42, 0.55);
  width: 100%;
  max-width: 420px;
}
.cover {
  border-radius: 6px;
  box-shadow: 0 18px 40px -18px rgba(6, 14, 42, 0.55);
  width: 100%;
  max-width: 420px;
}

.lede { color: var(--ink); }

.prose > * { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* Resource list: name, then one plain line about why it's useful */
ul.resource-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.resource-list > li {
  padding: 1rem 0;
  border-top: 1px solid rgba(15, 44, 134, 0.18);
}
.resource-list > li:last-child { border-bottom: 1px solid rgba(15, 44, 134, 0.18); }
.resource-list a { font-weight: 600; font-size: var(--step-1); }
.resource-list p { margin: 0.25rem 0 0; color: var(--ink-soft); }

/* Rows of small links under a resource or person */
ul.link-row {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
ul.link-row a {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--royal);
  text-decoration: none;
  border: 1.5px solid rgba(15, 44, 134, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
ul.link-row a:hover { background: var(--royal); border-color: var(--royal); color: var(--white); }
.resource-list ul.link-row a { font-size: 1.1rem; }

/* Teachers: name, specialty, links */
ul.people {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0 2.5rem;
}
@media (min-width: 760px) {
  ul.people { grid-template-columns: 1fr 1fr; }
}
ul.people > li {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(15, 44, 134, 0.18);
  min-width: 0;
}
ul.people h3 { font-size: var(--step-2); margin: 0; }
ul.people .role { margin: 0.15rem 0 0; color: var(--ink-soft); }

.note {
  border-left: 4px solid var(--electric);
  background: var(--white);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  max-width: var(--measure);
  color: var(--ink-soft);
}
.note p:last-child { margin-bottom: 0; }

.empty {
  border: 2px dashed rgba(15, 44, 134, 0.3);
  border-radius: 6px;
  padding: 1.5rem;
  max-width: var(--measure);
  color: var(--ink-soft);
}
.empty p:last-child { margin-bottom: 0; }

.email-big {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  word-break: break-word;
}

/* ---------- Email signup (top of the footer) ---------- */

.signup {
  display: grid;
  gap: 1.25rem 2.5rem;
  align-items: end;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(207, 226, 255, 0.25);
}
@media (min-width: 900px) {
  .signup { grid-template-columns: 5fr 7fr; }
}
.site-footer .signup h2 { font-size: var(--step-3); margin: 0 0 0.4rem; }
.signup-text p { margin: 0; }
.signup-form {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}
@media (min-width: 560px) {
  .signup-form { grid-template-columns: 1fr 1.4fr auto; align-items: end; }
  .signup-status { grid-column: 1 / -1; }
}
.signup-form .field { display: grid; gap: 0.3rem; min-width: 0; }
.signup-form label { font-size: 1.15rem; color: var(--ice); }
.signup-form input {
  font: inherit;
  font-size: 1.15rem;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1.5px solid rgba(207, 226, 255, 0.45);
  background: rgba(6, 14, 42, 0.55);
  color: var(--white);
}
.signup-form input:focus-visible { border-color: var(--ice); outline-offset: 2px; }
.signup-form .button { cursor: pointer; font-family: var(--sans); }
.signup-form .button:disabled { opacity: 0.6; cursor: progress; }
.signup-status { margin: 0; min-height: 1.5em; font-size: 1.15rem; }
.night p.signup-status.is-success { color: #b9f3d0; }
.night p.signup-status.is-error { color: #ffc2d6; }
.night p.signup-status.is-info { color: var(--ice); }

/* ---------- Footer ---------- */

.site-footer { padding: 3rem 0 2rem; font-size: 1.15rem; }
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: auto 1fr 1fr; align-items: start; }
}
.footer-logo { width: 96px; }
.site-footer h2 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer .fine {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(207, 226, 255, 0.25);
  font-size: var(--step--1);
  max-width: none;
}

/* ---------- Consistent, justified body text ---------- */
/* Every paragraph and list item in a content section is the same size,
   and paragraphs are justified with hyphenation so the edges stay even. */
.section p,
.section li,
.note p,
.resource-list p,
ul.people .role { font-size: var(--step-0); }

.section p,
.note p,
.resource-list p,
.signup-text p,
.site-footer .fine {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.site-footer .copyright {
  margin: 0.75rem 0 0;
  font-size: var(--step--1);
  white-space: nowrap;
  max-width: none;
}

/* "What you'll find here" list on the home page */
ul.checklist { padding-left: 1.2em; margin: 0 0 1.5rem; max-width: var(--measure); }
ul.checklist li { margin-bottom: 0.4em; }

/* Citation block (Resources, guidelines) */
main p.cite, .resource-list p.cite { text-align: left; hyphens: manual; font-size: var(--step--1); padding: .6rem .9rem; border-left: 3px solid var(--line, #c9d3ea); background: rgba(255,255,255,.6); max-width: 60ch; }

/* Episode card (Videos page) */
.episode-card {
  display: grid; gap: 0.35rem;
  max-width: var(--measure);
  padding: 1.4rem 1.5rem;
  background: var(--white);
  border-left: 4px solid var(--magenta);
  border-radius: 6px;
  box-shadow: 0 12px 30px -18px rgba(6, 14, 42, 0.45);
  text-decoration: none;
  color: var(--ink);
}
.episode-card:hover { color: var(--ink); box-shadow: 0 14px 34px -14px rgba(6, 14, 42, 0.55); }
.episode-when { font-size: var(--step--1); color: var(--ink-soft); }
.episode-title { font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; color: var(--midnight); }
.episode-cta { font-weight: 700; color: var(--magenta); margin-top: 0.3rem; }
