:root {
  --ink: #111111;
  --cream: #f6f2e6;
  --cream-deep: #ebe1cb;
  --paper: #fffaf0;
  --gold: #d4a037;
  --gold-dark: #a87414;
  --graphite: #5f5f5f;
  --shadow: rgba(17, 17, 17, 0.16);
  --font-hand: "Marker Felt", "Comic Sans MS", "Bradley Hand", "Segoe Print", cursive;
  --font-body: "Trebuchet MS", "Avenir Next", "Helvetica Neue", sans-serif;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 12%, rgba(212, 160, 55, 0.13), transparent 24rem),
    radial-gradient(circle at 82% 4%, rgba(255, 250, 240, 0.9), transparent 20rem),
    linear-gradient(180deg, var(--cream), #f3ead6 48%, var(--cream));
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.03) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  width: min(var(--max), calc(100% - 2rem));
  margin: 1rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.88);
  box-shadow: 7px 8px 0 rgba(17, 17, 17, 0.1);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  line-height: 1;
}

.brand-logo {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 3px rgba(255, 250, 240, 0.95),
    3px 3px 0 var(--gold);
  flex: 0 0 auto;
}

.brand strong,
h1,
h2,
h3,
.prompt-label,
.tip-kicker,
.episode-number {
  font-family: var(--font-hand);
  letter-spacing: 0.01em;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
}

.brand small {
  display: block;
  margin-top: 0.25rem;
  color: var(--graphite);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(212, 160, 55, 0.18);
  outline: 2px solid transparent;
}

.nav-pill {
  border: 2px solid var(--ink);
  background: var(--gold);
  box-shadow: 3px 3px 0 var(--ink);
}

main,
.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  min-height: calc(100vh - 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.85fr);
  gap: clamp(2rem, 5vw, 4.8rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--gold-dark);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(3.5rem, 8.4vw, 7.15rem);
  line-height: 0.88;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.title-line-short {
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
}

.title-line-long {
  margin-top: 0.04em;
  font-size: 0.56em;
  line-height: 0.95;
}

.title-pen {
  width: 0.72em;
  height: 0.72em;
  flex: 0 0 auto;
  overflow: visible;
  transform: rotate(10deg) translateY(0.04em);
  filter: drop-shadow(4px 4px 0 rgba(17, 17, 17, 0.1));
}

.title-pen-body,
.title-pen-tip {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.title-pen-cap,
.title-pen-spark {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
}

.title-pen-tip {
  fill: var(--gold);
}

h2 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.95;
}

h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
}

.hero-lede,
.section-heading p,
.feature-copy p,
.join p {
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.62;
}

.hero-lede {
  max-width: 42rem;
  margin: 1.5rem 0 0;
}

.hero-actions,
.whiteboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.85rem 1.1rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 5px 0 var(--ink);
  transform: translate(0, 0);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 3px 0 var(--ink);
}

.button-primary {
  background: var(--gold);
}

.button-secondary {
  background: var(--paper);
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.proof-strip span {
  padding: 0.5rem 0.72rem;
  border: 2px dashed rgba(17, 17, 17, 0.45);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.65);
  font-weight: 800;
}

.hero-board,
.paper-frame,
.whiteboard,
.episode-card,
.generated-prompt,
.builder-form,
.join {
  position: relative;
  border: 4px solid var(--ink);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(247, 241, 226, 0.96)),
    var(--paper);
  box-shadow: 10px 12px 0 rgba(17, 17, 17, 0.12);
}

.hero-board {
  padding: clamp(0.8rem, 2vw, 1.1rem);
  rotate: 0.8deg;
  max-width: 590px;
  justify-self: center;
}

.hero-board img {
  border-radius: 20px;
  aspect-ratio: 645 / 455;
  object-fit: cover;
  object-position: center;
}

.board-caption {
  margin: 0.8rem 0 0;
  padding: 0 0.4rem 0.15rem;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  line-height: 1.15;
}

.tape {
  position: absolute;
  z-index: 1;
  width: 5.8rem;
  height: 1.55rem;
  background: rgba(212, 160, 55, 0.35);
  border: 2px solid rgba(168, 116, 20, 0.35);
  rotate: -8deg;
}

.tape-one {
  top: -0.75rem;
  left: 2rem;
}

