/* ==========================================================================
   Coolbot — cobalt ink on warm off-white, vintage comic style
   ========================================================================== */

@font-face {
  font-family: "Komika Text";
  src: url("../assets/fonts/KomikaText.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Komika Text";
  src: url("../assets/fonts/KomikaText-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Komika Text";
  src: url("../assets/fonts/KomikaText-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
/* Aktiv Grotesk: desktop OTFs — check webfont licensing before going live.
   If unsure, delete these two blocks; the site falls back to system sans. */
@font-face {
  font-family: "Aktiv Grotesk";
  src: url("../assets/fonts/AktivGrotesk-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Aktiv Grotesk";
  src: url("../assets/fonts/AktivGrotesk-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  /* motion — fast start, long soft settle (borrowed feel) */
  --ease-out: cubic-bezier(0.075, 0.82, 0.165, 1);
  --ease-inout: cubic-bezier(0.785, 0.135, 0.15, 0.86);
  --ink: #1044c7;          /* cobalt primary */
  --ink-deep: #18398c;     /* body text / borders */
  --paper: #f0f5fc;        /* page background */
  --paper-warm: #f5f8fc;   /* hero sky */
  --card: #ffffff;
  --bubble: #e4eaf7;
  --line-soft: #c6d0e8;    /* pale dividers / soft borders */
  --font-comic: "Komika Text", "Comic Sans MS", cursive;
  --font-body: "Aktiv Grotesk", -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink-deep);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }

.wrap { max-width: 1276px; margin: 0 auto; padding: 0 24px; }

/* ---------- comic type helpers ---------- */
.comic { font-family: var(--font-comic); font-weight: 700; text-transform: uppercase; }

/* big display headline: cobalt letters, white outline, soft blue shadow */
.display {
  position: relative;
  font-family: var(--font-comic);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: 0.5px;
  line-height: 1.05;
  filter: drop-shadow(2px 3px 0 rgba(16, 68, 199, 0.25));
}
.display::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-text-stroke: 8px #fff;
  text-stroke: 8px #fff;
}

/* ---------- buttons ---------- */

/* comic 3D button: hatched depth plate behind a cobalt top plate */
.btn-3d {
  position: relative;
  display: inline-block;
  border: none;
  padding: 0;
  background: none;
  filter: none;
}
.btn-3d .depth {
  position: absolute;
  left: -7px;
  top: 8px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--ink-deep);
  border-radius: 10px;
  background: repeating-linear-gradient(
    -45deg,
    #fff 0 4px,
    rgba(16, 68, 199, 0.55) 4px 6px
  );
}
.btn-3d .plate {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: var(--ink);
  border: 2px solid var(--ink-deep);
  border-radius: 10px;
  padding: 15px 24px;
  color: #fff;
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.6px;
  transition: transform 0.1s ease;
}
.btn-3d:hover .plate { transform: translate(-2px, 2px); }
.btn-3d.small .plate { font-size: 15px; padding: 12px 20px; }
.btn-3d .star { font-size: 19px; line-height: 1; }

/* outline pill button */
.btn-outline {
  display: inline-block;
  background: var(--card);
  border: 2px solid var(--ink-deep);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.42px;
  line-height: 1.31;
  transition: background 0.12s ease, color 0.12s ease;
}
.btn-outline:hover { background: var(--ink); color: #fff; }

/* solid cobalt button */
.btn-solid {
  display: inline-block;
  background: var(--ink);
  border: 2px solid var(--ink-deep);
  border-radius: 8px;
  padding: 7px 14px;
  color: #fff;
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.42px;
  transition: transform 0.1s ease;
}
.btn-solid:hover { transform: translate(-1px, 1px); }

/* ---------- sketchy card frame ---------- */
.sketch-box {
  position: relative;
  background: var(--card);
  border-radius: 14px;
}
.sketch-box::after {
  content: "";
  position: absolute;
  inset: -4px -6px -8px -4px;
  background: url("../assets/img/card-border.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { padding: 18px 0 8px; }
/* homepage: header floats transparently over the hero scene */
.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}
.home .hero {
  padding-top: 165px;
  /* keep the full-bleed scene (119vw wide, ~41vw tall) fully visible at any width */
  min-height: 44vw;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo img { width: 213px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 44px; flex-wrap: wrap; }
.main-nav a {
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.45px;
  color: var(--ink);
  white-space: nowrap;
}
.main-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  display: block;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding: 28px 0 80px; overflow: hidden; }
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 470px) minmax(330px, 385px);
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}
/* single full-bleed scene image, right-aligned and bottom-anchored like the design */
.hero-scene {
  position: absolute;
  top: 0;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: -1;
  pointer-events: none;
}
.hero-scene img {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 119%;
  min-width: 1100px;
  max-width: none;
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 80px);
  mask-image: linear-gradient(to bottom, transparent, #000 80px);
}
.hero-copy { padding-top: 40px; }
.hero-copy .display { font-size: clamp(34px, 3.4vw, 47px); max-width: 460px; }
.hero-sub {
  margin: 26px 0 0;
  font-family: var(--font-comic);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: 0.4px;
  max-width: 420px;
}
.hero-cta { position: relative; margin-top: 40px; display: inline-block; }
.hero-cta .bolt {
  position: absolute;
  right: -26px;
  top: -24px;
  width: 40px;
  height: 66px;
  pointer-events: none;
}

/* chat preview panel */
.chat-panel { padding: 24px 26px 30px; }
/* sits on the card's top edge, matching the subscribe page's plan flags */
.ai-badge {
  position: absolute;
  top: -15px;
  right: 18px;
  transform: rotate(-2deg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.6px;
  border-radius: 8px;
  padding: 6px 14px;
  box-shadow: 2px 3px 0 rgba(16, 68, 199, 0.25);
  white-space: nowrap;
  z-index: 2;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.ai-badge svg {
  width: 13px;
  height: 13px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.ai-badge svg .dot { fill: currentColor; stroke: none; }
a.ai-badge:hover {
  transform: rotate(-2deg) translateY(-2px);
  box-shadow: 3px 5px 0 rgba(16, 68, 199, 0.32);
}
.chat-panel h2 {
  font-size: 22px;
  letter-spacing: 0.7px;
  color: var(--ink);
  text-align: center;
  margin: 4px 0 12px;
}
.chat-panel .chat-intro {
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  color: var(--ink-deep);
  margin-bottom: 16px;
}
.chat-bubble {
  background: var(--bubble);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-deep);
  display: inline-block;
  margin-bottom: 14px;
}
.chat-suggestions { display: grid; gap: 8px; }
.chat-suggestions a {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-deep);
  transition: background 0.12s ease;
}
.chat-suggestions a:hover { background: var(--bubble); }
.chat-panel .chat-cta {
  display: block;
  margin: 18px auto 0;
  width: fit-content;
  background: var(--ink);
  color: #fff;
  border: 2px solid var(--ink-deep);
  border-radius: 10px;
  padding: 8px 24px;
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.5px;
}
.chat-panel .chat-cta:hover { transform: translate(-1px, 1px); }

@media (max-width: 1150px) {
  .hero-scene img { right: -9%; }
}

/* ==========================================================================
   Feature strip
   ========================================================================== */
.feature-strip { position: relative; z-index: 1; padding: 26px 0 0; }
.feature-strip .strip {
  border: 2px solid var(--line-soft);
  border-radius: 16px;
  background: #eff2fb;
  display: flex;
  align-items: stretch;
  padding: 20px 10px;
}
.feature {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: start;
  padding: 0 16px;
}
.feature + .feature { border-left: 2px solid var(--line-soft); }
.feature img { width: 64px; height: auto; grid-row: span 2; }
.feature h3 {
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: 0.45px;
  padding-top: 2px;
  white-space: nowrap;
}
.feature p { font-size: 13.5px; }

/* ==========================================================================
   Content cards
   ========================================================================== */
.cards { padding: 64px 0 10px; }
.cards .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 46px 32px;
}
.card {
  min-height: 257px;
  padding: 28px;
  display: flex;
  gap: 12px;
}
.card-text {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card-text h3 {
  font-size: 23px;
  line-height: 1.07;
  letter-spacing: 0.7px;
  color: var(--ink);
  margin-bottom: 12px;
}
.card-text p { font-size: 14px; letter-spacing: -0.14px; margin-bottom: 16px; }
.card-text .btn-outline, .card-text .btn-solid { margin-top: auto; }
.card-art {
  flex: 1 1 45%;
  align-self: center;
  display: flex;
  justify-content: center;
}
.card-art img { max-height: 200px; width: auto; max-width: 100%; }
.card .flag {
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 6px;
  z-index: 1;
}

/* ==========================================================================
   Testimonial
   ========================================================================== */
.testimonial { padding: 48px 0 0; }
.testimonial .box {
  background: #f0f4fc;
  display: grid;
  grid-template-columns: 305px 1fr auto 300px;
  gap: 34px;
  padding: 22px 30px 22px 20px;
  align-items: center;
}
.testimonial .photo { width: 100%; border-radius: 8px; }
.testimonial blockquote {
  font-size: 17px;
  font-weight: 700;
  font-style: italic;
  color: var(--ink-deep);
  max-width: 440px;
}
.testimonial .qmark {
  float: left;
  width: 56px;
  margin: 2px 16px 6px 0;
}
.testimonial blockquote footer {
  margin-top: 18px;
  font-style: normal;
  font-weight: 700;
}
.testimonial .divider { width: 2px; height: 150px; background: var(--line-soft); }
.testimonial .team p { font-size: 14px; margin-bottom: 20px; }

/* ==========================================================================
   Kids' gallery
   ========================================================================== */
.gallery { padding: 56px 0 0; }
.gallery .sketch-box {
  padding: 34px 38px;
  display: grid;
  grid-template-columns: 215px 1fr;
  gap: 30px;
  align-items: center;
}
.gallery h2 {
  font-style: italic;
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 1px;
  position: relative;
}
.gallery h2::before { content: "≈ "; font-size: 20px; vertical-align: middle; }
.gallery .gallery-side p { font-size: 14px; margin: 14px 0 20px; }
.gallery .drawings {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: center;
}
.gallery .drawings img {
  width: 100%;
  filter: drop-shadow(0 2px 4px rgba(24, 57, 140, 0.15));
}
.gallery .dots { display: none; }

/* ==========================================================================
   How Coolbot helps
   ========================================================================== */
.how { padding: 72px 0 60px; }
.how-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 44px;
}
.how-title img { width: 44px; height: auto; }
.how-title .display { font-size: 38px; }
.steps { display: flex; max-width: 1000px; margin: 0 auto; }
.step { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 0 30px; }
.step + .step { border-left: 2px solid var(--line-soft); }
.step .num {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-comic);
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { font-size: 22px; color: var(--ink); letter-spacing: 0.6px; padding-top: 4px; }
.step p { font-size: 14px; margin-top: 6px; }
.how .mobile-subscribe { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 40px 0 34px;
  margin-top: 30px;
}
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-cols {
  display: grid;
  grid-template-columns: 290px repeat(5, auto) 1fr;
  gap: 28px;
  align-items: start;
}
.footer-brand img { width: 213px; }
.footer-brand .tagline {
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  line-height: 1.5;
  margin-top: 14px;
  text-align: center;
  max-width: 213px;
}
.footer-col h4 {
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  white-space: nowrap;
}
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; opacity: 0.92; }
.footer-col .ai-note { font-size: 12px; line-height: 1.6; opacity: 0.85; max-width: 270px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  margin-top: 30px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  font-size: 12.5px;
  opacity: 0.95;
}

/* ==========================================================================
   Chat page
   ========================================================================== */
.chat-page { max-width: 760px; margin: 20px auto 60px; padding: 0 24px; }
.chat-window { padding: 26px 26px 22px; }
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: min(52vh, 460px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px;
  margin-bottom: 18px;
  scrollbar-width: thin;
}
.msg { max-width: 82%; padding: 10px 14px; font-size: 15px; font-weight: 500; line-height: 1.45; }
.msg.bot {
  align-self: flex-start;
  background: var(--bubble);
  border-radius: 14px 14px 14px 4px;
  color: var(--ink-deep);
}
.msg.user {
  align-self: flex-end;
  background: var(--ink);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.msg.bot.thinking { opacity: 0.7; font-style: italic; }
.chat-form { display: flex; gap: 10px; }
.chat-form input {
  flex: 1;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink-deep);
  background: #fff;
}
.chat-form input:focus { outline: 3px solid rgba(16, 68, 199, 0.25); }
.chat-page .chat-suggestions { margin-top: 14px; }
.chat-disclaimer {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  opacity: 0.75;
  text-align: center;
}
.chat-page-title { text-align: center; margin: 26px 0 20px; }
.chat-page-title .display { font-size: 34px; }
.chat-page-title p {
  margin-top: 10px;
  font-weight: 700;
  color: var(--ink-deep);
}

/* ==========================================================================
   Mobile — 390px design
   ========================================================================== */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }

  /* header */
  .site-header { padding: 10px 0 4px; }
  .logo img { width: 150px; }
  .main-nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 2px solid var(--ink);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    z-index: 30;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition:
      opacity 0.35s var(--ease-out),
      transform 0.35s var(--ease-out),
      visibility 0s linear 0.35s;
  }
  .main-nav.open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition:
      opacity 0.35s var(--ease-out),
      transform 0.35s var(--ease-out);
  }
  .main-nav > a {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  }
  .main-nav.open > a { opacity: 1; transform: none; }
  .main-nav.open > a:nth-child(1) { transition-delay: 0.05s; }
  .main-nav.open > a:nth-child(2) { transition-delay: 0.09s; }
  .main-nav.open > a:nth-child(3) { transition-delay: 0.13s; }
  .main-nav.open > a:nth-child(4) { transition-delay: 0.17s; }
  .main-nav.open > a:nth-child(5) { transition-delay: 0.21s; }
  .main-nav.open > a:nth-child(6) { transition-delay: 0.25s; }
  .hamburger span { transition: transform 0.35s var(--ease-out), opacity 0.25s var(--ease-out); }
  .hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .main-nav a { display: block; width: 100%; padding: 12px 24px; }
  .main-nav .btn-3d { margin: 12px 24px; }
  .main-nav .btn-3d .depth { display: none; }
  .site-header { position: relative; }
  .hamburger { display: flex; }

  /* hero */
  .home .site-header { position: static; }
  .home .hero { padding-top: 16px; min-height: 0; }
  .hero { padding: 16px 0 0; }
  .hero .wrap { display: block; }
  .hero-copy { padding-top: 8px; }
  .hero-copy .display { font-size: 36px; }
  .hero-sub { font-size: 17px; margin-top: 20px; }
  .hero-cta { margin: 30px 0 0; }
  .hero-scene {
    position: relative;
    top: auto;
    bottom: auto;
    left: 50%;
    height: 262px;
    margin-top: -10px;
  }
  .hero-scene img {
    right: -82%;
    width: 235%;
    min-width: 0;
  }
  .chat-panel { margin: 10px 4px 0; }

  /* feature strip -> 2x2 outlined cards */
  .feature-strip .strip {
    background: none;
    border: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0;
  }
  .feature {
    grid-template-columns: 1fr;
    border: 2px solid var(--line-soft);
    border-radius: 12px;
    background: #eff2fb;
    padding: 14px;
    gap: 8px;
  }
  .feature + .feature { border-left: 2px solid var(--line-soft); }
  .feature img { width: 60px; grid-row: auto; }

  /* cards */
  .cards { padding: 40px 0 0; }
  .cards .grid { grid-template-columns: 1fr; gap: 26px; }
  .card { min-height: 0; padding: 20px; }
  .card-art img { max-height: 150px; }
  .card-text h3 { font-size: 22px; }

  /* testimonial */
  .testimonial .box { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .testimonial .photo { width: 100%; max-width: 340px; margin: 0 auto; }
  .testimonial .divider { width: 100%; height: 2px; }
  .testimonial blockquote { max-width: none; }

  /* gallery: carousel */
  .gallery .sketch-box { grid-template-columns: 1fr; padding: 24px 18px; }
  .gallery h2 { font-size: 34px; }
  .gallery .drawings {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
  }
  .gallery .drawings::-webkit-scrollbar { display: none; }
  .gallery .drawings img {
    flex: 0 0 82%;
    scroll-snap-align: center;
  }
  .gallery .dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
  }
  .gallery .dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-soft);
  }
  .gallery .dots span.active { background: var(--ink); }

  /* how */
  .how { padding: 48px 0 40px; }
  .how-title { gap: 10px; margin-bottom: 26px; }
  .how-title img { width: 30px; }
  .how-title .display { font-size: 27px; }
  .steps { flex-direction: column; }
  .step { padding: 20px 4px; }
  .step + .step { border-left: none; border-top: 2px solid var(--line-soft); }
  .how .mobile-subscribe { display: flex; justify-content: center; margin-top: 26px; }

  /* footer */
  .footer-cols { grid-template-columns: 1fr; gap: 6px; }
  .footer-brand { text-align: center; margin-bottom: 20px; }
  .footer-brand img { margin: 0 auto; }
  .footer-brand .tagline { margin: 14px auto 0; }
  .footer-col { border-bottom: 0; }
  .footer-col h4 { margin: 14px 0 0; }
  .footer-col ul { display: none; } /* compact mobile footer like the design */
  .footer-col.chat-col ul { display: block; margin-top: 12px; }
  .footer-bottom { justify-content: space-between; gap: 8px 16px; }
}

