/*
 * AmericanFamilyFans — design system
 * Warm/retro "modern TV Guide" look: cream paper, deep-navy ink, retro-red accent,
 * chunky 3px borders and hard offset shadows. Implements the Claude Design handoff
 * (see PLAN.md and the original .dc.html prototype).
 */

:root {
  --cream:      #FAF3E5;  /* page background */
  --paper:      #FFFCF4;  /* card surfaces */
  --ink:        #1F2A44;  /* primary text + borders */
  --ink-deep:   #0F1830;
  --red:        #D63B2F;  /* accent / CTAs */
  --red-dark:   #B82F24;
  --amber:      #E8A33D;
  --teal:       #1F8A7A;
  --plum:       #B14A8F;
  --muted:      #49546F;  /* body text on cream */
  --muted-mono: #8A8268;  /* mono meta on cream */
  --on-dark:    #B9C2D8;  /* body text on navy */
  --on-dark-2:  #8C99B8;
  --dot-grid:   #EADCBF;

  --font-display: 'Alfa Slab One', serif;
  --font-body:    'Archivo', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  --shadow:    6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);

  --wrap: 1240px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--cream); }

body {
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

input { outline: none; }
::selection { background: var(--red); color: #FFF8E8; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); font-weight: 400; }

/* ---- dot-grid texture (hero, dark blocks) ---- */
.dotgrid {
  background-image: radial-gradient(var(--dot-grid) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}
.dotgrid--dark {
  background-image: radial-gradient(rgba(250, 243, 229, 0.1) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

/* ---- channel-dial nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); border-bottom: 3px solid var(--red);
}
.nav__inner {
  display: flex; align-items: center; gap: 28px; height: 76px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; cursor: pointer; flex-shrink: 0; }
.nav__logo {
  position: relative; width: 38px; height: 30px; background: var(--red);
  border: 2px solid var(--cream); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.nav__logo::before, .nav__logo::after {
  content: ""; position: absolute; top: -9px; width: 2px; height: 9px; background: var(--cream);
}
.nav__logo::before { left: 9px;  transform: rotate(-24deg); }
.nav__logo::after  { right: 9px; transform: rotate(24deg); }
.nav__logo span { width: 14px; height: 10px; background: var(--cream); border-radius: 2px; }
.nav__wordmark {
  font-family: var(--font-display); font-size: 17px; color: var(--cream);
  letter-spacing: 0.01em; white-space: nowrap;
}
.nav__channels { display: flex; gap: 10px; align-items: center; margin-left: auto; }

.channel {
  border: 2px solid rgba(250, 243, 229, 0.35); border-radius: 10px;
  padding: 6px 14px 7px; cursor: pointer; user-select: none; background: transparent;
}
.channel:hover { border-color: var(--cream); }
.channel--active { background: var(--red); border-color: var(--red); }
.channel--soon { opacity: 0.5; cursor: default; }
.channel--soon:hover { border-color: rgba(250, 243, 229, 0.35); }
.channel__num { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; color: rgba(250, 243, 229, 0.55); }
.channel--active .channel__num { color: rgba(255, 248, 232, 0.8); }
.channel__label {
  font-weight: 800; font-size: 13px; letter-spacing: 0.04em; color: var(--cream);
  display: flex; align-items: center; gap: 6px;
}
.channel__soon {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.1em; color: var(--amber);
  border: 1px solid var(--amber); border-radius: 4px; padding: 1px 4px;
}

.brand-fam { color: var(--amber); }

/* ---- section headers (title + dotted rule + meta) ---- */
.section { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 24px; }
.section-head h2 { font-size: 30px; margin: 0; }
.section-head__rule { flex: 1; border-bottom: 3px dotted #D8C9A6; }
.section-head__meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted-mono); }

/* ---- generic card with hard offset shadow ---- */
.card {
  background: var(--paper); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: var(--shadow);
}
.card--link { cursor: pointer; transition: transform .08s ease, box-shadow .08s ease; }
.card--link:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }

/* ---- pills, badges, ribbons ---- */
.genre-tag {
  font-weight: 800; font-size: 11px; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 99px; border: 1.5px solid;
}
.platform-badge {
  font-weight: 900; font-size: 10px; letter-spacing: 0.06em;
  padding: 4px 8px; border-radius: 5px; border: 1.5px solid var(--ink);
}
.fan-ribbon {
  background: var(--red); color: #FFF8E8; font-weight: 800; letter-spacing: 0.1em;
  clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  font-weight: 800; border: 3px solid var(--ink); border-radius: 14px;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn--primary { background: var(--red); color: #FFF8E8; }
.btn--primary:hover { background: var(--red-dark); }

/* ---- show card ---- */
.show-card { position: relative; min-width: 300px; }
.show-card__strip {
  height: 12px; border-radius: 12px 12px 0 0; border-bottom: 3px solid var(--ink);
}
.show-card__thumb {
  position: relative; height: 160px; border-radius: 12px 12px 0 0;
  border-bottom: 3px solid var(--ink); overflow: hidden; background: var(--ink);
}
.show-card__thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
}
.show-card__ribbon {
  position: absolute; top: -14px; right: -12px; transform: rotate(5deg);
  font-size: 11px; padding: 7px 18px;
}
.show-card__thumb .show-card__ribbon { top: 10px; }
.show-card__body { padding: 20px; }
.show-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.show-card__title { font-family: var(--font-display); font-size: 21px; line-height: 1.15; margin-bottom: 10px; }
.show-card__blurb { font-size: 14px; line-height: 1.5; color: var(--muted); margin-bottom: 16px; min-height: 42px; }
.show-card__foot { display: flex; align-items: center; gap: 8px; }
.show-card__rating { font-weight: 900; font-size: 14px; margin-left: auto; }
.years { font-family: var(--font-mono); font-size: 11px; color: var(--muted-mono); }

/* ============ HOMEPAGE ============ */

/* hero */
.hero { border-bottom: 3px solid var(--ink); }
.hero__inner {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
  padding-top: 80px; padding-bottom: 88px;
}
.hero__eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.18em;
  color: var(--red); font-weight: 600; margin-bottom: 20px;
}
.hero__title { font-size: 64px; line-height: 1.04; margin: 0 0 22px; color: var(--ink); }
.hero__title .accent { color: var(--red); }
.hero__sub { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 520px; margin: 0 0 36px; text-wrap: pretty; }

.search {
  display: flex; max-width: 560px; background: var(--paper);
  border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.search input {
  flex: 1; border: none; background: transparent; padding: 0 20px;
  font-size: 16px; font-family: var(--font-body); color: var(--ink); height: 58px;
}
.search button {
  background: var(--red); color: #FFF8E8; font-weight: 800; font-size: 14px; letter-spacing: 0.06em;
  display: flex; align-items: center; padding: 0 24px; cursor: pointer;
  border: none; border-left: 3px solid var(--ink); white-space: nowrap;
}
.search button:hover { background: var(--red-dark); }

.jump { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.jump__label { font-family: var(--font-mono); font-size: 12px; color: var(--muted-mono); }
.jump__pill {
  display: flex; align-items: center; gap: 8px; background: var(--paper);
  border: 2px solid var(--ink); border-radius: 99px; padding: 7px 16px;
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.jump__pill:hover { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.jump__dot { width: 10px; height: 10px; border-radius: 99px; border: 1.5px solid var(--ink); display: inline-block; }

/* hero retro-TV illustration */
.tv { position: relative; width: 330px; margin: 0 auto; padding-top: 54px; }
.tv__antenna { position: absolute; top: 8px; width: 4px; height: 58px; background: var(--ink); border-radius: 2px; }
.tv__antenna--l { left: 118px; transform: rotate(-28deg); }
.tv__antenna--r { right: 118px; transform: rotate(28deg); }
.tv__knob { position: absolute; top: 0; width: 14px; height: 14px; border: 2.5px solid var(--ink); border-radius: 99px; }
.tv__knob--l { left: 96px; background: var(--red); }
.tv__knob--r { right: 96px; background: var(--amber); }
.tv__body {
  position: relative; background: var(--ink); border-radius: 26px; padding: 18px;
  box-shadow: 10px 10px 0 rgba(31, 42, 68, 0.18); display: flex; gap: 16px;
}
.tv__screen {
  flex: 1; background: #FFF8E8; border-radius: 16px; padding: 22px 20px; min-height: 210px;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
}
.tv__nowshowing { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--red); font-weight: 600; margin-bottom: 8px; }
.tv__fanpicks { font-family: var(--font-display); font-size: 30px; line-height: 1.1; color: var(--ink); }
.tv__bars { height: 26px; border-radius: 6px; background: repeating-linear-gradient(90deg, #1F2A44 0 10px, #D63B2F 10px 20px, #E8A33D 20px 30px, #1F8A7A 30px 40px, #FFF8E8 40px 50px); }
.tv__controls { width: 54px; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; }
.tv__dial { width: 34px; height: 34px; border-radius: 99px; border: 3px solid var(--ink-deep); }
.tv__ribbon {
  position: absolute; top: 34px; right: -26px; transform: rotate(7deg);
  font-size: 12px; padding: 9px 22px;
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
}

/* where to watch */
.platforms-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.platform-card { padding: 18px; }
.platform-card__badge {
  display: inline-block; font-weight: 900; font-size: 13px; letter-spacing: 0.06em;
  padding: 6px 12px; border-radius: 7px; border: 2px solid var(--ink); margin-bottom: 14px;
}
.platform-card__count { font-size: 14px; font-weight: 600; color: var(--muted); }
.platform-card__cta { font-weight: 800; font-size: 13px; color: var(--red); margin-top: 8px; }

/* fan favorites scroller */
.scroller { display: flex; gap: 26px; overflow-x: auto; padding: 16px 4px 22px; }
.scroller .show-card { max-width: 300px; }

/* find your show CTA */
.cta {
  border: 3px solid var(--ink); border-radius: 22px; background: var(--ink);
  box-shadow: 8px 8px 0 rgba(31, 42, 68, 0.2);
  padding: 52px 56px; display: flex; align-items: center; gap: 40px; position: relative; overflow: hidden;
}
.cta__title { font-size: 36px; margin: 0 0 12px; color: var(--cream); }
.cta__sub { margin: 0; color: var(--on-dark); font-size: 17px; max-width: 480px; }
.cta__actions { display: flex; flex-direction: column; align-items: center; gap: 18px; flex-shrink: 0; }
.cta__btn {
  background: var(--red); color: #FFF8E8; font-weight: 900; font-size: 17px; letter-spacing: 0.03em;
  padding: 18px 34px; border-radius: 14px; border: 3px solid var(--cream); cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
}
.cta__btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.3); }
.cta__soon {
  transform: rotate(-4deg); border: 2px dashed var(--amber); color: var(--amber);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; padding: 6px 14px; border-radius: 8px;
}

/* latest guides */
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.guide-card { padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); }
.guide-card:hover { box-shadow: 7px 7px 0 var(--ink); }
.guide-card__meta { display: flex; align-items: center; gap: 10px; }
.guide-card__read { font-family: var(--font-mono); font-size: 11px; color: var(--muted-mono); }
.guide-card__title { font-family: var(--font-display); font-size: 20px; line-height: 1.2; }
.guide-card__desc { font-size: 14px; line-height: 1.5; color: var(--muted); flex: 1; }
.guide-card__cta { font-weight: 800; font-size: 13px; color: var(--red); }

/* newsletter */
.news { border: 3px solid var(--ink); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow-lg); padding: 52px; text-align: center; }
.news__eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; color: var(--red); font-weight: 600; margin-bottom: 14px; }
.news__title { font-size: 34px; margin: 0 0 10px; }
.news__title .accent { color: var(--red); }
.news__sub { margin: 0 auto 30px; color: var(--muted); font-size: 16px; max-width: 440px; }
.news__form {
  display: flex; max-width: 480px; margin: 0 auto; background: var(--cream);
  border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.news__form input { flex: 1; border: none; background: transparent; padding: 0 18px; font-size: 15px; font-family: var(--font-body); color: var(--ink); height: 54px; }
.news__form button {
  background: var(--ink); color: var(--cream); font-weight: 800; font-size: 13px; letter-spacing: 0.06em;
  display: flex; align-items: center; padding: 0 24px; cursor: pointer; border: none;
}
.news__form button:hover { background: var(--red); }

/* responsive */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__title { font-size: 44px; }
  .platforms-grid { grid-template-columns: repeat(2, 1fr); }
  .guides-grid { grid-template-columns: 1fr; }
  .tv { display: none; }
}

/* ---- footer ---- */
.foot { background: var(--ink); border-top: 3px solid var(--red); }
.foot__inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding-top: 44px; padding-bottom: 44px; }
.foot__brand { font-family: var(--font-display); font-size: 16px; color: var(--cream); }
.foot__links { display: flex; gap: 22px; }
.foot__links a { color: var(--on-dark); font-weight: 600; font-size: 13px; }
.foot__links a:hover { color: var(--cream); }
.foot__links .is-soon { color: #5C6A8C; cursor: default; }
.foot__legal {
  font-family: var(--font-mono); font-size: 10px; color: #5C6A8C; letter-spacing: 0.06em;
  max-width: 380px; text-align: right; margin-left: auto;
}

/* Flash banners (e.g. admin access redirect) */
.site-flash {
  border: 3px solid var(--ink); border-radius: 12px; padding: 13px 18px;
  font-weight: 700; box-shadow: 5px 5px 0 var(--ink); margin: 0 0 8px;
}
.site-flash--notice { background: #E6F7F1; }
.site-flash--alert { background: #FCE6E3; }
