/* =========================================================
   Sweetheart Pub
   Built to the Design Lock v1 standard (Notion, Website Hub).
   Type scale, 8pt spacing, container widths, 0-radius, pill
   buttons, surface-on-surface instead of shadows, 2px rules,
   restrained motion with a reduced-motion guard.
   Palette is Sweetheart Pub's own, taken from the logo.
   ========================================================= */

:root {

  /* ---- surfaces. Never pure #000 - it reads flat and cheap. ---- */
  --ink:        #0a0a0c;   /* page */
  --ink-deep:   #060607;   /* the one step below page */
  --surface:    #131316;   /* cards, panels - lifts without competing */
  --surface-2:  #1a1a1f;   /* nested surface */
  --rule:       #24242b;
  --rule-strong:#33333d;   /* 2px section dividers */

  /* ---- type colors ---- */
  --bone:       #f4f2ec;
  --silver:     #cdcbc4;
  --steel:      #8b8a84;

  /* ---- brand. The logo's three offset layers. ---- */
  --blue:       #0e91c5;
  --blush:      #f5a0a8;
  --yellow:     #fee619;

  /* ---- 8pt spacing scale ---- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;    /* default section gap */
  --space-8: 9rem;
  --space-9: 12rem;

  /* ---- containers ---- */
  --narrow: 680px;
  --text:   780px;
  --wide:   1180px;
  --full:   1400px;

  /* ---- type. Inter is on the AI-slop banlist. Inter Tight instead. ---- */
  --f-display: 'Anton', 'Arial Narrow', sans-serif;
  --f-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }

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

.wrap      { width: min(100% - var(--space-4), var(--wide)); margin-inline: auto; }
.wrap-full { width: min(100% - var(--space-4), var(--full)); margin-inline: auto; }
.wrap-text { width: min(100% - var(--space-4), var(--text)); margin-inline: auto; }

.sr-only, .skip {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: .6rem; left: .6rem; width: auto; height: auto;
  clip: auto; padding: .7rem 1.1rem; background: var(--bone);
  color: var(--ink); z-index: 999;
}
.hp { position: absolute; left: -9999px; }

/* =========================================================
   Type scale
   ========================================================= */

.display-hero {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1.06; letter-spacing: -.03em;
  margin: 0 0 var(--space-4);   /* clears the 21px stacked shadow */
}
.display-section {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: .92; letter-spacing: -.025em;
  margin: 0 0 var(--space-2);
}
.display-card {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.02; letter-spacing: -.015em;
  margin: 0 0 var(--space-1);
}

/* Mono kicker. The only place all-caps is allowed. */
.kicker {
  font-family: var(--f-mono); font-weight: 600;
  font-size: .75rem; line-height: 1.2;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 var(--space-2);
}
.micro {
  font-family: var(--f-mono); font-weight: 500;
  font-size: .6875rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--steel);
}

.dek { font-size: 1.125rem; line-height: 1.6; color: var(--silver); margin: 0; }
.lede {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem); line-height: 1.5;
  color: var(--silver); max-width: 46ch; margin: 0 0 var(--space-4);
}

em { font-style: italic; }
strong { font-weight: 600; }

/* =========================================================
   Header
   ========================================================= */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,12,.9);
  backdrop-filter: blur(14px);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); padding: var(--space-2) 0;
}
.brand { display: block; line-height: 0; flex-shrink: 0; }
.brand img { height: 74px; width: auto; }
.brand img.missing { display: none; }
.brand img.missing + .brand-fallback { display: inline; }
.brand-fallback {
  display: none; font-family: var(--f-display);
  font-size: 1.5rem; color: var(--bone); line-height: 1.2;
}

.site-nav { display: flex; gap: var(--space-3); }
.site-nav a {
  font-family: var(--f-mono); font-weight: 500;
  color: var(--silver); text-decoration: none;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  padding-bottom: 5px; border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.site-nav a:hover { color: var(--bone); border-bottom-color: var(--blush); }
.site-nav a.on { color: var(--bone); border-bottom-color: var(--blue); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; width: 44px; }
.nav-toggle span { display: block; height: 2px; background: var(--bone); margin: 5px 0; }

/* The logo's three colors as the masthead rule. */
.rainbow-rule {
  height: 3px; border: 0; margin: 0;
  background: linear-gradient(90deg,
    var(--blue) 0 33.33%, var(--blush) 33.33% 66.66%, var(--yellow) 66.66%);
}

/* =========================================================
   Hero
   ========================================================= */

.hero { padding: var(--space-7) 0 var(--space-7); }
.hero-inner { max-width: var(--text); }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 42ch; }

/* The logo's move: white letterform, then blue, blush and yellow stacked
   behind it, black between each so the layers stay separate instead of
   smearing. Same order as the logo. */
