/* Crumb & Co. — storybook bakery theme (matches the 2.0 game art: cream and amber with
   #431407 ink outlines, chunky HUD-style cards, and the isometric 2:1 diamond grid). */
:root {
  --ink: #431407;
  --ink-soft: #7c4a2d;
  --cream: #fffbeb;
  --cream-2: #fef3c7;
  --peach: #fed7aa;
  --amber: #f59e0b;
  --wood: #d97706;
  --brown: #92400e;
  --ember: #ea580c;
  --pink: #fb7185;
  --mint: #34d399;
  --sky: #60a5fa;
  --shadow: 0 10px 28px rgba(69, 26, 3, 0.16);
  --grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48' viewBox='0 0 96 48'%3E%3Cpath d='M48 0 L96 24 L48 48 L0 24 Z' fill='none' stroke='%23f3dfb8' stroke-width='1.5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--grid) center top / 96px 48px, linear-gradient(180deg, #fff7e6, var(--cream-2)) fixed;
  background-color: #fff7e6;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ember); font-weight: 800; text-underline-offset: 3px; }
a:hover { color: var(--brown); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 251, 235, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 1.2rem; }
.brand:hover { color: var(--ink); }
.brand img { width: 42px; height: 42px; border-radius: 12px; border: 3px solid var(--ink); }
.top nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.top nav a {
  text-decoration: none; color: var(--ink); padding: 6px 14px; border-radius: 14px;
  border: 2px solid transparent; font-size: 0.95rem;
}
.top nav a:hover { background: var(--cream-2); border-color: var(--ink); }
.top nav a[aria-current="page"] { background: var(--amber); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }

/* Cards */
.card {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-bottom-width: 8px;
  border-radius: 26px;
  padding: 30px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; list-style: none; }
.chips li {
  font-weight: 800; font-size: 0.92rem; padding: 4px 12px; border-radius: 12px;
  border: 2px solid currentColor; background: var(--cream);
}
.chips li:nth-child(1) { color: var(--ember); }
.chips li:nth-child(2) { color: var(--wood); }
.chips li:nth-child(3) { color: #0f766e; }

/* Home: hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center;
  padding-top: 48px; padding-bottom: 8px;
}
.hero img.icon { width: 112px; height: 112px; border-radius: 28px; border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); }
.hero h1 { font-size: clamp(2.7rem, 7vw, 4.6rem); font-weight: 900; margin: 18px 0 2px; line-height: 1.02; letter-spacing: -0.01em; }
.hero h1 span { color: var(--ember); }
.hero h1.wordmark { margin: 14px 0 0; line-height: 0; }
.hero h1.wordmark img { width: min(520px, 100%); height: auto; margin-left: -10px; }
.hero .tag { font-size: 1.35rem; font-weight: 900; margin: 10px 0 8px; color: var(--brown); }
.hero .lead { font-size: 1.08rem; font-weight: 600; max-width: 34em; margin: 0 0 24px; color: var(--ink-soft); }
.hero-phone { justify-self: center; position: relative; }
.hero-phone .shot {
  width: min(310px, 100%); height: auto; display: block; border-radius: 32px;
  border: 5px solid var(--ink); box-shadow: 0 10px 0 var(--ink), 0 24px 44px rgba(69, 26, 3, 0.3);
  transform: rotate(2.5deg); background: var(--cream);
}
.hero-phone .treat { position: absolute; width: 92px; height: 92px; animation: bob 4s ease-in-out infinite; }
.hero-phone .t1 { left: -62px; top: 12%; }
.hero-phone .t2 { right: -38px; top: 46%; animation-delay: -1.3s; }
.hero-phone .t3 { left: -40px; bottom: 4%; animation-delay: -2.6s; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-4deg); } }

/* Google Play button */
.play {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  background: var(--ink); color: var(--cream); border: 3px solid var(--ink); border-radius: 18px;
  padding: 10px 22px 10px 16px; box-shadow: 0 6px 0 var(--brown), 0 12px 24px rgba(69, 26, 3, 0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.play:hover { transform: translateY(-2px); color: var(--cream); }
.play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--brown); }
.play svg { width: 34px; height: 34px; flex: none; }
.play span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.play small { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; opacity: 0.9; }
.play b { font-size: 1.4rem; font-weight: 900; }
.play.soon { cursor: default; opacity: 0.92; }
.play.soon:hover { transform: none; }

/* Section headings: ink with diamond-tile ornaments */
.section-title {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 900; text-align: center; margin: 56px 0 20px;
}
.section-title::before, .section-title::after {
  content: ""; width: 34px; height: 17px; flex: none;
  background: var(--amber); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 3px 0 var(--ink));
}

/* Screenshot strip */
.gallery-note { text-align: center; margin: -10px 0 8px; font-weight: 700; color: var(--ink-soft); }
.gallery {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 6px 22px;
}
.gallery::-webkit-scrollbar { height: 10px; }
.gallery::-webkit-scrollbar-track { background: var(--cream-2); border-radius: 999px; border: 2px solid var(--peach); }
.gallery::-webkit-scrollbar-thumb { background: var(--wood); border-radius: 999px; }
.gallery::-webkit-scrollbar-thumb:hover { background: var(--brown); }
@supports not selector(::-webkit-scrollbar) {
  .gallery { scrollbar-width: thin; scrollbar-color: var(--wood) var(--cream-2); }
}
.gallery img {
  flex: none; width: 220px; height: auto; border-radius: 24px; scroll-snap-align: start;
  border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); background: var(--cream);
}

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; list-style: none; margin: 0; }
.features li {
  background: var(--cream); border: 3px solid var(--ink); border-bottom-width: 7px;
  border-radius: 22px; padding: 18px 20px; font-weight: 600; color: var(--ink-soft);
  transition: transform 0.15s ease;
}
.features li:hover { transform: translateY(-3px); }
.features img { width: 72px; height: 72px; object-fit: contain; display: block; margin-bottom: 6px; }
.features b { display: block; font-size: 1.14rem; color: var(--ink); margin-bottom: 4px; font-weight: 900; }

