/* Madee's Farm – marketing site. Mobile-first; larger layouts in the media queries at the end. */

:root {
  --blue: #2f7fe8;
  --blue-dark: #1b5fc4;
  --blue-light: #6fb0ff;
  --red: #e8392b;
  --red-dark: #b4241a;
  --leaf: #5bb53a;
  --leaf-dark: #36861f;
  --cream: #fff6df;
  --cream-deep: #f3dfb2;
  --honey: #d9963f;
  --honey-dark: #9a6122;
  --sun: #ffd23f;
  --sun-deep: #ffb52e;
  --sky: #d8f0ff;
  --ink: #4a2f1a;
  --white: #ffffff;

  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-card: 28px;
  --gutter: 16px;
  --container: 1180px;
  --topbar-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

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

a { color: var(--blue-dark); }

:focus-visible {
  outline: 3px solid var(--sun-deep);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 12px;
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: 820px; }

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--white);
  text-decoration: none;
  background: linear-gradient(180deg, var(--blue-light), var(--blue) 55%, var(--blue-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 4px 0 #134795, 0 8px 16px rgba(19, 71, 149, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.button--small { padding: 8px 18px; font-size: 1rem; }
.button--red {
  background: linear-gradient(180deg, #ff7a5c, var(--red) 55%, var(--red-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 4px 0 #85170f, 0 8px 16px rgba(133, 23, 15, 0.25);
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 210px;
  padding: 10px 14px 10px 12px;
  border-radius: 20px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.05;
  white-space: nowrap;
  background: linear-gradient(180deg, var(--blue-light), var(--blue) 50%, var(--blue-dark));
  border: 3px solid var(--white);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4), 0 5px 0 #134795, 0 12px 22px rgba(19, 71, 149, 0.3);
  transition: transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 180ms ease;
}
.store-button small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.store-button svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store-button--green {
  background: linear-gradient(180deg, #8ad65c, var(--leaf) 50%, var(--leaf-dark));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4), 0 5px 0 #24620f, 0 12px 22px rgba(36, 98, 15, 0.3);
}

.button:active, .store-button:active { transform: translateY(3px); }

@media (hover: hover) {
  .button:hover, .store-button:hover { transform: translateY(-3px) scale(1.04); }
}

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--container);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 0 rgba(47, 127, 232, 0.18), 0 10px 26px rgba(30, 60, 110, 0.18);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--red);
  white-space: nowrap;
}
.topbar__brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }

.topbar__nav { display: none; gap: 6px; }
.topbar__nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
  transition: background-color 160ms ease, color 160ms ease;
}
.topbar__nav a:hover { background: var(--sky); color: var(--blue-dark); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--topbar-height) + 26px) 0 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(110, 185, 255, 0.55) 0%, rgba(150, 210, 255, 0.15) 38%, rgba(255, 255, 255, 0) 60%),
    url("../assets/img/key_art.webp") 62% 100% / cover no-repeat,
    #8fd0ff;
}

.hero__sky { position: absolute; inset: 0; pointer-events: none; }

.cloud { position: absolute; width: 200px; opacity: 0.95; animation: drift 26s ease-in-out infinite alternate; }
.cloud--1 { top: 13%; left: -50px; }
.cloud--2 { top: 4%; right: -80px; width: 240px; animation-duration: 34s; animation-direction: alternate-reverse; }
.cloud--3 { top: 34%; left: 58%; width: 140px; opacity: 0.8; animation-duration: 22s; }

@keyframes drift {
  from { transform: translateX(-24px); }
  to { transform: translateX(36px); }
}

.bird { position: absolute; left: 0; top: 18%; animation: fly 22s linear infinite; }
.bird--2 { top: 10%; animation-duration: 28s; animation-delay: -9s; }
.bird--3 { top: 24%; animation-duration: 25s; animation-delay: -17s; }
.bird--2 .sprite--bird { width: 30px; height: 38px; }

