/* Tech Like I'm Five: same palette and "sticker" style as the videos.
   Cream dotted background, ink outlines, hard (unblurred) ink shadows, Poppins. */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-latin-700-italic.woff2") format("woff2");
}

:root {
  /* Video palette */
  --bg: #fff8ee;
  --dot: #f0e6d6;
  --ink: #1b1b2f;
  --white: #fff;
  --coral: #ff6b5b;
  --teal: #2ec4b6;
  --yellow: #ffd23f;
  --blue: #4d7cfe;
  --purple: #9b5de5;
  --gray: #78788c;
  --pale-yellow: #fff0b4;
  --mint: #d2f5f0;
  --track: #ece2d2;

  /* Slightly deeper versions for text, so it stays readable on cream */
  --coral-big: #f0533f; /* large headings */
  --coral-text: #cc3d2c; /* small text */
  --gray-text: #66667a;

  --line: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 16px;
  --pill: 999px;
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1); /* back-ease overshoot, like the video */

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DejaVu Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --page: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px; /* room for the progress bar */
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 1.6px, transparent 2.2px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  flex: 1;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nowrap {
  white-space: nowrap;
}

.accent {
  color: var(--coral-big);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 20;
  padding: 0.6em 1em;
  background: var(--yellow);
  border: var(--line);
  border-radius: var(--pill);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

/* ---------- Header & footer ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 24px 8px;
}

/* The "TECH LIKE I'M FIVE" pill from the top-left corner of the slides */
.badge {
  display: inline-block;
  padding: 0.55em 1.15em;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--pill);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.45em 1.05em;
  background: var(--white);
  border: var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow-sm);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.chip:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.chip:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}
