/* Pawberry — base: tokens (from Design System v2), reset, shared utilities. Owned by the lead; agents read, don't edit. */
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  /* colour */
  --paper: #fff7ed;
  --oat: #f4e5d2;
  --petal: #f4d8d8;
  --leaf-mist: #e4e8d8;
  --strawberry: #b51f42;
  --jam: #801c36;
  --leaf: #53674d;
  --ink: #2e2322;
  --ink-muted: #66534c;
  --line: #ddc8b9;
  --scene-bark: #2b1a10;
  --scene-shed: #3b140c;
  --scene-veil: rgba(43, 26, 16, 0.72);
  --focus-ring: var(--strawberry);

  /* type */
  --font-display: "Instrument Sans", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* space */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --gutter: 20px;

  /* shape */
  --radius-control: 10px;
  --radius-card: 14px;
  --radius-feature: 22px;
  --radius-panel: 32px;
  --radius-sheet: 40px;          /* the page sheet that rises over the hero (Clay: 48px) */
  --radius-pill: 999px;

  /* depth */
  --shadow-bar: 0 1px 0 rgba(46, 35, 34, 0.06), 0 10px 30px rgba(43, 26, 16, 0.14);
  --shadow-panel: 0 24px 60px rgba(43, 26, 16, 0.22);
  --shadow-lift: 0 2px 0 rgba(46, 35, 34, 0.05), 0 12px 28px rgba(46, 35, 34, 0.10);

  /* layout */
  --header-max: 880px;
  --header-height: 52px;
  --content-max: 1200px;
  --touch: 44px;

  /* motion: soft ease-out, as on Clay */
  --ease-out: cubic-bezier(0.075, 0.82, 0.165, 1);
  --dur-ui: 180ms;
}
@media (min-width: 600px) { :root { --gutter: 32px; } }
@media (min-width: 900px) { :root { --gutter: 40px; --header-height: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; color: inherit; }
p { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-control);
  background: var(--paper); color: var(--ink); font: 560 15px/20px var(--font-display); text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Shared buttons */
.button {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--touch); padding: 0 20px; border-radius: var(--radius-control);
  font: 560 15px/20px var(--font-display); text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
}
.button-scene { background: var(--paper); color: var(--ink); }
.button-scene:hover { background: #fff; transform: translateY(-1px); }
.button-scene:focus-visible { outline-color: var(--paper); outline-offset: 3px; }
.button-primary { background: var(--strawberry); color: var(--paper); }
.button-primary:hover { background: var(--jam); }
.text-link {
  color: var(--strawberry); font: 560 15px/20px var(--font-display);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.text-link:hover { color: var(--jam); }
.icon-button {
  display: grid; place-items: center; width: var(--touch); height: var(--touch); padding: 0;
  border: 0; border-radius: var(--radius-control); background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color var(--dur-ui) var(--ease-out);
}
.icon-button:hover { background: var(--oat); }
.icon-button svg { width: 22px; height: 22px; }

/* Shared category label */
.category { font: 600 12px/16px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--leaf); }

/* Image placeholder (until felt-style imagery exists) */
.placeholder {
  display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-card);
  background: var(--oat) repeating-linear-gradient(135deg, rgba(221, 200, 185, 0.5) 0 1px, transparent 1px 12px);
  color: var(--ink-muted); font: 550 11px/16px var(--font-display); letter-spacing: 0.06em; text-transform: uppercase;
}
.ratio-3x2 { aspect-ratio: 3 / 2; }
.ratio-1x1 { aspect-ratio: 1; }

/* App icons (pets + topics) live in icons.css: Pawberry icon set v4, Liquid Glass. */

/* ==================================================================
   Liquid Glass: the shared material (tokens + .glass utility).
   Recipe: blur + saturate + a touch of brightness behind a very light
   tinted fill; a crisp specular rim (lighter top-left), an inner edge,
   soft shading at the bottom and a gently coloured drop shadow.
   Header, hero tiles and footer reuse these tokens.
   ================================================================== */
:root {
  --lg-blur: 26px;
  --lg-saturate: 1.8;
  --lg-bright: 1.05;
  --lg-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate)) brightness(var(--lg-bright));
  --lg-filter-strong: blur(30px) saturate(1.9) brightness(1.08);   /* text-dense panels */

  --lg-white: 0.40;                              /* base white fill under any tint */
  --lg-fill: rgba(255, 251, 246, 0.50);
  --lg-fill-bar: rgba(255, 249, 242, 0.64);      /* header bar, ticker */
  --lg-fill-strong: rgba(255, 250, 245, 0.84);   /* menus and panels full of text */
  --lg-fill-solid: #fff7ed;                      /* no-blur / reduced-transparency fallback */

  --lg-edge: rgba(46, 35, 34, 0.10);
  --lg-rim: linear-gradient(140deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.42) 32%, rgba(255, 255, 255, 0.10) 60%, rgba(255, 255, 255, 0.78) 100%);
  --lg-sheen: radial-gradient(120% 70% at 12% 0%, rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0) 60%);
  --lg-inner: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.22), inset 0 -14px 22px -16px rgba(128, 28, 54, 0.14);
  --lg-inner-hover: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, 0.40), inset 0 -14px 22px -16px rgba(128, 28, 54, 0.18);
  --lg-drop: 0 1px 2px rgba(128, 28, 54, 0.07), 0 10px 28px -8px rgba(128, 28, 54, 0.18), 0 24px 48px -20px rgba(43, 26, 16, 0.20);
  --lg-shadow: 0 0 0 0.5px var(--lg-edge), var(--lg-inner), var(--lg-drop);
}

/* .glass: set --lg-tint (r, g, b) and --lg-tint-a to tint it. Needs something colourful behind it. */
.glass {
  --lg-tint: 255, 255, 255; --lg-tint-a: 0.12;
  position: relative; isolation: isolate;
  background:
    var(--lg-sheen),
    linear-gradient(165deg, rgba(var(--lg-tint), calc(var(--lg-tint-a) * 2)), rgba(var(--lg-tint), var(--lg-tint-a))),
    rgba(255, 255, 255, var(--lg-white));
  -webkit-backdrop-filter: var(--lg-filter); backdrop-filter: var(--lg-filter);
  box-shadow: var(--lg-shadow);
}
/* specular rim: thin ring, brightest top-left */
.glass::before {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--lg-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass-strong { --lg-white: 0.62; -webkit-backdrop-filter: var(--lg-filter-strong); backdrop-filter: var(--lg-filter-strong); }

/* No backdrop-filter: opaque cream so text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--lg-fill-solid); }
}
/* Reduced transparency: near-opaque fills, no blur */
@media (prefers-reduced-transparency: reduce) {
  :root { --lg-fill: rgba(255, 250, 244, 0.96); --lg-fill-bar: rgba(255, 250, 244, 0.97); --lg-fill-strong: rgba(255, 250, 244, 0.99); --lg-white: 0.94; }
  .glass { background: var(--lg-fill-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