@keyframes fly {
  0% { transform: translate(-80px, 0); }
  25% { transform: translate(25vw, -18px); }
  50% { transform: translate(50vw, 6px); }
  75% { transform: translate(75vw, -14px); }
  100% { transform: translate(calc(100vw + 80px), 0); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__logo { margin: 0; width: min(78vw, 330px); }
.hero__logo img {
  width: 100%;
  filter: drop-shadow(0 8px 14px rgba(60, 40, 10, 0.3));
  animation: logo-pop 900ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes logo-pop {
  from { transform: scale(0.6) rotate(-4deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.hero__tagline {
  margin: 6px auto 18px;
  max-width: 30ch;
  text-wrap: balance;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  padding: 10px 18px 12px;
  border-radius: 20px;
  border: 3px solid var(--white);
  color: var(--white);
  background: linear-gradient(180deg, rgba(79, 152, 240, 0.94), rgba(39, 112, 214, 0.94));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 5px 0 rgba(19, 71, 149, 0.55), 0 12px 24px rgba(19, 71, 149, 0.25);
}

.hero__note {
  margin: 14px 0 0;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.85);
}

.hero__madee {
  position: relative;
  margin-top: auto;
  margin-bottom: 100px;
  width: 104px;
}
.hero__madee img {
  filter: drop-shadow(0 10px 10px rgba(50, 40, 10, 0.3));
  transform-origin: 50% 100%;
  animation: sway 3.2s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg) translateY(-4px); }
}

.heart {
  position: absolute;
  top: 6%;
  right: -2%;
  font-size: 1.6rem;
  color: var(--red);
  text-shadow: 0 2px 0 var(--white);
  animation: float-heart 2.6s ease-in infinite;
}

@keyframes float-heart {
  0% { transform: translateY(10px) scale(0.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-46px) scale(1.15); opacity: 0; }
}

/* Madee chasing her runaway hen along the bottom of the hero. */
.chase {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 30px;
  height: 104px;
  pointer-events: none;
}
.chase__runner {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  gap: 26px;
  animation: chase-run 13s linear -5s infinite;
}

@keyframes chase-run {
  from { transform: translateX(-280px); }
  to { transform: translateX(100vw); }
}

/* Sprite strips: every frame sits side by side in one image. */
.sprite {
  display: block;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(var(--frames) * 100%) 100%;
  animation: sprite-step var(--duration) steps(var(--frames), jump-none) infinite;
}

@keyframes sprite-step {
  from { background-position: 0% 0; }
  to { background-position: 100% 0; }
}

.sprite--madee {
  --frames: 23;
  --duration: 0.85s;
  width: 64px;
  height: 104px;
  background-image: url("../assets/img/madee_run.webp");
  filter: drop-shadow(0 5px 3px rgba(40, 60, 10, 0.3));
}
.sprite--hen {
  --frames: 9;
  --duration: 0.45s;
  width: 58px;
  height: 54px;
  background-image: url("../assets/img/hen_run.webp");
  filter: drop-shadow(0 4px 3px rgba(40, 60, 10, 0.3));
}
.sprite--bird {
  --frames: 6;
  --duration: 0.55s;
  width: 38px;
  height: 48px;
  background-image: url("../assets/img/bird.webp");
}

.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 4;
  width: 100%;
  height: 46px;
}
.wave--cream { fill: var(--cream); }
.wave--blue { fill: var(--blue); }
.wave--sky { fill: var(--sky); }
.wave--sun { fill: var(--sun); }
.wave--grass { fill: var(--leaf); }

.hero.is-paused *,
.hero.is-paused { animation-play-state: paused; }

/* ---------- Sections ---------- */

.section { position: relative; padding: 64px 0 96px; }
.section--cream { background: var(--cream); }
.section--blue {
  color: var(--white);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16) 0 90px, transparent 91px),
    radial-gradient(circle at 88% 75%, rgba(255, 255, 255, 0.12) 0 140px, transparent 141px),
    linear-gradient(180deg, #3b8cf0, var(--blue) 60%, #2a72d6);
}
.section--sky { background: var(--sky); }

.eyebrow {
  margin: 0 0 6px;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--light { color: var(--sun); }

.section__title {
  margin: 0 0 12px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.1;
  color: var(--blue-dark);
}
.section__title--light { color: var(--white); text-shadow: 0 3px 0 rgba(15, 60, 130, 0.45); }

.section__lead {
  margin: 0 auto 40px;
  max-width: 56ch;
  text-align: center;
  font-size: 1.125rem;
}

/* ---------- Features ---------- */

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 26px;
}

.feature {
  position: relative;
  padding: 14px 14px 22px;
  border-radius: var(--radius-card);
  background: var(--white);
  border: 3px solid var(--cream-deep);
  box-shadow: 0 7px 0 var(--cream-deep), 0 16px 30px rgba(120, 80, 20, 0.1);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms ease;
}
.feature p { margin: 0 8px; }

.feature__art {
  position: relative;
  height: 190px;
  margin-bottom: 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.feature__art > img { position: relative; z-index: 1; max-height: 150px; width: auto; }
.feature__art--grow { background: radial-gradient(circle at 50% 110%, #c5ec9e, #eaf8d6 70%); }
.feature__art--raise { background: radial-gradient(circle at 50% 110%, #ffd2d9, #fff0f2 70%); }
.feature__art--craft { background: radial-gradient(circle at 50% 110%, #ffd9a6, #fff3df 70%); }
.feature__art--trade { background: radial-gradient(circle at 50% 110%, #ffc2bb, #fff1ee 70%); }
.feature__art--neighbors { background: radial-gradient(circle at 50% 110%, #b9dcff, #eef7ff 70%); }
.feature__art--sea { background: linear-gradient(180deg, #e7f6ff 0 52%, #8fd3f5 52% 100%); }

.feature__art > .feature__extra {
  position: absolute;
  z-index: 2;
  right: 8%;
  bottom: 10px;
  max-height: 92px;
}
.feature__art > .feature__extra--left { right: auto; left: 8%; }
.feature__art--raise > .feature__extra { max-height: 70px; }
.feature__art--craft > img:first-child { max-height: 160px; transform: translateX(-30%); }
.feature__art--craft > .feature__extra { right: 4%; max-height: 104px; }
.feature__art--neighbors > .feature__extra { right: 14%; max-height: 64px; }
.feature__art--sea > .feature__extra--back { z-index: 0; right: auto; left: 2%; bottom: 0; max-height: 120px; }
.feature__art--sea > .sail { max-height: 132px; transform: translateX(22%); }

.feature__title {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 18px 6px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--white);
  background: linear-gradient(180deg, var(--blue-light), var(--blue) 60%, var(--blue-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 3px 0 #134795;
}
.feature:nth-child(2) .feature__title,
.feature:nth-child(4) .feature__title {
  background: linear-gradient(180deg, #ff7a5c, var(--red) 60%, var(--red-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 3px 0 #85170f;
}
.feature:nth-child(3) .feature__title,
.feature:nth-child(5) .feature__title {
  background: linear-gradient(180deg, #8ad65c, var(--leaf) 60%, var(--leaf-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 3px 0 #24620f;
}

@media (hover: hover) {
  .feature:hover { transform: translateY(-8px) rotate(-0.6deg); box-shadow: 0 13px 0 var(--cream-deep), 0 24px 36px rgba(120, 80, 20, 0.16); }
  .feature:hover .feature__art img { animation: hop 520ms cubic-bezier(0.34, 1.56, 0.64, 1); }
}

@keyframes hop {
  0% { translate: 0 0; scale: 1; }
  30% { translate: 0 6px; scale: 1.08 0.9; }
  60% { translate: 0 -14px; scale: 0.96 1.06; }
  100% { translate: 0 0; scale: 1; }
}

/* Gentle idle bob for game sprites. Uses `translate` so it composes with layout transforms. */
.bob { animation: bob 3.4s ease-in-out infinite; }
.bob--late { animation-delay: -1.1s; }
.bob--later { animation-delay: -2.2s; }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.sail { animation: sail 4s ease-in-out infinite; }
@keyframes sail {
  0%, 100% { translate: 0 0; rotate: -2deg; }
  50% { translate: 0 -6px; rotate: 2deg; }
}

/* ---------- Meet Madee ---------- */

.madee {
  display: grid;
  gap: 30px;
  align-items: center;
}

.madee__card {
  margin: 0;
  padding: 10px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: 0 8px 0 #1b5fc4, 0 22px 40px rgba(10, 40, 100, 0.3);
  transform: rotate(-1.5deg);
}
.madee__card img { border-radius: 20px; }

.madee__text p { margin: 0 0 14px; font-size: 1.125rem; }
.madee__text .eyebrow,
.madee__text .section__title { text-align: center; }

.chips {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--blue-dark);
  background: var(--white);
  box-shadow: 0 3px 0 rgba(15, 60, 130, 0.35);
}

/* ---------- Gallery ---------- */

.gallery {
  list-style: none;
  margin: 24px 0 0;
  padding: 18px var(--gutter) 28px;
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.polaroid {
  flex: none;
  scroll-snap-align: start;
  padding: 10px 10px 0;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 6px 0 rgba(47, 127, 232, 0.25), 0 14px 26px rgba(30, 60, 110, 0.18);
  transform: rotate(-1.5deg);
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.polaroid:nth-child(even) { transform: rotate(1.5deg); }
.polaroid img { height: 220px; width: auto; max-width: none; border-radius: 6px; }
.polaroid span {
  display: block;
  padding: 8px 4px 10px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--honey-dark);
}

@media (hover: hover) {
  .polaroid:hover { transform: rotate(0deg) scale(1.03); }
}

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 14px; margin-top: 28px; }

.faq details {
  border-radius: 20px;
  background: var(--white);
  border: 3px solid var(--cream-deep);
  box-shadow: 0 5px 0 var(--cream-deep);
}

.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 16px 56px 16px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--blue-dark);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 3px 0 #134795;
  transition: transform 220ms ease;
}
.faq details[open] summary::after { content: "\2212"; transform: rotate(180deg); background: var(--red); box-shadow: 0 3px 0 #85170f; }
.faq details p { margin: 0; padding: 0 20px 18px; }

/* ---------- Call to action ---------- */

.cta {
  position: relative;
  padding: 56px 0 90px;
  background:
    linear-gradient(180deg, var(--sun), var(--sun-deep));
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.cta__icon {
  width: 132px;
  border-radius: 30px;
  border: 5px solid var(--white);
  box-shadow: 0 7px 0 var(--honey-dark), 0 18px 30px rgba(120, 70, 10, 0.3);
}

.cta__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  color: var(--red);
}
.cta p { margin: 0 0 20px; font-weight: 700; font-size: 1.125rem; }

/* ---------- Footer ---------- */

.footer {
  padding: 30px 0 calc(32px + env(safe-area-inset-bottom));
  color: var(--white);
  background: linear-gradient(180deg, var(--leaf), var(--leaf-dark));
}
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer__logo { width: 170px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.footer__links a { color: var(--white); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.footer__copy { margin: 0; font-size: 0.9rem; opacity: 0.9; }

/* ---------- Legal pages ---------- */

.legal__main { padding: 32px 0 64px; }
.legal__home { display: block; width: 180px; margin: 0 auto 20px; }
.legal__card {
  padding: 28px 22px;
  border-radius: var(--radius-card);
  background: var(--white);
  border: 3px solid var(--cream-deep);
  box-shadow: 0 7px 0 var(--cream-deep);
}
.legal__card h2 { margin: 26px 0 6px; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--blue-dark); }
.legal__card p { margin: 0 0 12px; }
.legal__card { overflow-wrap: anywhere; }
.legal__card h3 { margin: 18px 0 4px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.legal__card ul { margin: 0 0 12px; padding-left: 1.3em; }
.legal__card li { margin: 0 0 4px; }
.legal__card li ul { margin: 4px 0 0; }

.legal__lang { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 0 16px; font-weight: 800; }
.legal__lang select {
  min-height: 44px;
  padding: 6px 12px;
  border: 3px solid var(--cream-deep);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.page__head { margin: 0 0 18px; text-align: center; }
.page__head .version { margin: 0; font-weight: 700; color: var(--honey-dark); }

.toc { margin: 0 0 8px; padding: 14px 18px; border-radius: 18px; background: var(--cream); }
.toc__title { margin: 0 0 6px !important; font-family: var(--font-display); font-weight: 600; color: var(--blue-dark); }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0 0 2px; }

.table-scroll { margin: 0 0 14px; }
.legal__card table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.legal__card th, .legal__card td { padding: 8px 10px; border: 2px solid var(--cream-deep); text-align: left; vertical-align: top; }
.legal__card th { background: var(--sky); font-family: var(--font-display); font-weight: 600; }

/* On phones each table row becomes a card with its column names, so nothing scrolls sideways. */
@media (max-width: 639px) {
  .legal__card thead { display: none; }
  .legal__card table, .legal__card tbody, .legal__card tr, .legal__card td { display: block; }
  .legal__card tr { margin: 0 0 10px; border: 2px solid var(--cream-deep); border-radius: 14px; overflow: hidden; }
  .legal__card td { border: 0; border-top: 2px solid var(--cream); }
  .legal__card td:first-child { border-top: 0; background: var(--sky); font-weight: 800; }
  .legal__card td::before { content: attr(data-label); display: block; font-size: 0.8rem; font-weight: 800; color: var(--honey-dark); }
}

/* ---------- Scroll reveal (only hidden once JS is running) ---------- */

.js .reveal {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 600ms ease, translate 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-visible { opacity: 1; translate: 0 0; }
.js .features .reveal:nth-child(3n + 2) { transition-delay: 90ms; }
.js .features .reveal:nth-child(3n) { transition-delay: 180ms; }

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .polaroid img { height: 280px; }
  .cta__inner { flex-direction: row; text-align: left; justify-content: center; }
  .store-buttons--left { justify-content: flex-start; }
  .cta__icon { width: 170px; }
  .hero__madee { width: 150px; }
}

@media (min-width: 900px) {
  .topbar__nav { display: flex; }

  .hero { min-height: min(100vh, 940px); }
  .hero__inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: end;
    text-align: left;
  }
  .hero__copy { align-self: center; padding-bottom: 170px; }
  .hero__logo { width: min(100%, 540px); }
  .hero__tagline { display: inline-block; max-width: 24ch; margin-left: 0; font-size: 1.75rem; }
  .hero .store-buttons { justify-content: flex-start; }
  .store-button { flex: none; max-width: none; min-width: 180px; font-size: 1.25rem; padding: 10px 20px 10px 14px; }
  .hero__note { display: inline-block; }
  .hero__madee { width: 250px; margin: 0 auto 120px; }
  .heart { font-size: 2.2rem; }

  .cloud { width: 300px; }
  .cloud--2 { width: 360px; }
  .cloud--3 { width: 200px; left: 46%; top: 30%; }
  .sprite--bird { width: 48px; height: 60px; }
  .bird--2 .sprite--bird { width: 36px; height: 46px; }

  .chase { height: 150px; bottom: 30px; }
  .chase__runner { gap: 40px; animation-duration: 16s; }
  .sprite--madee { width: 92px; height: 150px; }
  .sprite--hen { width: 82px; height: 77px; }

  .wave { height: 70px; }

  .section { padding: 90px 0 130px; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .feature__art { height: 210px; }

  .madee { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
  .madee__text .eyebrow,
  .madee__text .section__title { text-align: left; }

  .gallery { scroll-padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); }
  .polaroid img { height: 330px; }
}

/* ---------- Reduced motion: keep the art, drop the movement ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .bird, .heart { display: none; }
  .chase__runner { transform: translateX(6vw); }
  .js .reveal { opacity: 1; translate: none; }
}

/* Store buttons before the listings are live: shown, not clickable. */
.store-button[aria-disabled="true"] {
  cursor: default;
}
