/* Dog Is Eating: same look as the app. Crayon drawings come from the app repo
   (tools/make-crayon-ui.py) and stretch via border-image, like capInsets in the app. */

@font-face {
  font-family: 'Schoolbell';
  src: url('fonts/Schoolbell-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  /* Warmer than the app's #F1E3C6: browsers show the same paper cooler than iOS. */
  --bg: #F7E1C1;
  --card: #FFF8EA;
  --ink: #1F120C;
  --muted: #6B5344;
  --line: #2A1810;
  --green: #7FB069;
  --gold: #FFC94A;
  --brick: #C8442A;
  --border: #DCC7A1;
  --wrap: 1040px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg) url('ui/paper.jpg') repeat;
  background-size: 360px 360px;
  color: var(--ink);
  font-family: 'Schoolbell', 'Comic Sans MS', 'Chalkboard SE', cursive;
  font-size: 21px;
  line-height: 1.45;
}

a { color: inherit; }

img, video { display: block; max-width: 100%; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
}
.brand {
  font-size: 30px;
  text-decoration: none;
  transform: rotate(-2deg);
  display: inline-block;
  white-space: nowrap;
}
.nav { display: flex; gap: 18px; font-size: 19px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* Crayon boxes */
.btn, .card, .square {
  border-style: solid;
  border-color: transparent;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 14px;
  border-width: 22px 24px;
  border-image: url('ui/button-green.png') 66 72 fill / 22px 24px stretch;
  font-size: 23px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.btn > span { margin: -12px 0; }
.btn.gold { border-image-source: url('ui/button-gold.png'); }
.btn.brick { border-image-source: url('ui/button-brick.png'); }
.btn.cream { border-image-source: url('ui/button-cream.png'); }
.btn[aria-disabled='true'] { cursor: default; }

.card {
  border-width: 26px;
  border-image: url('ui/card-cream.png') 78 fill / 26px stretch;
  padding: 2px 4px;
}

/* Video with the drawn frame around it */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
}
.stage video, .stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  background: #2A1810;
}
.stage::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 30px solid transparent;
  border-image: url('ui/frame.png') 90 / 30px stretch;
  pointer-events: none;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-block: 44px 30px;
}
.hero .stage { max-width: 330px; }
h1 {
  font-size: 58px;
  line-height: 1.05;
  margin: 0 0 18px;
  font-weight: normal;
  transform: rotate(-1.5deg);
  transform-origin: left;
}
.lead { font-size: 24px; color: var(--muted); margin: 0 0 26px; max-width: 520px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cta .note { font-size: 18px; color: var(--muted); }

/* Sections */
section { padding-block: 34px; }
h2 {
  font-size: 40px;
  font-weight: normal;
  margin: 0 0 22px;
  transform: rotate(-1deg);
  transform-origin: left;
}
h3 { font-size: 27px; font-weight: normal; margin: 14px 0 6px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.steps .stage { max-width: 240px; margin: 0 auto 4px; }
.steps p { font-size: 19px; color: var(--muted); }

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
ul.plain { margin: 0; padding-left: 1.1em; }
ul.plain li { margin: 0 0 6px; }

/* Text pages (terms, privacy, support, imprint) */
.page { padding-block: 36px 20px; }
.page .card { max-width: 820px; margin: 0 auto; }
.page h1 { font-size: 46px; }
.page h2 { font-size: 30px; margin: 30px 0 10px; transform: none; }
.page p, .page li { font-size: 19px; }
.page .stamp { font-size: 17px; color: var(--muted); }
.ph { background: #FFE2A6; padding: 0 4px; border-radius: 4px; }

/* Footer */
.foot {
  padding-block: 34px 44px;
  font-size: 18px;
  color: var(--muted);
  text-align: center;
}
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 10px; }

@media (max-width: 820px) {
  body { font-size: 20px; }
  .hero { grid-template-columns: 1fr; gap: 26px; padding-block-start: 26px; text-align: center; }
  .hero .stage { max-width: 260px; margin: 0 auto; }
  h1 { font-size: 46px; transform-origin: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; }
  .steps { grid-template-columns: 1fr; gap: 34px; text-align: center; }
  .pair { grid-template-columns: 1fr; }
  .nav { display: none; }
  .page h1 { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  h1, h2, .brand { transform: none; }
}

/* Cookie banner (assets/consent.js): both choices equally prominent. */
#consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 0 12px 14px;
}
.consent-card {
  max-width: 760px;
  margin: 0 auto;
  font-size: 18px;
  box-shadow: 0 6px 24px rgba(42, 24, 16, 0.18);
}
.consent-card p { margin: 0 0 12px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: center; }
.consent-actions .btn { flex: 1 1 220px; font-family: inherit; cursor: pointer; background: none; font-size: 21px; }