.stack {
  color: #fff;
  text-shadow:
     3px  3px 0 var(--ink-deep),
     7px  7px 0 var(--blue),
    10px 10px 0 var(--ink-deep),
    14px 14px 0 var(--blush),
    17px 17px 0 var(--ink-deep),
    21px 21px 0 var(--yellow);
}
@media (max-width: 900px) {
  .stack {
    text-shadow:
      2px 2px 0 var(--ink-deep),  4px  4px 0 var(--blue),
      6px 6px 0 var(--ink-deep),  8px  8px 0 var(--blush),
      10px 10px 0 var(--ink-deep), 12px 12px 0 var(--yellow);
  }
}

/* =========================================================
   Buttons - 24px pill is the only soft moment on the site
   ========================================================= */

.btn {
  display: inline-block; padding: .85rem 1.75rem; border-radius: 24px;
  font-family: var(--f-mono); font-weight: 600;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s;
}
.btn-primary { background: var(--bone); color: var(--ink); }
.btn-primary:hover { background: var(--blue); color: #fff; }
.btn-ghost { border-color: var(--rule-strong); color: var(--bone); }
.btn-ghost:hover { border-color: var(--blush); color: var(--blush); }
.btn-sm { padding: .6rem 1.2rem; font-size: .68rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.btn.is-off {
  background: transparent; color: var(--steel);
  border-color: var(--rule); cursor: not-allowed;
}

/* =========================================================
   Sections - 2px committed dividers, never hairlines
   ========================================================= */

.section { padding: var(--space-7) 0; border-top: 2px solid var(--rule-strong); }
.section-head { margin-bottom: var(--space-5); max-width: 58ch; }  /* left, never centered */
.page-head { padding: var(--space-6) 0 var(--space-4); }
.page-head h1 { max-width: 18ch; }
.page-head .dek { max-width: 56ch; margin-top: var(--space-2); }

/* =========================================================
   Cards
   ========================================================= */

.grid { display: grid; gap: var(--space-3); }
.grid-ep { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }
.grid-ep--fill { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
.grid-3  { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--rule);
  display: flex; flex-direction: column;
  transition: transform .2s ease-out, border-color .2s ease-out;
}
.card:hover { transform: translateY(-4px); border-color: var(--blue); }

.card-media {
  aspect-ratio: 16 / 9; background: var(--surface-2);
  position: relative; overflow: hidden; display: block;
}
.grid-3 .card-media { aspect-ratio: 4 / 5; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; padding: var(--space-2);
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--steel);
  background: repeating-linear-gradient(45deg, #16161a 0 14px, #121216 14px 28px);
}

.card-body { padding: var(--space-3); display: flex; flex-direction: column; flex: 1; }
.card-body .kicker { margin-bottom: var(--space-1); }
.display-card a { color: var(--bone); text-decoration: none; }
.display-card a:hover { color: var(--blue); }
.card-blurb { color: var(--silver); font-size: .9375rem; margin: 0 0 var(--space-3); flex: 1; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2); margin-top: auto;
}
.meta-line { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em;
             text-transform: uppercase; color: var(--steel); }

/* arrow nudges on hover */
.arrow { display: inline-block; transition: transform .2s ease-out; }
.card:hover .arrow { transform: translateX(5px); }

.play {
  position: absolute; inset: 0; margin: auto;
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.9);
  transition: background .18s;
}
.play::after {
  content: ''; position: absolute; top: 50%; left: 55%;
  transform: translate(-50%,-50%);
  border-left: 16px solid #fff;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
}
.card:hover .play { background: var(--blue); }

.badge {
  position: absolute; left: var(--space-2); bottom: var(--space-2);
  background: var(--ink-deep); border: 1px solid var(--rule-strong);
  color: var(--silver); font-family: var(--f-mono);
  font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .34rem .6rem;
}
.badge-lg { font-size: .68rem; padding: .45rem .85rem; }

/* =========================================================
   Episode page
   ========================================================= */

.ep-head { padding: var(--space-6) 0 var(--space-4); }
.ep-head h1 { max-width: 17ch; }

.ep-video {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--rule); background: var(--surface-2);
}
.ep-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ep-video img { width: 100%; height: 100%; object-fit: cover; }
.ep-video .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--steel);
  background: repeating-linear-gradient(45deg, #16161a 0 14px, #121216 14px 28px);
}

.ep-body {
  display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr);
  gap: var(--space-5); padding: var(--space-5) 0 var(--space-6);
  align-items: start;
}
.ep-story { max-width: 66ch; }
.ep-story p { font-size: 1.0625rem; line-height: 1.65; color: var(--silver); }
.ep-story p:first-child { font-size: 1.35rem; line-height: 1.45; color: var(--bone); }

.ep-side { display: flex; flex-direction: column; gap: var(--space-3); position: sticky; top: 120px; }