/* ==========================================================================
   Motion — page transitions, staggered reveals, micro-interactions
   ========================================================================== */

/* cross-page transitions (progressive enhancement) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.25s var(--ease-inout) both; }
::view-transition-new(root) { animation: vt-in 0.45s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* page-enter choreography */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
}
@keyframes fade-in {
  from { opacity: 0; }
}
.hero-copy .display { animation: rise-in 0.8s var(--ease-out) 0.05s both; }
.hero-sub          { animation: rise-in 0.8s var(--ease-out) 0.16s both; }
.hero-cta          { animation: rise-in 0.8s var(--ease-out) 0.27s both; }
.hero-scene        { animation: fade-in 1s var(--ease-out) 0.25s both; }
.hero .chat-panel  { animation: rise-in 0.8s var(--ease-out) 0.38s both; }

/* scroll reveals (elements tagged by js/main.js) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease-out) var(--reveal-delay, 0s),
    transform 0.7s var(--ease-out) var(--reveal-delay, 0s);
}
.reveal.in-view { opacity: 1; transform: none; }

/* tactile buttons */
.btn-3d .plate { transition: transform 0.3s var(--ease-out); }
.btn-3d:hover .plate { transform: translate(-2px, 2px); }
.btn-3d:active .plate { transform: translate(-5px, 5px); }
.btn-outline,
.btn-solid {
  transition:
    background 0.3s var(--ease-out),
    color 0.3s var(--ease-out),
    transform 0.3s var(--ease-out);
}
.btn-outline:hover { transform: translateY(-1px); }
.btn-outline:active, .btn-solid:active { transform: scale(0.96); }
.btn-solid:hover { transform: translateY(-1px); }