.tape-two {
  right: 2.25rem;
  bottom: -0.75rem;
  rotate: 7deg;
}

.episode-card p,
.generated-prompt p,
.builder-form label,
.whiteboard p,
.drawn-list {
  line-height: 1.55;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.4rem;
}

.tips-section,
.episodes,
.prompt-lab,
.split-feature,
.join {
  margin: clamp(3rem, 7vw, 6rem) 0;
}

.tip-lab {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.tip-controls {
  display: grid;
  gap: 0.7rem;
  position: sticky;
  top: 7rem;
}

.tip-chip {
  min-height: 3.4rem;
  padding: 0.7rem 0.9rem;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(17, 17, 17, 0.18);
}

.tip-chip.is-active {
  background: var(--gold);
  box-shadow: 4px 4px 0 var(--ink);
}

.whiteboard {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  min-height: 28rem;
}

.whiteboard::after,
.generated-prompt::after,
.builder-form::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0.85rem;
  height: 0.65rem;
  border: 3px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  opacity: 0.18;
}

.whiteboard-top {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.marker-dot {
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
}

.marker-dot-gold {
  background: var(--gold);
}

.tip-kicker,
.episode-number,
.prompt-label {
  color: var(--gold-dark);
  font-weight: 900;
  margin: 0 0 0.45rem;
}

.whiteboard h3 {
  max-width: 17ch;
}

.prompt-card {
  margin-top: 1.4rem;
  padding: 1rem;
  border: 3px dashed var(--ink);
  border-radius: 18px;
  background: rgba(212, 160, 55, 0.1);
}

.prompt-card p:last-child,
.generated-prompt p:nth-child(2) {
  margin-bottom: 0;
  font-size: 1.1rem;
}

.copy-status {
  min-height: 1.4rem;
  color: var(--gold-dark);
  font-weight: 900;
}

.split-feature {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.paper-frame {
  padding: 0.75rem;
  rotate: -1.2deg;
}

.paper-frame img {
  border-radius: 20px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.feature-copy {
  max-width: 650px;
}

.drawn-list {
  display: grid;
  gap: 0.65rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.drawn-list li {
  position: relative;
  padding-left: 2rem;
  font-weight: 800;
}

.drawn-list li::before {
  content: "*";
  position: absolute;
  left: 0;
  top: -0.15rem;
  color: var(--gold-dark);
  font-family: var(--font-hand);
  font-size: 1.8rem;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.episode-card {
  overflow: hidden;
}

.episode-card img {
  width: 100%;
  aspect-ratio: 9 / 11;
  object-fit: cover;
  object-position: center 35%;
  border-bottom: 4px solid var(--ink);
}

.episode-card div {
  padding: 1.1rem;
}

.prompt-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.builder-form,
.generated-prompt {
  padding: clamp(1rem, 3vw, 1.6rem);
}

.builder-form {
  display: grid;
  gap: 1rem;
}

.builder-form label,
.join-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 900;
}

input {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: inset 3px 3px 0 rgba(17, 17, 17, 0.06);
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.generated-prompt {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

#built-prompt {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-family: var(--font-hand);
  line-height: 1.18;
}

.join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.25rem, 4vw, 2.4rem);
  background:
    radial-gradient(circle at 8% 15%, rgba(212, 160, 55, 0.18), transparent 14rem),
    var(--paper);
}

.join-form {
  display: grid;
  gap: 0.8rem;
}

.join-form p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--graphite);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    border-radius: 28px;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero,
  .split-feature,
  .prompt-builder,
  .join {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .hero-board {
    max-width: 460px;
    margin-inline: auto;
  }

  .episode-grid {
    grid-template-columns: 1fr;
  }

  .tip-lab {
    grid-template-columns: 1fr;
  }

  .tip-controls {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .tip-chip {
    min-width: 8.5rem;
    text-align: center;
  }
}

@media (max-width: 560px) {
  main,
  .site-footer,
  .site-header {
    width: min(100% - 1rem, var(--max));
  }

  .nav a {
    padding: 0.58rem 0.68rem;
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(3.2rem, 14vw, 4.15rem);
  }

  .title-line-long {
    font-size: 0.52em;
  }

  .title-pen {
    width: 0.64em;
    height: 0.64em;
  }

  .button {
    width: 100%;
  }

  .hero-actions,
  .whiteboard-actions {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
