/* Channel Surfers — shared stylesheet
   Tokens pulled directly from the real logo file (assets/logo.svg) for exact brand continuity:
   navy #275173, amber #e48b24, cream #f9f0da, Archivo / Open Sans / Quicksand. */

:root {
  --navy: #275173;
  --navy-deep: #1a3850;
  --navy-ink: #112536;
  --amber: #e48b24;
  --amber-deep: #b96f16;
  --cream: #f9f0da;
  --white: #ffffff;
  --ink: #1c2733;
  --ink-soft: #56636e;
  --ink-faint: #85929c;
  --line: #e4ddcf;

  --font-head: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "Open Sans", -apple-system, "Segoe UI", sans-serif;
  --font-nav: "Quicksand", "Trebuchet MS", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #4d7ba3;
    --navy-deep: #2c4f6c;
    --navy-ink: #0f1c26;
    --amber: #e48b24;
    --amber-deep: #f0a949;
    --cream: #14202a;
    --white: #1a2833;
    --ink: #eef2f4;
    --ink-soft: #b6c2ca;
    --ink-faint: #7f8d96;
    --line: #2c3d48;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1.12;
  margin: 0;
}
p { margin: 0 0 1rem; color: var(--ink-soft); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 2px; }

.crumbs { font-family: var(--font-nav); font-size: 0.76rem; margin-bottom: 0.9rem; }
.crumbs, .crumbs a { color: rgba(255,255,255,0.6); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--amber); }
.crumbs .sep { margin: 0 0.4rem; color: rgba(255,255,255,0.3); }
.crumbs .current { color: rgba(255,255,255,0.9); }

.eyebrow {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 1.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.btn {
  display: inline-block;
  font-family: var(--font-nav);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.88rem;
  padding: 0.75rem 1.5rem;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--navy-ink); }
.btn-primary:hover { background: var(--amber-deep); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); }

/* Wave divider — surf motif, sits at the seam between a navy hero/head and the section below */
.wave { display: block; width: 100%; line-height: 0; }
.wave svg { display: block; width: 100%; height: 54px; }
@media (max-width: 640px) { .wave svg { height: 34px; } }
.wave-navy { background: var(--navy); }

/* Infographic cards */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .info-grid { grid-template-columns: 1fr; } }
.info-card { background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; text-decoration: none; display: block; }
.info-card:hover { border-color: var(--amber-deep); }
.info-card .info-thumb { aspect-ratio: 4/5; padding: 1.4rem; display: flex; flex-direction: column; justify-content: space-between; }
.info-card .info-body { padding: 1rem 1.2rem 1.3rem; }
.info-card .info-body h3 { font-size: 1rem; text-transform: none; color: var(--ink); }
.info-card .info-body p { font-size: 0.85rem; margin: 0.3rem 0 0; }
.share-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* Header */
.site-header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem; padding: 0.55rem 1.5rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { height: 90px; width: auto; }
.brand span {
  font-family: var(--font-nav); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--white); font-size: 1rem;
}
nav.main-nav {
  display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
  order: 3; width: 100%; padding-top: 0.4rem; border-top: 1px solid rgba(255,255,255,0);
}
nav.main-nav a {
  font-family: var(--font-nav); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; font-size: 0.85rem; color: rgba(255,255,255,0.82);
  text-decoration: none;
}
nav.main-nav a:hover, nav.main-nav a[aria-current="page"] { color: var(--amber); }

/* On wide screens, nav sits inline between the logo and the CTA instead of wrapping to its own row */
@media (min-width: 821px) {
  nav.main-nav { order: 0; width: auto; padding-top: 0; }
}

@media (max-width: 480px) {
  nav.main-nav { gap: 0.9rem 1.1rem; }
}

/* Signal-wave field — the site's signature texture. Every navy section carries it:
   read as ocean swell (the brand name) or an audio waveform (the medium) at once.
   Two full periods per 300px tile so it repeats without a seam. */