/* cards lift softly (reveal classes are removed by js after entry) */
.card:not(.reveal) { transition: transform 0.5s var(--ease-out); }
.card:not(.reveal):hover { transform: translateY(-6px); }

/* nav links: sliding underline instead of default underline */
.main-nav a { position: relative; }
.main-nav a:hover { text-decoration: none; }
.main-nav a:not(.btn-3d)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}
.main-nav a:not(.btn-3d):hover::after { transform: scaleX(1); }

/* chat preview pills glide */
.chat-suggestions a {
  transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.chat-suggestions a:hover { transform: translateX(4px); }
.chat-panel .chat-cta { transition: transform 0.3s var(--ease-out); }
.chat-panel .chat-cta:active { transform: scale(0.96); }

/* gallery dots */
.gallery .dots span { transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-out); }
.gallery .dots span.active { transform: scale(1.3); }

/* chat page choreography */
.chat-page-title   { animation: rise-in 0.7s var(--ease-out) both; }
.chat-window       { animation: rise-in 0.7s var(--ease-out) 0.12s both; }
.chat-disclaimer   { animation: fade-in 0.8s var(--ease-out) 0.35s both; }
.chat-page .chat-suggestions a { animation: rise-in 0.6s var(--ease-out) both; }
.chat-page .chat-suggestions a:nth-child(1) { animation-delay: 0.25s; }
.chat-page .chat-suggestions a:nth-child(2) { animation-delay: 0.32s; }
.chat-page .chat-suggestions a:nth-child(3) { animation-delay: 0.39s; }
.chat-page .chat-suggestions a:nth-child(4) { animation-delay: 0.46s; }

