/* ============================================
   PawfectMatch — Design Tokens
   Editorial Luxury archetype: warm cream, terracotta accent, sage secondary
   Fonts: Clash Display (display) + DM Sans (body)
   ============================================ */

:root {
  --bg: #fbf7f0;
  --bg-alt: #f3ece0;
  --bg-dark: #1a1512;
  --bg-dark-alt: #241d18;
  --text: #1f1a15;
  --text-muted: #6b5d4f;
  --text-inverse: #f5efe4;
  --text-inverse-muted: #cabfae;
  --accent: #c1622f;
  --accent-hover: #a84f22;
  --accent-light: #e8b088;
  --accent-wash: #f4e2d4;
  --sage: #6f7d54;
  --sage-light: #dbe2cc;
  --card-bg: #ffffff;
  --border: rgba(31, 26, 21, 0.09);
  --border-strong: rgba(31, 26, 21, 0.16);
  --shadow-sm: 0 1px 2px rgba(31, 26, 21, 0.04), 0 2px 8px rgba(31, 26, 21, 0.04);
  --shadow-md: 0 4px 16px rgba(31, 26, 21, 0.06), 0 12px 32px rgba(31, 26, 21, 0.06);
  --shadow-lg: 0 12px 40px rgba(31, 26, 21, 0.10), 0 24px 64px rgba(31, 26, 21, 0.08);
  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 2rem;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-display: "Clash Display", "DM Sans", sans-serif;
  --font-body: "DM Sans", -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Grain texture overlay — fixed, non-repainting */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--text);
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h4 { font-size: 1.15rem; }

p { color: var(--text-muted); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (max-width: 768px) { .container { padding: 0 1rem; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  background: var(--accent-wash);
  color: var(--accent-hover);
  border: 1px solid rgba(193, 98, 47, 0.18);
}

/* ============ NAV ============ */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 1rem 1.5rem 0;
}
.nav {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(251, 247, 240, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 0.65rem 0.65rem 1.4rem;
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo .paw { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a { color: var(--text-muted); transition: color 0.4s var(--ease); }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--text);
  color: var(--text-inverse);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background 0.4s var(--ease);
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon-circle {
  width: 2.1rem; height: 2.1rem; border-radius: 999px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.5s var(--ease);
}
.btn-primary:hover .btn-icon-circle { transform: translate(2px, -2px) scale(1.05); }

/* ============ CARDS (double-bezel) ============ */
.card-shell {
  background: rgba(31,26,21,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.4rem;
}
.card-core {
  background: var(--card-bg);
  border-radius: calc(var(--radius-lg) - 0.4rem);
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6);
}

.breed-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.breed-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.breed-card-media {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--sage-light), var(--accent-wash));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 2.5rem; color: rgba(31,26,21,0.15);
  position: relative;
  overflow: hidden;
}
.breed-card-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform 0.7s var(--ease);
}
.breed-card:hover .breed-card-media img { transform: scale(1.05); }
.breed-card-body { padding: 1.35rem 1.4rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.breed-card-body h4 { margin-bottom: 0.3rem; }
.breed-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.7rem 0 0.9rem; }
.tag {
  font-size: 0.72rem; font-weight: 600; padding: 0.28rem 0.6rem;
  border-radius: 999px; background: var(--bg-alt); color: var(--text-muted);
}
.breed-card-desc { font-size: 0.9rem; flex: 1; margin-bottom: 0.9rem; }
.breed-card-link {
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.35rem; margin-top: auto;
}

/* ============ GRIDS ============ */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ============ SECTIONS ============ */
section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
@media (max-width: 768px) { section { padding: 3.5rem 0; } }

.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ============ HERO ============ */
.hero {
  padding: 4.5rem 0 3rem;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin: 1.1rem 0 1.3rem; }
