:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --soft: #f5f5f7;
  --blue: #0066d6;
  --blue-dark: #004fa8;
  --amber: #b4570f;
  --red: #c4271b;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Helvetica Neue", Arial,
    sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
h1 { margin: 0 0 8px; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; }
h2 { font-size: 24px; letter-spacing: -0.02em; margin: 32px 0 16px; }
.hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; margin: 0 auto; padding: 48px 16px; }
.muted, small { color: var(--muted); }
small { display: block; font-size: 14px; }
.lead { font-size: 21px; color: var(--muted); margin: 0 0 16px; }
.eyebrow { color: var(--amber); font-weight: 600; margin: 0 0 8px; }
.alert { background: #fdecea; color: var(--red); border-radius: 12px; padding: 12px 16px; }
main.wrap { padding-top: 32px; padding-bottom: 48px; }

/* Header: the links fold behind a menu button on a phone, with no script. */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 251, 253, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.bar {
  max-width: 1080px; margin: 0 auto; padding: 0 16px; min-height: 48px;
  display: flex; align-items: center; gap: 8px 24px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 17px; }
.brand svg { fill: var(--ink); }
.links { display: flex; flex: 1; align-items: center; justify-content: center; gap: 4px 24px; font-size: 13px; }
.links a { color: #424245; }
.search input { width: 140px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 980px; font-size: 13px; }
.bag { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.bag svg, .menu-button svg { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.count {
  position: absolute; top: 6px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 600;
  line-height: 16px; text-align: center;
}
.menu-toggle, .menu-button { display: none; }
.inline { display: inline; }
.link { border: 0; background: none; padding: 0; color: var(--blue); cursor: pointer; font-size: inherit; }

@media (max-width: 760px) {
  .bar { flex-wrap: wrap; justify-content: space-between; }
  .menu-button { display: flex; order: 2; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
  .bag { order: 3; }
  .links { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: flex-start; padding: 8px 0 16px; font-size: 17px; }
  .menu-toggle:checked ~ .links { display: flex; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 22px; border-radius: 980px; border: 1px solid var(--blue); background: var(--blue);
  color: #fff; font-size: 17px; cursor: pointer;
}
.button:hover { background: var(--blue-dark); color: #fff; text-decoration: none; }
.button.secondary { background: #fff; color: var(--blue); }
.button.small { min-height: 36px; font-size: 14px; padding: 0 16px; }
.button.wide { width: 100%; border-radius: 12px; min-height: 52px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.actions.end { justify-content: flex-end; }

/* Home */
.hero { text-align: center; padding: 56px 16px 24px; }
.hero .lead { max-width: 560px; margin: 0 auto 24px; }
.hero-art { display: flex; justify-content: center; align-items: flex-end; gap: 24px; margin-top: 40px; }
.headline { font-size: clamp(28px, 3.5vw, 40px); margin-top: 56px; }
.headline span { color: var(--muted); }
.worlds { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px; text-align: center; }
.worlds a { color: var(--ink); }
.disc { border-radius: 50%; display: block; margin: 0 auto 10px; }
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; padding-bottom: 48px; }
.why h3 { margin: 0 0 8px; }
.why p { margin: 0; color: var(--muted); }

/* Category */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 24px 0 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { min-height: 36px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 980px; color: var(--ink); font-size: 14px; }
.chips a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.sort select, .sort input { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 40px 24px; }
.grid a { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.grid a:hover { text-decoration: none; }
.grid strong { font-size: 21px; margin-top: 10px; }
.art { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: var(--radius); background: var(--soft); }
.art.small { width: 120px; flex: none; }
/* A photo of heavy-pages: no frame of its own, it takes room only once loaded */
.photo { display: block; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.photo img { display: block; width: 100%; height: auto; }
.photo.small { width: 120px; flex: none; }
.promo { margin: 0; padding: 72px 16px; text-align: center; background: var(--blue); color: #fff; font-size: 22px; font-weight: 600; }
/* The tints of the categories, behind their illustrations */
.tint-DOGS { background: #f5ede1; }
.tint-CATS { background: #eceaf4; }
.tint-FISH { background: #e4f0f5; }
.tint-BIRDS { background: #e7f2e9; }
.tint-REPTILES { background: #eff1e2; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; color: var(--muted); }
.pages { display: flex; gap: 8px; align-items: center; }
.pages a { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); }
.pages a[aria-current] { background: var(--ink); color: #fff; }
.pages a[rel] { width: auto; border-radius: 0; color: var(--blue); }
.empty { color: var(--muted); }

/* Product */
.product { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; margin-top: 24px; }
.variants, .deliveries { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.deliveries legend { font-weight: 600; margin-bottom: 12px; }
.variant { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.variant:has(input:checked) { border: 2px solid var(--blue); padding: 17px 19px; }
.variant.sold-out { opacity: 0.5; cursor: not-allowed; }
.variant input { margin-top: 4px; }
.what { flex: 1; }
.what .id { font-size: 12px; }
.quantity { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; font-weight: 600; }
.quantity input { width: 80px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 980px; text-align: center; }
.facts { background: var(--soft); padding: 8px 0 56px; }
.facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0; }
.facts dl div { background: #fff; border-radius: var(--radius); padding: 24px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 8px 0 0; font-size: 21px; font-weight: 600; }

/* Bag, checkout, orders */
.summit { text-align: center; margin-bottom: 32px; }
.summit h1 { font-size: clamp(30px, 4vw, 44px); }
.check { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: #1f8a3c; color: #fff; font-size: 36px; line-height: 64px; }
.lines { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.lines li { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.lines strong { font-size: 21px; color: var(--ink); }
.qty { display: flex; align-items: center; gap: 8px; }
.qty select { min-height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.total { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 120px; }
.totals { margin: 24px 0 24px auto; max-width: 440px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals dd { margin: 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; font-size: 24px; font-weight: 700; }
.panel { display: flex; flex-direction: column; gap: 8px; max-width: 600px; }
.panel input:not([type=hidden]) { min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.panel label { color: var(--muted); font-size: 14px; }
.hint { background: var(--soft); border-radius: 14px; padding: 16px 20px; }
.checkout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 48px; }
.box { border: 1px solid var(--line); border-radius: 14px; padding: 20px; font-style: normal; }
.box.selected { border: 2px solid var(--blue); }
.summary { background: var(--soft); border-radius: var(--radius); padding: 24px; align-self: start; }
.summary h2 { margin-top: 0; }
.summary ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.summary li { display: flex; justify-content: space-between; gap: 12px; }
.summary .what strong { font-size: 15px; }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 24px; }
.facts-row div { padding: 20px 24px; }
.facts-row dt { font-size: 13px; color: var(--muted); }
.facts-row dd { margin: 4px 0 0; font-size: 21px; font-weight: 600; }
@media (max-width: 760px) {
  .checkout { grid-template-columns: 1fr; }
  .hero-art img:not(:nth-child(2)) { display: none; }
}

/* Footer */
.bottom { background: var(--soft); padding: 24px 0 32px; font-size: 13px; color: var(--muted); }
.note { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.note a { color: inherit; text-decoration: underline; }
.signature { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 24px; }
.made { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
/* The letters of the logo sit below the middle of its box, under the rocket: raised to the text. */
.made img { display: block; position: relative; top: -2px; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.columns h2 { font-size: 13px; margin: 0 0 8px; color: var(--ink); }
.columns a { display: block; color: #424245; line-height: 2; }
.columns nav a { display: block; }
.columns a[aria-current] { font-weight: 600; color: var(--ink); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 980px; background: #fff; color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #1f8a3c; }

/*
 * The SPA only. The page a route draws holds a screen at least, and the footer waits for it: its
 * content arrives after the first paint, and the footer never moves under the visitor's eyes.
 * Here and not in the styles of the SPA, which load after its first paint.
 */
router-outlet + :not(app-footer) { display: block; min-height: 100vh; }
app-root:not(:has(router-outlet + :not(app-footer))) app-footer { display: none; }
