/* ============================================================
   Dachshund SVG & Clipart — warm wood-toned craft-room aesthetic.
   Layered paper-cut hover language: the card is the top layer of
   cut cardstock; hovering peels it back to reveal the caramel layer
   underneath — literal echo of "layered SVG files" from the copy.
   ============================================================ */

@font-face {
  font-family: 'Fraunces Display';
  src: url('/assets/fonts/fraunces-display-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces Display';
  src: url('/assets/fonts/fraunces-display-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces Display';
  src: url('/assets/fonts/fraunces-display-500italic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/assets/fonts/karla-body-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/assets/fonts/karla-body-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/assets/fonts/karla-body-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('/assets/fonts/karla-body-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F7EEE1;         /* page background — warm cream */
  --paper-deep: #F0E3CF;    /* slightly deeper cream, hero/footer bands */
  --ink: #2E2016;           /* primary text — deep warm brown */
  --ink-soft: #5B4632;      /* secondary text */
  --accent: #A8452B;        /* terracotta — CTA, links, primary accent */
  --accent-ink: #FFF8ED;    /* text on accent (near-cream, not stark white) */
  --caramel: #8B5A2B;       /* caramel — labels, eyebrow text, secondary layer */
  --caramel-layer: #C98B4A; /* lighter caramel — the "layer beneath" reveal */
  --card-bg: #FFFBF4;       /* card surface, lifted above --paper */
  --border: #E3D2B8;        /* hairline borders */

  --font-display: 'Fraunces Display', Georgia, 'Iowan Old Style', serif;
  --font-body: 'Karla', 'Segoe UI', Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(139, 90, 43, 0.07) 1px, transparent 0);
  background-size: 22px 22px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; color: var(--ink); }
img { max-width: 100%; display: block; }
a { color: inherit; }
main { display: block; }

/* ---- header / footer -------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  background: var(--paper-deep);
  border-bottom: 2px solid var(--border);
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.site-header__brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
}
.site-header__catalog-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--paper);
  white-space: nowrap;
}

.site-footer {
  padding: 2.5rem 1.5rem 3rem;
  background: var(--paper-deep);
  border-top: 2px solid var(--border);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.site-footer__inner { max-width: 1100px; margin: 0 auto; }
.site-footer p { margin: 0 0 0.5rem; }
.site-footer p:last-child { margin-bottom: 0; }

/* ---- hero -------------------------------------------------------------- */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--caramel);
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  margin: 0 0 1rem;
  font-weight: 700;
}
.hero p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 620px;
  margin-inline: auto;
}

/* ---- catalog grid — fixed 1/2 col, columns always explicit ------------ */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  padding: 1rem 1.5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media (min-width: 760px) {
  .catalog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- card — layered paper-cut stretched-link pattern ------------------ */
.card {
  position: relative;
  isolation: isolate;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 14px;
  background: var(--caramel-layer);
  transform: translate(6px, 7px);
}
/* opaque wrapper for all real content — this is what actually needs to sit
   above ::before. A transparent-background element like .card__category
   sitting directly in .card would let the shadow layer show through in the
   gaps between text lines, since ::before paints above .card's own
   background but below in-flow content; a single continuous opaque surface
   avoids that gap entirely. */
.card__surface {
  position: relative;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.card__media {
  aspect-ratio: 4 / 3;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
  border-bottom: 1.5px solid var(--border);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 140ms ease;
}
.card__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--caramel);
  font-weight: 700;
  padding: 1.1rem 1.15rem 0;
}
.card__title {
  margin: 0.35rem 0 0.5rem;
  padding: 0 1.15rem;
  font-size: 1.2rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}
.card__title a { text-decoration: none; }
.card__excerpt {
  padding: 0 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  margin: 0.6rem 1.15rem 1.25rem;
  position: relative;
  z-index: 2;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  font-weight: 700;
  color: var(--accent);
}
.card__stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ---- product page ------------------------------------------------------ */
.product-page { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.product-page__category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--caramel);
  font-weight: 700;
}
.product-page__media {
  position: relative;
  margin: 1.25rem 0 1.75rem;
  isolation: isolate;
}
.product-page__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 16px;
  background: var(--caramel-layer);
  transform: translate(8px, 9px);
}
.product-page__media-frame {
  aspect-ratio: 4 / 3;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-page__media-frame img { width: 100%; height: 100%; object-fit: contain; }

.product-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  margin: 0.5rem 0 1.1rem;
  font-weight: 700;
}
.product-page__description {
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.95rem 2.25rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  outline-offset: 3px;
}
.cta-button:focus-visible { outline: 2px solid var(--paper); }

.back-to-catalog {
  display: block;
  margin-top: 1.1rem;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---- 404 ---------------------------------------------------------------- */
.not-found {
  max-width: 560px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  text-align: center;
}
.not-found h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.not-found p { color: var(--ink-soft); margin-bottom: 1.5rem; }

/* ---- interactive states -------------------------------------------------
   Hover metaphor: paper-cut layer peel. The card (top layer) shifts up-left
   140ms via transform only; its ::before (caramel layer beneath) widens the
   offset in the same motion, exaggerating the reveal — like lifting the top
   sheet of a layered SVG cut file to see the layer underneath. */
@media (hover: hover) and (pointer: fine) {
  .card,
  .card::before {
    transition: transform 140ms ease;
  }
  .card:hover {
    transform: translate(-3px, -5px);
  }
  .card:hover::before {
    transform: translate(10px, 13px);
  }
  .card:hover .card__media img {
    transform: scale(1.02);
  }

  .cta-button,
  .site-header__catalog-link {
    transition: transform 140ms ease, opacity 140ms ease;
  }
  .cta-button:hover {
    transform: translateY(-2px);
  }
  .site-header__catalog-link:hover {
    transform: translateY(-2px);
    background: var(--accent);
    color: var(--accent-ink);
  }
}

.card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.card:active {
  transform: scale(0.99);
}
.cta-button:active {
  transform: scale(0.97);
}
.site-header__catalog-link:focus-visible,
.back-to-catalog:focus-visible,
.card__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
  }
}