/* 2.0 teaser */
.next {
  background: linear-gradient(180deg, #e0f2fe, var(--cream));
  border-color: var(--ink); padding: 34px; overflow: hidden;
}
.next .badge {
  display: inline-block; font-weight: 900; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--pink); color: var(--cream); border: 2px solid var(--ink); border-radius: 12px; padding: 3px 12px;
  box-shadow: 0 3px 0 var(--ink);
}
.next h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); font-weight: 900; margin: 14px 0 6px; line-height: 1.15; }
.next > p { max-width: 46em; color: var(--ink-soft); font-weight: 600; margin: 0; }
.next .diorama { display: block; width: 100%; height: auto; margin: 18px 0 8px; }
.next-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0; margin: 0; list-style: none; }
.next-list li {
  display: flex; gap: 14px; align-items: flex-start; background: var(--cream); border: 2px solid var(--ink);
  border-radius: 18px; padding: 12px 14px; color: var(--ink-soft); font-weight: 600;
}
.next-list img { width: 64px; height: 64px; flex: none; object-fit: contain; }
.next-list b { display: block; color: var(--ink); font-weight: 900; }
.biomes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.biomes figure { margin: 0; background: var(--cream); border: 2px solid var(--ink); border-radius: 18px; padding: 10px; text-align: center; }
.biomes img { width: 100%; height: auto; display: block; }
.biomes figcaption { font-weight: 900; margin-top: 4px; }
.biomes figcaption small { display: block; font-weight: 600; color: var(--ink-soft); }
.next .fine { font-size: 0.9rem; margin-top: 18px; }

/* Call to action */
.cta { display: flex; align-items: center; gap: 22px; margin-top: 56px; background: var(--amber); }
.cta img { border-radius: 22px; border: 3px solid var(--ink); flex: none; background: var(--cream); }
.cta h2 { margin: 0 0 4px; font-size: 1.7rem; font-weight: 900; }
.cta p { margin: 0; color: var(--ink); font-weight: 700; }
.cta .play { margin-left: auto; flex: none; }