.panel { background: var(--surface); border: 1px solid var(--rule); padding: var(--space-3); }
.panel-buy { border-color: var(--rule-strong); }
.panel-h {
  font-family: var(--f-display); font-weight: 400;
  font-size: 1.3rem; line-height: 1.05; letter-spacing: -.01em;
  margin: 0 0 var(--space-2);
}
.panel p { color: var(--silver); font-size: .9375rem; margin: 0 0 var(--space-2); }
.panel-note { color: var(--steel); font-size: .84rem; margin: var(--space-2) 0 0; }
.price-lg {
  font-family: var(--f-display); font-size: 2.1rem;
  margin: 0 0 var(--space-2); color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.panel .form { max-width: none; }

/* ---- palette swatches ---- */
.swatches { list-style: none; margin: 0; padding: 0; }
.swatches li {
  display: grid; grid-template-columns: 24px 1fr auto;
  align-items: center; gap: var(--space-2);
  padding: .45rem 0; border-bottom: 1px solid var(--rule);
  font-size: .875rem;
}
.swatches li:last-child { border-bottom: 0; }
.sw { width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.14); }
.sw-name { color: var(--silver); }
.sw-hex {
  font-family: var(--f-mono); color: var(--steel);
  font-size: .7rem; font-variant-numeric: tabular-nums;
}

/* =========================================================
   Prose
   ========================================================= */

.prose { max-width: 66ch; }
.prose h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 1.9rem; line-height: 1; letter-spacing: -.02em;
  margin: var(--space-5) 0 var(--space-2);
}
.prose p, .prose li { color: var(--silver); }
.prose li { margin-bottom: var(--space-1); }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: var(--space-2); }
.steps strong { color: var(--bone); font-weight: 600; }
.empty, .muted-p { color: var(--steel); }
.note-edit {
  border-left: 2px solid var(--yellow); padding: .2rem 0 .2rem var(--space-2);
  color: var(--steel); font-size: .9rem;
}

/* =========================================================
   Forms
   ========================================================= */

.form { max-width: 34rem; }
.field { margin-bottom: var(--space-3); }
.field label {
  display: block; font-family: var(--f-mono); font-weight: 500;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--steel); margin-bottom: var(--space-1);
}
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem; border-radius: 0;
  background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-family: var(--f-body); font-size: 1rem;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue);
}
.field textarea { min-height: 9rem; resize: vertical; }

.flash { padding: var(--space-2); margin-bottom: var(--space-3); font-size: .9375rem; }
.flash-ok  { background: rgba(14,145,197,.1);  border: 1px solid var(--blue);  color: var(--bone); }
.flash-err { background: rgba(245,160,168,.1); border: 1px solid var(--blush); color: var(--bone); }

/* =========================================================
   Footer
   ========================================================= */

.site-foot { border-top: 2px solid var(--rule-strong); padding: var(--space-6) 0 var(--space-5); }
.foot-top {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-5);
  align-items: start; margin-bottom: var(--space-5);
}
.foot-signup h2 {
  font-family: var(--f-display); font-weight: 400;
  font-size: 1.8rem; line-height: 1; letter-spacing: -.02em; margin: 0 0 var(--space-1);
}
.foot-signup p { color: var(--steel); margin: 0 0 var(--space-3); font-size: .9375rem; }
.signup { display: flex; gap: var(--space-1); max-width: 26rem; }
.signup input[type=email] {
  flex: 1; padding: .8rem .9rem;
  background: var(--ink); border: 1px solid var(--rule);
  color: var(--bone); font-size: .9375rem; font-family: var(--f-body);
}
.signup input[type=email]:focus { outline: none; border-color: var(--blue); }
.signup button {
  padding: .8rem 1.4rem; border: 0; cursor: pointer; border-radius: 24px;
  background: var(--bone); color: var(--ink);
  font-family: var(--f-mono); font-weight: 600;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
}
.signup button:hover { background: var(--blue); color: #fff; }

.foot-social { display: flex; gap: var(--space-1); }
.soc {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--rule); color: var(--silver); transition: .18s;
}
.soc:hover { color: var(--bone); border-color: var(--blue); }

.foot-fine {
  color: var(--steel); font-family: var(--f-mono);
  font-size: .68rem; letter-spacing: .08em; margin: var(--space-1) 0;
}
.foot-fine a { color: var(--steel); }
.foot-fine a:hover { color: var(--bone); }

/* =========================================================
   Motion. JS adds .dsr-js, so with JS off the cards are simply
   visible rather than stuck at opacity zero.
   ========================================================= */

.dsr-js .reveal { opacity: 0; transform: translateY(16px); }
.dsr-js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .5s ease-out, transform .5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dsr-js .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .ep-body { grid-template-columns: 1fr; gap: var(--space-4); }
  .ep-side { position: static; }
  .foot-top { grid-template-columns: 1fr; gap: var(--space-4); }
}

@media (max-width: 760px) {
  :root { --space-7: 4rem; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 96px 0 auto 0;
    background: var(--ink-deep); flex-direction: column;
    gap: 0; padding: var(--space-2) var(--space-3) var(--space-4);
    border-bottom: 2px solid var(--rule-strong);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: var(--space-2) 0; border-bottom: 1px solid var(--rule); }
  .brand img { height: 52px; }
  .hero { padding: var(--space-6) 0; }
  .hero-inner { max-width: none; }
}
