/* ==========================================================================
   Dozy — page composition
   Two typographic registers, deliberately zoned:
     - pixel display font  -> headings, the dog, the whimsy
     - clean sans          -> body, and ALL privacy/security copy
   Whimsical type on a security claim reads as evasion, so the privacy
   sections drop the pixel font entirely.
   ========================================================================== */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ------------------------------- nav ------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 2px solid var(--ink);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 62px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-decoration: none;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: .95rem;
}
.nav__links a { text-decoration: none; opacity: .78; }
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.btn--sm { font-size: .95rem; padding: .55em 1.1em; box-shadow: 0 3px 0 0 var(--ink); }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .btn--sm { margin-left: auto; }
}

/* ------------------------------- hero ----------------------------------- */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem); }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero__sub {
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.3rem);
  max-width: 34ch;
  color: var(--text-soft);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

.hero__req {
  margin-top: 1.1rem;
  font-size: .875rem;
  color: var(--text-soft);
  letter-spacing: .01em;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__sub { max-width: none; }
  .pg__stage--hero { height: 250px; }
}

/* ----------------------------- trust bar -------------------------------- */

.trustbar {
  background: var(--ink);
  color: var(--paper);
  padding-block: 1.6rem;
}
.trustbar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  text-align: center;
}
.trustbar__grid div { display: flex; flex-direction: column; gap: .18rem; }
/* Plain register, not the pixel face: in LightPixel a zero reads as an eight
   and a lowercase i reads as a t. A privacy claim you can misread is worse
   than no claim. */
.trustbar__grid b {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--orange);
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.trustbar__grid span { font-size: .85rem; opacity: .82; }

@media (max-width: 720px) {
  .trustbar__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
}

/* ------------------------------- lede ----------------------------------- */

.lede {
  margin-top: 1rem;
  max-width: 58ch;
  color: var(--text-soft);
  font-size: 1.08rem;
}
/* Privacy copy stays in the plain register — no whimsy on a security claim. */
.lede--plain { color: var(--text); }

/* ------------------------------- demo ----------------------------------- */

.demo__box {
  margin-top: 2.5rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--cream-lift);
  box-shadow: 0 8px 0 0 rgba(1, 1, 1, .16);
  overflow: hidden;
}

.demo__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 3px solid var(--ink);
  background: var(--cream-deep);
}

.demo__tab {
  flex: 1 1 auto;
  appearance: none;
  border: 0;
  border-right: 2px solid var(--ink);
  background: transparent;
  padding: .85rem .9rem;
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
  color: var(--text);
  transition: background .12s ease;
  white-space: nowrap;
}
.demo__tab:last-child { border-right: 0; }
.demo__tab:hover { background: rgba(255, 255, 255, .45); }
.demo__tab.is-active { background: var(--orange); font-weight: 600; }
.demo__tab--priv.is-active { background: var(--ink); color: var(--paper); }

.demo__stage {
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2.5rem 1rem 1.25rem;
  background:
    repeating-linear-gradient(
      90deg, transparent 0 22px, rgba(1, 1, 1, .035) 22px 23px
    ),
    var(--cream-lift);
}

.demo__caption {
  border-top: 2px dashed rgba(1, 1, 1, .18);
  padding: 1.1rem 1.4rem;
  text-align: center;
  font-size: 1.02rem;
  min-height: 3.6rem;
}
.demo__caption.is-privacy { background: var(--ink); color: var(--paper); border-top-color: var(--ink); }

@media (max-width: 720px) {
  .demo__tabs { flex-direction: column; }
  .demo__tab { border-right: 0; border-bottom: 2px solid var(--ink); }
  .demo__tab:last-child { border-bottom: 0; }
}

/* ---------------------------- playground -------------------------------- */

.pg__box {
  margin-top: 2.5rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 0 0 rgba(1, 1, 1, .18);
}

.pg__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .35rem .9rem;
  background: rgba(255, 255, 255, .82);
  border-bottom: 2px solid var(--ink);
  font-size: .74rem;
  font-weight: 600;
  color: #17202e;
}
.pg__apple { width: 11px; height: 11px; border-radius: 50%; background: var(--ink); flex: none; }
.pg__dim { opacity: .55; font-weight: 500; }
.pg__spacer { flex: 1; }
.pg__bar b { color: var(--orange-deep); }

/* Decorative window inside the hero desk — set dressing so the stage reads as a
   real desktop rather than an empty blue box. Never intercepts pointer events,
   or it would steal drags meant for the dog. */