.hero, section.block.on-navy, .article-head {
  background-color: var(--navy);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='150' viewBox='0 0 300 150'%3E%3Cpath d='M0,95 C37.5,75 112.5,115 150,95 C187.5,75 262.5,115 300,95' fill='none' stroke='%234d7ba3' stroke-opacity='0.4' stroke-width='2'/%3E%3Cpath d='M0,117 C37.5,101 112.5,133 150,117 C187.5,101 262.5,133 300,117' fill='none' stroke='%234d7ba3' stroke-opacity='0.24' stroke-width='1.5'/%3E%3Cpath d='M0,60 C37.5,42 112.5,78 150,60 C187.5,42 262.5,78 300,60' fill='none' stroke='%23e48b24' stroke-opacity='0.18' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 150px;
}

/* Hero */
.hero, section.block.on-navy, .article-head {
  animation: wave-drift 50s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .hero, section.block.on-navy, .article-head { animation: none; } }
@keyframes wave-drift { from { background-position: 0 0; } to { background-position: 300px 0; } }
.hero {
  color: var(--white);
  padding: 2.75rem 0 2.5rem;
}

/* Power banner — real photographic wave scene layered under the signature texture,
   for header sections that would otherwise be flat navy. */
.hero.with-banner, section.block.on-navy.with-banner, .article-head.with-banner {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='150' viewBox='0 0 300 150'%3E%3Cpath d='M0,95 C37.5,75 112.5,115 150,95 C187.5,75 262.5,115 300,95' fill='none' stroke='%234d7ba3' stroke-opacity='0.4' stroke-width='2'/%3E%3Cpath d='M0,117 C37.5,101 112.5,133 150,117 C187.5,101 262.5,133 300,117' fill='none' stroke='%234d7ba3' stroke-opacity='0.24' stroke-width='1.5'/%3E%3Cpath d='M0,60 C37.5,42 112.5,78 150,60 C187.5,42 262.5,78 300,60' fill='none' stroke='%23e48b24' stroke-opacity='0.18' stroke-width='1.5'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(15,32,51,0.86), rgba(15,32,51,0.94)),
    var(--banner-img, none);
  background-repeat: repeat, no-repeat, no-repeat;
  background-size: 300px 150px, cover, contain;
  background-position: 0 0, center, center;
}
/* Rotating power banner — two real photos crossfading, kept barely visible behind the navy/texture.
   Used on pages that want several covers cycling through instead of one static image. */
.hero.with-banner.is-rotating, section.block.on-navy.with-banner.is-rotating {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='150' viewBox='0 0 300 150'%3E%3Cpath d='M0,95 C37.5,75 112.5,115 150,95 C187.5,75 262.5,115 300,95' fill='none' stroke='%234d7ba3' stroke-opacity='0.4' stroke-width='2'/%3E%3Cpath d='M0,117 C37.5,101 112.5,133 150,117 C187.5,101 262.5,133 300,117' fill='none' stroke='%234d7ba3' stroke-opacity='0.24' stroke-width='1.5'/%3E%3Cpath d='M0,60 C37.5,42 112.5,78 150,60 C187.5,42 262.5,78 300,60' fill='none' stroke='%23e48b24' stroke-opacity='0.18' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 150px;
  background-position: 0 0;
  position: relative;
  overflow: hidden;
}
.with-banner.is-rotating .wrap { position: relative; z-index: 1; }
.banner-photos { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.banner-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  opacity: 0;
  filter: grayscale(65%) brightness(0.5) contrast(0.9);
  animation: banner-crossfade 26s ease-in-out infinite;
}
.banner-photo:nth-child(2) { animation-delay: 13s; }
@keyframes banner-crossfade {
  0%, 100% { opacity: 0; }
  6% { opacity: 0.28; }
  44% { opacity: 0.28; }
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .banner-photo { animation: none; opacity: 0.2; }
  .banner-photo:nth-child(2) { display: none; }
}

