/* MESSION PODCAST site. Layout: a blue hero band with the latest episode, then episodes, guest application, newsletter.
   Colours come from the corporate blue on me-ssion.com (#0E3F75 family). Change the tokens below to retheme the whole site. */

:root {
  /* light mode */
  --bg: #ffffff;
  --bg-alt: #eef2f9;
  --surface: #ffffff;
  --ink: #07203b;
  --ink-2: #44607f;
  --line: #d0dbeb;
  --brand: #0e3f75;
  --brand-ink: #ffffff;
  --brand-hover: #1a4e8d;
  --link: #0e3f75;
  --hero-bg: #0e3f75;
  --hero-ink: #ffffff;
  --hero-ink-2: #c9d8ec;
  --hero-accent: #acc3dd;
  --focus: #1a4e8d;
  --shadow: 0 1px 2px rgba(7, 32, 59, .06), 0 8px 24px rgba(7, 32, 59, .08);

  --f-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "DM Mono", ui-monospace, "Cascadia Mono", monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #051a31;
    --bg-alt: #07203b;
    --surface: #0a2849;
    --ink: #eaf0f8;
    --ink-2: #a5b9d7;
    --line: #1d3d63;
    --brand: #acc3dd;
    --brand-ink: #07203b;
    --brand-hover: #c4d6ea;
    --link: #acc3dd;
    --hero-bg: #07203b;
    --hero-ink: #eaf0f8;
    --hero-ink-2: #a5b9d7;
    --hero-accent: #acc3dd;
    --focus: #acc3dd;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #051a31;
  --bg-alt: #07203b;
  --surface: #0a2849;
  --ink: #eaf0f8;
  --ink-2: #a5b9d7;
  --line: #1d3d63;
  --brand: #acc3dd;
  --brand-ink: #07203b;
  --brand-hover: #c4d6ea;
  --link: #acc3dd;
  --hero-bg: #07203b;
  --hero-ink: #eaf0f8;
  --hero-ink-2: #a5b9d7;
  --hero-accent: #acc3dd;
  --focus: #acc3dd;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* the focus colour (#1A4E8D) vanishes on the blue hero and newsletter bands: white there */
.hero :focus-visible, .news :focus-visible { outline-color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; z-index: 50; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: block; line-height: 0; }
.logo { width: 112px; height: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
.nav { display: flex; gap: 28px; margin-left: auto; font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 12px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--ink); border-color: var(--brand); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.theme { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 50%; cursor: pointer; }
.theme:hover { border-color: var(--brand); }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 14px 24px; border: 1.5px solid transparent; font: 600 .82rem/1 var(--f-display); letter-spacing: .07em; text-transform: uppercase; text-decoration: none; cursor: pointer; border-radius: 2px; transition: background-color .15s, color .15s, border-color .15s; }
.btn-sm { padding: 12px 18px; }
.btn-solid { background: var(--brand); color: var(--brand-ink); }
.btn-solid:hover { background: var(--brand-hover); }
.btn-light { background: var(--hero-accent); color: #07203b; }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: var(--hero-ink); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.link { display: inline-block; padding-block: 12px; font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--link); text-decoration: none; } /* 44 px tall tap target */
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.label { font: 500 .72rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }

/* ---------- hero ---------- */
.hero { background: var(--hero-bg); color: var(--hero-ink); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding-block: clamp(40px, 7vw, 88px); }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.9rem); line-height: 1; font-weight: 800; letter-spacing: -.025em; }
.hero h1 em { display: block; font-style: normal; font-weight: 300; color: var(--hero-accent); }
.hero .lead { margin-top: 24px; max-width: 46ch; font-size: 1.1rem; font-weight: 300; color: var(--hero-ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .label { color: var(--hero-ink-2); margin-bottom: 12px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 14px; align-items: baseline; }
.player-meta .ep-title { font-weight: 600; max-width: 52ch; }
.hero .link { color: var(--hero-accent); }

/* ---------- sections ---------- */
.sec { padding-block: clamp(48px, 7vw, 96px); }
.sec-alt { background: var(--bg-alt); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; margin-bottom: 32px; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
h2 em { font-style: normal; font-weight: 300; color: var(--link); }

.eps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.ep { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.ep-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ep:hover .ep-thumb img { transform: scale(1.04); }
.ep-time { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; background: rgba(5, 26, 49, .85); color: #fff; font: 500 .7rem/1.2 var(--f-mono); }
.ep-title { font-size: .98rem; font-weight: 600; line-height: 1.35; }
.ep:hover .ep-title { text-decoration: underline; text-underline-offset: 3px; }
.ep-meta { font: 400 .72rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.listen { margin-top: 40px; color: var(--ink-2); font-size: .92rem; }

/* ---------- apply ---------- */
.apply { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.apply .label { margin-bottom: 14px; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; color: var(--ink-2); font-weight: 400; max-width: 46ch; }
.steps li { display: flex; gap: 14px; }
.steps li::before { content: ""; flex: none; width: 20px; height: 2px; background: var(--brand); margin-top: .85em; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(20px, 3.4vw, 36px); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full, .form .full { grid-column: 1 / -1; }
.field label { font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="url"], textarea { width: 100%; padding: 13px 14px; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 2px; min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--ink-2); opacity: 1; } /* was .7, which measured about 3.3:1 on white; --ink-2 itself is 6.5:1 */
input:hover, textarea:hover { border-color: var(--ink-2); }
textarea { resize: vertical; min-height: 120px; }
.check { flex-direction: row; align-items: flex-start; gap: 12px; min-height: 44px; }
.check input { margin: 2px 0 0; width: 24px; height: 24px; accent-color: var(--brand); flex: none; } /* was 18 px; the label is also clickable */
.check label { font: 400 .85rem/1.5 var(--f-display); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { margin-top: 12px; font-size: .9rem; min-height: 1.4em; color: var(--ink-2); }
.status.ok { color: var(--ink); font-weight: 600; }
.status.err { color: #b3261e; font-weight: 600; }
:root[data-theme="dark"] .status.err { color: #ff8a80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status.err { color: #ff8a80; } }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b3261e; }

/* ---------- newsletter ---------- */
.news { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px 48px; padding: clamp(24px, 4vw, 48px); background: var(--hero-bg); color: var(--hero-ink); }
.news h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
.news p { margin-top: 6px; color: var(--hero-ink-2); }
.news-form { display: flex; flex-wrap: wrap; gap: 0; flex: 1 1 340px; max-width: 480px; }
.news-form input[type="email"] { flex: 1 1 200px; border-right: 0; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); color: #fff; border-radius: 2px 0 0 2px; }
.news-form input::placeholder { color: #fff; opacity: .65; }
.news-form .btn { background: var(--hero-accent); color: #07203b; border-radius: 0 2px 2px 0; }
.news-form .btn:hover { background: #fff; }
.news-form .status { flex-basis: 100%; color: var(--hero-ink-2); }
.news-form .status.ok { color: #fff; }
.news-form .status.err { color: #ffb4ab; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 28px calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--ink-2); font-size: .85rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 12px 0; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .eps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-in, .apply { grid-template-columns: minmax(0, 1fr); }
  .nav { gap: 20px; }
}
@media (max-width: 860px) {
  .btn-sm { display: none; } /* at tablet width the header wrapped "Be a guest" and the button onto two lines; the hero has the same Apply button */
}
@media (max-width: 720px) {
  .nav { display: none; }
  .top-actions { margin-left: auto; }
  .top-in { min-height: 68px; }
  .logo { width: 96px; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .eps { grid-template-columns: minmax(0, 1fr); }
  .eps .ep:nth-child(n+5) { display: none; }
  .news-form { max-width: none; gap: 10px; }
  .news-form input[type="email"] { border-right: 1px solid rgba(255, 255, 255, .35); border-radius: 2px; }
  .news-form .btn { border-radius: 2px; }
}
@media (max-width: 400px) {
  .btn-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