.hero p.lead { font-size: 1.15rem; max-width: 520px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual {
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--sage-light) 0%, var(--accent-wash) 60%, var(--bg-alt) 100%);
  position: relative;
  overflow: hidden;
}
.hero-visual img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
}
.hero-stats {
  display: flex; gap: 2.2rem; margin-top: 2.5rem; flex-wrap: wrap;
}
.hero-stat-num { font-family: var(--font-display); font-size: 1.8rem; color: var(--accent); }
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ============ SEARCH / FILTER BAR ============ */
.filter-bar {
  display: flex; gap: 0.7rem; flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-chip {
  padding: 0.55rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--border-strong); font-size: 0.85rem; font-weight: 500;
  background: var(--card-bg); cursor: pointer; transition: all 0.4s var(--ease);
}
.filter-chip:hover, .filter-chip.active { background: var(--text); color: var(--text-inverse); border-color: var(--text); }
.search-input {
  width: 100%; padding: 1rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--border-strong); font-size: 0.95rem; font-family: var(--font-body);
  background: var(--card-bg); margin-bottom: 1.5rem;
}
.search-input:focus { outline: none; border-color: var(--accent); }

/* ============ BREED DETAIL PAGE ============ */
.breed-hero { padding: 3rem 0 2.5rem; }
.breed-hero-top { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.breed-hero-media {
  width: 100%; max-width: 380px; aspect-ratio: 1/1; border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--sage-light), var(--accent-wash));
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 3rem; color: rgba(31,26,21,0.12);
}
.breed-hero-info { flex: 1; min-width: 280px; }
.breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--accent); }

.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2rem 0;
}
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-box {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}
.stat-box .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.3rem; }
.stat-box .value { font-family: var(--font-display); font-size: 1.15rem; }

.info-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table td { padding: 0.85rem 0; vertical-align: top; }
.info-table td:first-child { width: 200px; font-weight: 600; color: var(--text); font-size: 0.9rem; }
.info-table td:last-child { color: var(--text-muted); font-size: 0.92rem; }

.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { background: var(--sage-light); color: #3f4530; padding: 0.4rem 0.9rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500; }
.pill.warn { background: var(--accent-wash); color: var(--accent-hover); }

.content-block { max-width: 760px; margin: 2.5rem 0; }
.content-block h3 { margin-bottom: 1rem; margin-top: 2rem; }
.content-block p { margin-bottom: 1rem; font-size: 1.02rem; }
.content-block ul { margin: 0 0 1rem 1.3rem; color: var(--text-muted); }
.content-block li { margin-bottom: 0.5rem; }

.callout {
  background: var(--sage-light); border-radius: var(--radius-md); padding: 1.6rem 1.8rem;
  margin: 2rem 0; border-left: 3px solid var(--sage);
}
.callout.accent { background: var(--accent-wash); border-left-color: var(--accent); }
.callout h4 { margin-bottom: 0.6rem; }
.callout p { color: #3f4530; }
.callout.accent p { color: #6b3818; }

/* ============ TOOL WIDGETS ============ */
.tool-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2.2rem;
}
.tool-input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0; }
@media (max-width: 600px) { .tool-input-row { grid-template-columns: 1fr; } }
.field-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; display: block; }
.field-input {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  font-family: var(--font-body); font-size: 0.95rem; background: var(--bg);
}
.field-input:focus { outline: none; border-color: var(--accent); }
.tool-result {
  margin-top: 1.5rem; background: var(--sage-light); border-radius: var(--radius-md);
  padding: 1.6rem; display: none;
}
.tool-result.show { display: block; }
.tool-result .big-num { font-family: var(--font-display); font-size: 2.3rem; color: var(--sage); }

/* ============ FOOTER ============ */
footer {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 4.5rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--text-inverse); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.65rem; }
.footer-grid a { color: var(--text-inverse-muted); font-size: 0.9rem; transition: color 0.4s var(--ease); }
.footer-grid a:hover { color: var(--accent-light); }
.footer-bottom { padding-top: 2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: var(--text-inverse-muted); }

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft), filter 0.9s var(--ease-soft); }
.reveal.in { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ============ AD SLOTS ============ */
.ad-slot { margin: 2.5rem 0; text-align: center; min-height: 90px; }
.ad-slot .ad-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); opacity: 0.5; margin-bottom: 0.5rem; }

/* ============ MISC UTILITIES ============ */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.badge-group { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.2rem; }