.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2rem, 4.1vw, 2.95rem); font-weight: 800; color: var(--white); text-wrap: balance; }
.hero .lede { color: rgba(255,255,255,0.82); font-size: 1.08rem; max-width: 52ch; margin-top: 1rem; }
.hero .eyebrow { color: var(--amber); }
.hero .cta-row { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-art { border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 20px 50px rgba(10,20,30,0.35); }

/* Sections */
section.block { padding: 3.5rem 0; }
section.block.on-white { background: var(--white); }
section.block.on-navy { color: var(--white); }
section.block.on-navy h2, section.block.on-navy .eyebrow { color: var(--white); }
section.block.on-navy p { color: rgba(255,255,255,0.78); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head h2 { font-size: 1.6rem; margin-top: 0.4rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 760px) { .card-grid { grid-template-columns: 1fr; } }
.media-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.media-card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(10,20,30,0.14); }
.info-card, .yt-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.info-card:hover, .yt-card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(10,20,30,0.14); }
@media (prefers-reduced-motion: reduce) {
  .media-card, .info-card, .yt-card { transition: none; }
  .media-card:hover, .info-card:hover, .yt-card:hover { transform: none; }
}

/* Scroll reveal — fades content up into place as it enters view. */
@media (prefers-reduced-motion: no-preference) {
  .section-head, .card-grid, .yt-grid, .info-grid, .ep-list {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .section-head.in-view, .card-grid.in-view, .yt-grid.in-view, .info-grid.in-view, .ep-list.in-view {
    opacity: 1;
    transform: translateY(0);
  }
}
.media-card img { aspect-ratio: 16/9; object-fit: cover; }
.media-card .body { padding: 1.3rem 1.4rem 1.5rem; }
.media-card .tag { font-family: var(--font-nav); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber-deep); font-weight: 700; }
.media-card h3 { font-size: 1.15rem; margin-top: 0.5rem; text-transform: none; }
.media-card p { margin-top: 0.5rem; font-size: 0.95rem; }

/* Episode list */
.ep-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ep-row {
  display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1.2rem; align-items: center;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) { .ep-row { grid-template-columns: 3rem 1fr; } .ep-row .btn { grid-column: 1 / -1; margin-top: 0.5rem; } }
.ep-row .ep-num { font-family: var(--font-head); font-weight: 800; color: var(--amber-deep); font-size: 1.3rem; }
.ep-row h3 { font-size: 1.02rem; text-transform: none; font-weight: 700; }
.ep-row .meta { color: var(--ink-faint); font-size: 0.85rem; margin-top: 0.2rem; }
.ep-row.upcoming { opacity: 0.55; }
.ep-row.upcoming .ep-num { color: var(--ink-faint); }

/* YouTube-style episode cards */
.yt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 1.25rem; }
@media (max-width: 980px) { .yt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .yt-grid { grid-template-columns: 1fr; } }
.yt-card { display: flex; flex-direction: column; }
.yt-thumb {
  display: block; position: relative; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden;
  background: var(--navy); text-decoration: none;
}
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-thumb .placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem;
}
.yt-thumb .placeholder .ep-no { font-family: var(--font-head); font-weight: 800; color: var(--white); font-size: 1.6rem; }
.yt-thumb .placeholder .ep-tag { font-family: var(--font-nav); color: var(--amber); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.yt-thumb .play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,15,20,0); transition: background 0.15s ease;
}
.yt-thumb:hover .play-badge { background: rgba(10,15,20,0.25); }
.yt-thumb .play-badge svg { width: 46px; height: 46px; opacity: 0; transition: opacity 0.15s ease; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4)); }
.yt-thumb:hover .play-badge svg { opacity: 1; }
.yt-thumb .yt-tag {
  position: absolute; bottom: 6px; right: 6px; background: rgba(10,15,20,0.82); color: var(--white);
  font-family: var(--font-nav); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.15rem 0.4rem; border-radius: 2px;
}
.yt-card .yt-title { font-size: 0.98rem; font-weight: 700; margin-top: 0.7rem; color: var(--ink); text-decoration: none; display: block; line-height: 1.3; }
.yt-card .yt-title:hover { color: var(--navy); }
.yt-card .yt-meta { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.25rem; }
.yt-card .yt-summary { font-size: 0.86rem; color: var(--ink-soft); margin-top: 0.5rem; }
.yt-card .yt-infographic-badge {
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.6rem;
  font-family: var(--font-nav); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--amber-deep); text-decoration: none;
}
.yt-card .yt-actions { margin-top: 0.7rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.yt-card .yt-actions .btn { padding: 0.5rem 0.9rem; font-size: 0.76rem; }

.theme-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.theme-filter button {
  font-family: var(--font-nav); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink-soft); cursor: pointer;
}
.theme-filter button.active, .theme-filter button:hover { border-color: var(--navy); color: var(--navy); }