.msg { animation: msg-in 0.45s var(--ease-out) both; transform-origin: bottom left; }
.msg.user { transform-origin: bottom right; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
}
.chat-log { scroll-behavior: smooth; }
.chat-form input {
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.chat-form input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(16, 68, 199, 0.18);
}

/* typing indicator */
.typing { display: inline-flex; gap: 5px; padding: 5px 2px; }
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-deep);
  animation: typing-bounce 1.1s var(--ease-inout) infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* keyboard focus */
:focus-visible {
  outline: 3px solid rgba(16, 68, 199, 0.35);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ==========================================================================
   Subpages
   ========================================================================== */
.page-hero { text-align: center; padding: 34px 0 8px; }
.page-hero .display { font-size: clamp(30px, 4vw, 44px); }
.page-hero > p { margin: 16px auto 0; max-width: 580px; font-weight: 700; }
.page { padding: 26px 0 40px; }

.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 32px; margin-top: 38px; }
.story-card { padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 12px; }
.story-card .cover { width: 100%; border-radius: 8px; border: 2px solid var(--line-soft); }
.story-card h3 { font-size: 20px; color: var(--ink); letter-spacing: 0.6px; line-height: 1.15; }
.story-card p { font-size: 13.5px; flex: 1; }
.story-card .tag {
  align-self: flex-start;
  background: var(--bubble);
  color: var(--ink-deep);
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
}
.themes { margin-top: 58px; text-align: center; }
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.chip {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.5px;
  background: #fff;
}
.cta-band { margin-top: 64px; text-align: center; padding: 40px 24px 46px; }
.cta-band .display { font-size: clamp(24px, 3vw, 32px); }
.cta-band p { margin: 14px auto 0; max-width: 480px; font-weight: 700; }
.cta-band .btn-3d { margin-top: 30px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 38px; align-items: start; }
.info-grid.two { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin-left: auto; margin-right: auto; }
.info-card { padding: 26px; }
.info-card h3 { font-size: 20px; color: var(--ink); letter-spacing: 0.6px; margin-bottom: 14px; }
.info-card p { font-size: 14px; margin-bottom: 12px; }
.info-card ul { margin-left: 18px; }
.info-card li { font-size: 14px; list-style: disc; margin-bottom: 9px; }

.prose { max-width: 740px; margin: 0 auto; }
.prose h2 {
  font-family: var(--font-comic);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: 0.6px;
  margin: 32px 0 12px;
}
.prose p, .prose li { font-size: 15px; line-height: 1.55; margin-bottom: 12px; }
.prose ul { margin-left: 22px; }
.prose li { list-style: disc; }

.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 34px; }
.gallery-grid img { width: 100%; }

@media (max-width: 860px) {
  .story-grid, .info-grid, .info-grid.two { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
