/* Bramble Pets test site. One accent (green), rationed to the primary action,
   the brand mark and focus; everything else is ink on white with hairlines.
   Rounding is committed: 16px cards, pill buttons, nothing in between. */

:root {
  --canvas: #ffffff;
  --surface-alt: #f3f6f4;
  --ink: #1d2420;
  --body: #3b4440;
  --muted: #5b645f;
  --hairline: #dde3df;
  --accent: #17694a;
  --accent-active: #0f4f37;
  /* The main call to action is blue at the owner's request; the rest of the
     accent (brand mark, links, focus ring) stays green. 6.0:1 with white text. */
  --action: #1f5fc4;
  --action-active: #174a9c;
  --tile-a: #e1efe6;
  --tile-b: #e0eaf4;
  --tile-c: #f1eadc;
  --tile-d: #ebe5f1;

  --radius-card: 16px;
  --radius-pill: 9999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --font:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-active);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2 * var(--space-5), 1120px);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--radius-pill);
  z-index: 10;
}

.skip:focus {
  top: var(--space-3);
  color: var(--canvas);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--hairline);
}

.header-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  padding-block: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  justify-self: start;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  fill: var(--accent);
}

.nav-list {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}

.nav-list a:hover {
  text-decoration: underline;
  color: var(--ink);
}

.site-header nav {
  grid-column: 1 / -1;
  grid-row: 2;
}

.basket {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.basket svg {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

@media (min-width: 720px) {
  .header-row {
    grid-template-columns: auto 1fr auto;
  }

  .site-header nav {
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
    padding-left: var(--space-5);
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.button-primary {
  background: var(--action);
  border-color: var(--action);
  color: #fff;
}

.button-primary:hover {
  background: var(--action-active);
  border-color: var(--action-active);
  color: #fff;
}

.button-quiet {
  background: transparent;
  color: var(--ink);
}

.button-quiet:hover {
  background: var(--ink);
  color: var(--canvas);
}

.button-small {
  min-height: 40px;
  padding: var(--space-2) 14px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 0.9375rem;
}

.button-small:hover {
  background: var(--ink);
  color: var(--canvas);
}

.button-small.is-added {
  background: var(--ink);
  color: var(--canvas);
}

/* Hero */

.hero {
  padding-block: var(--space-7) var(--space-8);
}

.hero-grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

.eyebrow {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.08;
  max-width: 18ch;
}

.lede {
  margin-top: var(--space-5);
  font-size: 1.125rem;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero-photo {
  margin: 0;
  width: 100%;
  max-width: 440px;
  justify-self: center;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  background: var(--tile-c);
}

.hero-photo figcaption {
  margin-top: var(--space-3);
  color: var(--ink);
  font-weight: 550;
}

.hero-photo .credit {
  display: block;
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Illustrations: flat shapes in ink on tinted tiles, so they need no image files. */

.tile-a {
  fill: var(--tile-a);
  background: var(--tile-a);
}
.tile-b {
  fill: var(--tile-b);
  background: var(--tile-b);
}
.tile-c {
  fill: var(--tile-c);
  background: var(--tile-c);
}
.tile-d {
  fill: var(--tile-d);
  background: var(--tile-d);
}

.ink {
  fill: var(--ink);
}

.eye {
  fill: var(--canvas);
}

.hole {
  fill: var(--tile-d);
}

.thread {
  fill: none;
  stroke: var(--canvas);
  stroke-width: 3;
  stroke-linecap: round;
}

.thread-ink {
  stroke: var(--ink);
}

/* Sections */

.section {
  padding-block: var(--space-8);
  border-top: 1px solid var(--hairline);
}

.section-alt {
  background: var(--surface-alt);
  border-top: 0;
}

.section-head h2,
#visit-title {
  font-size: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: var(--space-2);
  color: var(--muted);
  max-width: 52ch;
}

/* Shop */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.chip {
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink);
}

.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--canvas);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: var(--space-5);
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
}

.filters:not([hidden]) + .visually-hidden + .products {
  margin-top: var(--space-5);
}

.product {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-3) var(--space-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
}

.product[hidden] {
  display: none;
}

.product-art {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  border-radius: calc(var(--radius-card) - 6px);
}

.product-art svg {
  width: 60%;
  height: auto;
}

.product h3 {
  margin: var(--space-4) var(--space-1) 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.product-desc {
  margin: var(--space-2) var(--space-1) 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.product-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin: auto 0 0 var(--space-1);
  padding-top: var(--space-4);
}

.price {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Services */

.services-grid {
  display: grid;
  gap: var(--space-6);
}

.services {
  display: grid;
  gap: var(--space-5) var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.services li {
  padding-top: var(--space-4);
  border-top: 1px solid var(--ink);
}

.services h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.services p {
  margin-top: var(--space-2);
}

@media (min-width: 640px) {
  .services {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-8);
  }
}

/* Visit */

.visit-grid {
  display: grid;
  gap: var(--space-7);
}

address {
  margin-top: var(--space-4);
  font-style: normal;
  color: var(--ink);
  font-size: 1.125rem;
}

address + p {
  margin-top: var(--space-3);
}

.note {
  margin-top: var(--space-4);
  color: var(--muted);
}

.visit-grid h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.hours {
  margin: var(--space-3) 0 0;
}

.hours div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--hairline);
}

.hours dt {
  color: var(--ink);
}

.hours dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .visit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Footer */

.site-footer {
  padding-block: var(--space-6);
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}

/* Text wrapping: keep headings even and stop single-word last lines. */

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* On a phone a full-width 3:2 tile per product makes the list very long, so
   each card turns into a row with a small square picture beside the text. */

@media (max-width: 559px) {
  .products {
    gap: var(--space-3);
  }

  .product {
    display: grid;
    grid-template-columns: 96px 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: var(--space-3);
    padding: var(--space-3);
  }

  .product-art {
    grid-row: 1 / 4;
    aspect-ratio: 1;
    align-self: start;
  }

  .product-art svg {
    width: 76%;
  }

  .product h3 {
    margin-top: var(--space-1);
  }

  .product-foot {
    flex-wrap: wrap;
    margin-top: 0;
    padding-top: var(--space-3);
  }
}