.chip-coral {
  background: var(--coral);
}
.chip-mint {
  background: var(--mint);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 96px;
  padding-block: 32px 40px;
  /* a 3px rule lined up with the content, not the page edge */
  background: linear-gradient(var(--track) 0 0) top center / calc(100% - 2 * var(--gutter)) 3px no-repeat;
  color: var(--gray-text);
  font-weight: 500;
}
.footer-joke {
  flex-basis: 100%;
  color: var(--ink);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-nav a {
  text-decoration-color: var(--coral);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.footer-nav a:hover {
  color: var(--ink);
}
.footer-small {
  font-size: 0.875rem;
}

/* The coral progress bar along the bottom of every slide; here it fills as you scroll. */
.progress {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 10;
  height: 8px;
  background: var(--track);
}
.progress-bar {
  display: block;
  height: 100%;
  background: var(--coral);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  background: var(--white);
  color: var(--ink);
  border: var(--line);
  border-radius: var(--pill);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn-lg {
  font-size: 1.1875rem;
  padding: 0.8em 1.6em;
}
.btn-sm {
  font-size: 0.9375rem;
  padding: 0.55em 1.1em;
  box-shadow: var(--shadow-sm);
}
.btn-coral {
  background: var(--coral);
}
.btn-yellow {
  background: var(--yellow);
}
.btn-ink {
  background: var(--ink);
  color: var(--white);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
}

/* ---------- Shared bits ---------- */

.card {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--coral-text);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lede {
  color: var(--gray-text);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.6;
  max-width: 38em;
}

.display {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.display-sub {
  display: block;
}

/* Yellow marker under "Five", swept in from the left like on the title slide */
.hl {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hl::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.14em;
  right: -0.14em;
  bottom: 0.2em;
  height: 0.37em;
  background: var(--yellow);
  border-radius: 0.14em;
  transform-origin: left;
  animation: sweep 0.45s ease 0.45s both;
}

/* The little "+" sparkles scattered around the slides */
.sparkle {
  --s: 26px;
  position: absolute;
  width: var(--s);
  height: var(--s);
  color: var(--c, var(--teal));
  pointer-events: none;
  animation: twinkle 2.8s ease-in-out infinite;
}
.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 2px;
}
.sparkle::before {
  inset: calc(50% - 2.5px) 0;
}
.sparkle::after {
  inset: 0 calc(50% - 2.5px);
}
.sparkle:nth-of-type(2n) {
  animation-delay: -1.1s;
}
.sparkle:nth-of-type(3n) {
  animation-delay: -1.9s;
}

.section {
  margin-top: 88px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.section-title {
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
}
.section > .section-title {
  margin-bottom: 28px;
}

/* ---------- Home ---------- */

.hero {
  position: relative;
  padding-top: 24px;
}

.wordmark {
  font-size: clamp(2.75rem, 1rem + 7.4vw, 6.25rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-align: center;
  animation: pop-in 0.6s var(--pop) 0.05s both;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 24px 48px;
  margin-top: 32px;
}

.hero-copy {
  display: grid;
  gap: 24px;
  animation: pop-in 0.5s var(--pop) 0.6s both;
}

.tagline {
  color: var(--coral-big);
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  font-weight: 700;
  line-height: 1.2;
}

.handle {
  color: var(--gray-text);
  font-weight: 500;
}
.handle a {
  color: var(--ink);
  font-weight: 700;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

/* Hedgehog mascot: bounces in, the 5 pops in after, gentle bob, hops when you poke it */
.mascot {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1359 / 1322;
  margin-inline: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mascot-hop,
.mascot-enter,
.mascot-bob {
  position: absolute;
  inset: 0;
}
.mascot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.mascot-enter {
  animation: rise 0.7s var(--pop) 0.35s both;
}
.mascot-bob {
  animation: bob 2.9s ease-in-out 1.1s infinite;
}
.mascot-five {
  transform-origin: 85% 21%;
  animation: pop-five 0.5s var(--pop) 1.2s both;
}
.mascot.hop .mascot-hop {
  animation: hop 0.45s ease-in-out;
}

.episode {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  overflow: hidden;
}
.episode-thumb {
  display: block;
  border-right: var(--line);
}
.episode-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.episode-body {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  padding: clamp(20px, 3vw, 36px);
}
.episode-title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}
.episode-title a {
  text-decoration: none;
}
.episode-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 3px;
}
.episode-body .btn {
  margin-top: 8px;
}

/* ---------- Blog ---------- */

.blog-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
  padding-top: 40px;
  text-align: center;
}
.blog-hero .display {
  animation: pop-in 0.6s var(--pop) 0.05s both;
}
.blog-hero .lede {
  max-width: 34em;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 28px;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 26px 22px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.post-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}
.post-card:focus-within {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.post-card-title {
  font-size: 1.375rem;
}
.post-card-title a {
  text-decoration: none;
}
.post-card-title a:focus-visible {
  outline: none;
}
/* Makes the whole card clickable */
.post-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.post-card-text {
  color: var(--gray-text);
}
.post-card-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: auto;
  padding-top: 6px;
  color: var(--coral-text);
  font-weight: 700;
}

.post-meta {
  color: var(--gray-text);
  font-size: 0.9375rem;
  font-weight: 500;
}

.post {
  max-width: calc(46rem + 2 * var(--gutter));
}
.post-header {
  display: grid;
  gap: 16px;
  padding-top: 40px;
  margin-bottom: 40px;
}
.post-title {
  font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.25rem);
  letter-spacing: -0.01em;
}

.cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 56px;
  padding: 28px;
  background: var(--pale-yellow);
}
.cta-card-title {
  font-size: 1.375rem;
  margin-bottom: 4px;
}

.post-nav {
  margin-top: 40px;
}

/* Blog post text */
.prose {
  font-size: 1.125rem;
  line-height: 1.75;
  overflow-wrap: break-word; /* long numbers and addresses wrap on phones */
}
.prose > * + * {
  margin-top: 1.1em;
}
.prose h2 {
  margin-top: 2em;
  font-size: 1.75rem;
}
.prose h3 {
  margin-top: 1.6em;
  font-size: 1.3rem;
}
.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}
.prose strong {
  font-weight: 700;
}
.prose a {
  font-weight: 500;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.prose a:hover {
  background: var(--pale-yellow);
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose li::marker {
  color: var(--coral);
  font-weight: 700;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 1em 1.3em;
  background: var(--pale-yellow);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
}
.prose blockquote > * + * {
  margin-top: 0.8em;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  font-weight: 700;
  padding: 0.1em 0.35em;
  background: var(--mint);
  border-radius: 6px;
}
.prose pre {
  padding: 1em 1.25em;
  overflow-x: auto;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  line-height: 1.5;
}
.prose pre code {
  padding: 0;
  background: none;
  font-size: 0.9em;
}
.prose img {
  display: block;
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.prose hr {
  margin: 2.5em 0;
  border: 0;
  height: 3px;
  background: var(--track);
}
.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 1rem;
  line-height: 1.5;
}
.prose th,
.prose td {
  padding: 0.7em 1em;
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--ink);
  color: var(--white);
}
.prose tr + tr td {
  border-top: 2px solid var(--track);
}
.prose td code {
  white-space: nowrap;
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 32px 48px;
  padding-top: 48px;
}
.not-found-copy {
  display: grid;
  justify-items: start;
  gap: 20px;
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .hero-grid,
  .not-found {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-grid .mascot,
  .not-found .mascot {
    max-width: 320px;
  }
  .episode {
    grid-template-columns: minmax(0, 1fr);
  }
  .episode-thumb {
    border-right: 0;
    border-bottom: var(--line);
  }
  .sparkle:nth-of-type(n + 3) {
    display: none;
  }
  .cta-row .btn {
    flex: 1 1 auto;
  }
}

/* ---------- Motion ---------- */

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}
@keyframes sweep {
  from {
    transform: scaleX(0);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(30%);
  }
}
@keyframes pop-five {
  from {
    opacity: 0;
    transform: scale(0.05);
  }
}
@keyframes bob {
  50% {
    transform: translateY(-1.2%);
  }
}
@keyframes hop {
  50% {
    transform: translateY(-9%);
  }
}
@keyframes twinkle {
  50% {
    transform: scale(0.78);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