/* Legal pages */
.legal { max-width: 820px; margin-left: auto; margin-right: auto; }
.legal h1 { margin-top: 0; font-size: clamp(1.8rem, 5vw, 2.4rem); font-weight: 900; line-height: 1.15; }
.legal h2 {
  margin-top: 34px; font-size: 1.28rem; font-weight: 900; padding-top: 20px;
  border-top: 2px dashed var(--peach); display: flex; align-items: center; gap: 10px;
}
.legal h2::before {
  content: ""; width: 20px; height: 10px; flex: none; background: var(--amber);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.legal .updated { color: var(--ink-soft); font-weight: 700; margin-top: -8px; }
.legal li { margin: 4px 0; }
.legal code { background: var(--cream-2); border: 1px solid var(--peach); border-radius: 6px; padding: 1px 6px; }
.legal .summary { background: var(--cream-2); border-radius: 14px; padding: 14px 18px; }

/* Bug report form */
.bug-form { display: grid; gap: 8px; margin: 24px 0; }
.bug-form label { font-weight: 900; margin-top: 8px; }
.bug-form label span { color: var(--ink-soft); font-weight: 600; }
.bug-form input, .bug-form textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink); background: #fff;
  border: 3px solid var(--ink); border-bottom-width: 5px; border-radius: 16px;
}
.bug-form input::placeholder, .bug-form textarea::placeholder { color: #b08968; }
.bug-form input:focus, .bug-form textarea:focus { outline: 3px solid var(--amber); outline-offset: 1px; }
.bug-form textarea { resize: vertical; }
.bug-form .bug-trap { position: absolute; left: -9999px; width: 1px; height: 1px; }
.bug-form button {
  justify-self: start; margin-top: 10px; padding: 12px 28px; font: inherit; font-weight: 900; color: var(--ink); cursor: pointer;
  background: var(--amber); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bug-form button:hover { background: #fbbf24; }
.bug-form button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.bug-form button:disabled { opacity: 0.6; cursor: default; transform: none; }
.bug-status { margin: 4px 0 0; font-weight: 800; min-height: 1.6em; }

/* Footer: a bakery-awning scallop over a warm brown band */
footer {
  position: relative; margin-top: 64px; text-align: center; color: var(--cream);
  background: var(--ink); padding: 40px 16px 44px; font-weight: 700;
}
footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 24px;
  background: radial-gradient(circle at 18px 0, var(--amber) 17px, transparent 18px) 0 0 / 36px 24px repeat-x;
  filter: drop-shadow(0 3px 0 var(--ink));
}
footer a { color: var(--cream-2); margin: 0 8px; }
footer a:hover { color: var(--amber); }
footer .studio { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 900; }
footer .studio img { width: 34px; height: 34px; border-radius: 9px; border: 2px solid var(--cream); }
footer div + div { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-phone .treat { animation: none; }
  .features li, .play, .bug-form button { transition: none; }
}

@media (max-width: 880px) {
  .features { grid-template-columns: 1fr 1fr; }
  .cta { flex-direction: column; text-align: center; }
  .cta .play { margin-left: 0; }
  .next-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 28px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .chips { justify-content: center; }
  .hero-phone .shot { width: 230px; transform: none; }
  .hero-phone .treat { width: 64px; height: 64px; }
  .hero-phone .t1 { left: -40px; }
  .hero-phone .t2 { right: -36px; }
  .hero-phone .t3 { left: -28px; }
  .gallery img { width: 180px; }
  .features { grid-template-columns: 1fr; }
  .biomes { grid-template-columns: 1fr; }
  .card, .next { padding: 20px; border-radius: 22px; }
  .top .wrap { min-height: 0; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .top nav { margin-left: 0; width: 100%; gap: 2px; }
  .top nav a { padding: 4px 8px; font-size: 0.86rem; }
}