/* Article / mechanic */
.article-head { color: var(--white); padding: 3rem 0 2.5rem; }
.article-head .eyebrow { color: var(--amber); }
.article-head h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 0.6rem; }
.article-section { padding: 2.5rem 0; border-bottom: 1px solid var(--line); background: var(--white); }
.article-section h2 { font-size: 1.35rem; }
.article-section .part-label { font-family: var(--font-nav); font-size: 0.78rem; color: var(--amber-deep); letter-spacing: 0.06em; }
.article-section p.copy { max-width: 68ch; font-size: 1rem; color: var(--ink); }
.ep-chip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.ep-chip {
  font-family: var(--font-nav); font-size: 0.78rem; font-weight: 700;
  padding: 0.45rem 0.8rem; border: 1px solid var(--navy); color: var(--navy);
  border-radius: 3px; text-decoration: none;
}
.ep-chip:hover { background: var(--navy); color: var(--white); }
.ep-chip.pending { border-style: dashed; border-color: var(--ink-faint); color: var(--ink-faint); cursor: default; }
.ep-chip.pending:hover { background: none; color: var(--ink-faint); }

/* Forms */
form.simple-form { display: flex; flex-direction: column; gap: 1rem; max-width: 44rem; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-family: var(--font-nav); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-soft); }
.form-row input, .form-row textarea, .form-row select {
  font-family: var(--font-body); font-size: 1rem; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink);
}
.form-row textarea { min-height: 8rem; resize: vertical; }
.radio-row { display: flex; gap: 1.5rem; }
.radio-row label { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-body); text-transform: none; font-size: 0.95rem; color: var(--ink); }

/* Subscribe strip */
.subscribe-strip { background: var(--amber); padding: 2.4rem 0; }
.subscribe-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.subscribe-strip h2 { color: var(--navy-ink); font-size: 1.3rem; }
.subscribe-strip form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.subscribe-strip input[type="email"] { padding: 0.7rem 1rem; border: none; border-radius: 3px; min-width: 16rem; font-family: var(--font-body); }
.subscribe-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.follow-links { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.follow-links a {
  font-family: var(--font-nav); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--navy-ink); text-decoration: none;
  border-bottom: 1.5px solid rgba(10,32,51,0.35); padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.follow-links a:hover { border-color: var(--navy-ink); }
.follow-links .sep { color: rgba(10,32,51,0.4); font-size: 0.78rem; }

/* Footer */
footer.site-footer { background: var(--navy-ink); color: rgba(255,255,255,0.72); padding: 3rem 0 2rem; font-size: 0.92rem; }
footer.site-footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { footer.site-footer .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { footer.site-footer .wrap { grid-template-columns: 1fr; } }
footer.site-footer .brand-col p { margin-bottom: 0.5rem; }
footer.site-footer h4 { color: var(--white); font-size: 0.85rem; margin-bottom: 0.8rem; letter-spacing: 0.04em; }
footer.site-footer a { color: rgba(255,255,255,0.72); text-decoration: none; }
footer.site-footer a:hover { color: var(--amber); }
footer.site-footer .legal { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2rem; padding-top: 1.2rem; font-size: 0.8rem; color: rgba(255,255,255,0.5); }

.note-box {
  background: var(--white); border: 1px dashed var(--ink-faint); border-radius: 4px;
  padding: 1rem 1.2rem; font-size: 0.88rem; color: var(--ink-soft); margin: 1.5rem 0;
}
.note-box b { color: var(--ink); font-family: var(--font-nav); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; display: block; margin-bottom: 0.35rem; }