.pg__window {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  width: min(70%, 290px);
  border: 2px solid var(--ink);
  border-radius: 9px;
  overflow: hidden;
  background: #fffaf2;
  box-shadow: 0 5px 0 0 rgba(1, 1, 1, .2);
  pointer-events: none;
}
.pg__window-bar {
  display: flex;
  align-items: center;
  gap: .38rem;
  padding: .4rem .6rem;
  background: #f0e3d2;
  border-bottom: 2px solid var(--ink);
}
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); display: block; }
.dot--r { background: #ff6058; }
.dot--y { background: #ffbd2e; }
.dot--g { background: #28ca42; }
.pg__window-title { margin-left: .4rem; font-size: .7rem; font-weight: 600; opacity: .65; }
.pg__code {
  margin: 0;
  padding: .8rem .9rem 1rem;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .72rem;
  line-height: 1.65;
  color: #4a3d2e;
  overflow: hidden;
}
.c-kw { color: #b5451c; }
.c-fn { color: #1f6f4a; }
.c-str { color: #9a6b12; }

.pg__stage--hero { height: 300px; }

.hero__playhint {
  margin-top: .9rem;
  font-size: .86rem;
  color: var(--text-soft);
}

.pg__controls--hero { margin-top: .7rem; }

.pg__stage {
  position: relative;
  height: 340px;
  background: linear-gradient(165deg, #3d5a8a 0%, #4a6f9e 40%, #6d9bbd 75%, #97c2d4 100%);
  overflow: hidden;
  touch-action: none;          /* pointer drag must not scroll the page */
  cursor: grab;
}

/* The pet is positioned from the floor up; translate3d drives it each frame. */
.pg__pet {
  position: absolute;
  left: 0;
  bottom: 0;
  will-change: transform;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  outline-offset: 4px;
}
.pg__pet.is-held { cursor: grabbing; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .35)); }
.pg__pet canvas { display: block; pointer-events: none; }

.pg__ball {
  position: absolute;
  bottom: 8px;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--ink);
  box-shadow: inset -3px -3px 0 0 var(--orange-deep);
}

.pg__hint {
  position: absolute;
  top: .85rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: .95rem;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
  pointer-events: none;
  min-height: 1.2em;
}

.pg__menu {
  position: absolute;
  z-index: 5;
  margin: 0;
  padding: .3rem;
  min-width: 186px;
  list-style: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 9px;
  box-shadow: 0 5px 0 0 rgba(1, 1, 1, .3);
  display: flex;
  flex-direction: column;
}
.pg__menu[hidden] { display: none; }
.pg__menu button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: .9rem;
  text-align: left;
  padding: .48rem .6rem;
  border-radius: 5px;
  cursor: pointer;
  color: var(--ink);
}
.pg__menu button:hover,
.pg__menu button:focus-visible { background: var(--orange); outline: none; }

.pg__controls {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  font-size: .9rem;
  color: var(--text-soft);
}

@media (max-width: 640px) {
  .pg__stage { height: 240px; }
}

/* ------------------------------ escape ---------------------------------- */

.escape { background: var(--ink); color: var(--paper); }
.escape__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.escape h2 { color: var(--orange); }
.escape p { margin-top: 1.2rem; max-width: 46ch; opacity: .9; }
.escape__note { font-size: .95rem; opacity: .7; }
.escape__note em { color: var(--orange); font-style: normal; }

.escape__strip {
  border: 3px solid var(--orange);
  border-radius: var(--radius);
  background: repeating-linear-gradient(90deg, #14100b 0 18px, #191309 18px 36px);
  padding: 2rem 0 1rem;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
}
.escape__strip canvas { animation: bolt 4s cubic-bezier(.5, 0, .75, 0) infinite; }

@keyframes bolt {
  0%, 22%   { transform: translateX(-64%); }
  70%, 100% { transform: translateX(105%); }
}

@media (max-width: 900px) { .escape__grid { grid-template-columns: 1fr; } }

/* ------------------------------- don't ---------------------------------- */

.dont__list {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.5rem;
  max-width: 78ch;
}
.dont__list li {
  border-left: 4px solid var(--orange);
  padding-left: 1.2rem;
}
.dont__list b { display: block; margin-bottom: .3rem; font-size: 1.05rem; }
.dont__list li { color: var(--text-soft); }
.dont__list b { color: var(--text); }

/* ------------------------------ tricks ---------------------------------- */

/* Columns sized so a 174px-wide sprite box renders at native 1:1. Pixel art
   downscaled by a fractional factor goes soft and uneven, so fit the grid to
   the art rather than resampling the art to the grid. */
.tricks__grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}

.trick {
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--cream-lift);
  padding: .8rem .4rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-height: 150px;
  transition: transform .1s ease, box-shadow .1s ease;
}
.trick:hover { transform: translateY(-3px); box-shadow: 0 4px 0 0 var(--ink); }
.trick figcaption {
  font-family: var(--font-body);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: lowercase;
  opacity: .62;
}

/* ----------------------------- timeline --------------------------------- */

.timeline { background: var(--cream-deep); border-block: 3px solid var(--ink); }
.timeline__inner { max-width: 62ch; }
.timeline p { margin-top: 1.1rem; color: var(--text-soft); }

/* -------------------------------- faq ----------------------------------- */

.faq details {
  border-bottom: 2px solid var(--rule);
  padding: 1.15rem 0;
  max-width: 78ch;
}
.faq details:first-of-type { border-top: 2px solid var(--rule); margin-top: 2.2rem; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.06rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); color: var(--orange); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: .8rem; color: var(--text-soft); max-width: 68ch; }

/* -------------------------------- get ----------------------------------- */

.get { text-align: center; }
.get__inner { display: flex; flex-direction: column; align-items: center; }
.get__pet { margin-bottom: 1rem; }
.get__sub { margin-top: 1rem; color: var(--text-soft); max-width: 44ch; }

.signup {
  margin-top: 2rem;
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  justify-content: center;
  width: min(100%, 560px);
}
.signup input {
  flex: 1 1 260px;
  font: inherit;
  padding: .85em 1em;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
}
.signup input::placeholder { color: #9c8a72; }

.signup__status { margin-top: 1rem; min-height: 1.5rem; font-size: .95rem; }
.signup__status.is-ok { color: #1f6f4a; font-weight: 600; }
.signup__status.is-err { color: #b5451c; font-weight: 600; }

.get__fine { margin-top: 1.4rem; font-size: .84rem; color: var(--text-soft); }

/* ------------------------------- footer --------------------------------- */

.foot {
  border-top: 3px solid var(--ink);
  padding-block: 2.5rem;
  background: var(--cream-deep);
}
.foot__inner { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.foot__pet { margin-bottom: .5rem; }
.foot p { font-size: .92rem; }
.foot a { text-underline-offset: 3px; }
.foot__c { opacity: .55; font-size: .82rem; }
