/* ======================================================================
   Hofhund Manufaktur — Stylesheet
   Tone: warm, grounded, low-gloss. Inspired by classifieds layouts:
   plenty of whitespace, clear trait pills, wide gallery.
====================================================================== */

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("/fonts/rubik-vf.woff2") format("woff2-variations"),
       url("/fonts/rubik-vf.woff2") format("woff2");
}

:root {
  --c-bg: #fafaf7;
  --c-surface: #ffffff;
  --c-soft: #f4efe7;
  --c-text: #2a2722;
  --c-muted: #6b6760;
  --c-border: #e5e0d6;
  --c-primary: #8b4a2b;     /* sattes Lederbraun */
  --c-primary-dark: #6b3720;
  --c-accent: #c98c4e;
  --c-success: #3f7a3a;
  --c-warn: #b07c1a;
  --c-danger: #9a3a2a;
  --c-male: #2c5a8a;
  --c-female: #8a3a6a;
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 14px rgba(40,30,20,.08);
  --f-sans: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-serif: "Iowan Old Style", "Palatino", "Georgia", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--f-serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
.muted { color: var(--c-muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.1rem; color: var(--c-muted); }
.kicker { display: inline-block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-primary); margin-bottom: .6rem; }
.container { width: min(1140px, 92vw); margin-inline: auto; }
.section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-cta { text-align: center; margin-top: 2rem; }
.bg-soft { background: var(--c-soft); }

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  border-radius: var(--r-md);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  font-size: .95rem;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible,
.filter-btn:focus-visible,
.nav-toggle:focus-visible,
.thumb:focus-visible,
.mailto-form button:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-soft); color: var(--c-text); }
.btn-block { width: 100%; text-align: center; }

/* ----- Header ----- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
}
.header-grid { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--c-text); }
.brand:hover { text-decoration: none; }
.brand-text strong { display: block; font-family: var(--f-serif); font-size: 1.1rem; }
.brand-text small { display: block; color: var(--c-muted); font-size: .8rem; }
.site-nav ul { display: flex; gap: 1.4rem; list-style: none; padding: 0; margin: 0; }
.site-nav a { color: var(--c-text); font-weight: 500; padding: .4rem .2rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--c-primary); text-decoration: none; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--c-primary); }
.nav-toggle { display: none; background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; }

/* ----- Hero ----- */
.hero {
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(244,239,231,.6) 100%),
    radial-gradient(ellipse at top right, rgba(201,140,78,.18), transparent 60%);
  padding: 4rem 0 3rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-text h1 { margin-bottom: 1rem; }
.hero-actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-image img {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  background: var(--c-surface);
}

/* ----- Value props ----- */
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.value-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.value-icon { font-size: 1.8rem; display: block; margin-bottom: .6rem; }
.value-card h3 { margin: .3rem 0 .4rem; }
.value-card p { color: var(--c-muted); margin: 0; }

/* ----- Dog grid + cards ----- */
.dog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.dog-card {
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  color: var(--c-text);
  transition: transform .12s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.dog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.dog-card-image { position: relative; margin: 0; aspect-ratio: 4/3; background: var(--c-soft); overflow: hidden; }
.dog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.dog-card-body { padding: 1rem 1.2rem 1.2rem; }
.dog-card-body h3 { margin: 0 0 .3rem; }
.dog-card-foot { display: flex; justify-content: flex-end; align-items: baseline; margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--c-border); }
.more { color: var(--c-primary); font-size: .9rem; font-weight: 600; }

/* ----- Role pills ----- */
.role-pill {
  position: absolute; top: .8rem; left: .8rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.dog-detail .role-pill { position: static; display: inline-block; margin-bottom: .5rem; }
.role-stud   { background: #e1ecf6; color: var(--c-male); border-color: #b9cfe5; }
.role-litter { background: #f4ecdb; color: var(--c-warn); border-color: #ecd58d; }
.role-adult  { background: #e8f3e2; color: var(--c-success); border-color: #c5dfb8; }
.role-junior { background: #f0eae3; color: var(--c-muted); border-color: var(--c-border); }
.role-senior { background: #ede4dc; color: #7b5e3c; border-color: #d8c8b6; }
.dog-card.is-hidden { display: none; }

/* ----- Filter bar ----- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 2rem; }
.filter-btn {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: .5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--c-text);
}
.filter-btn:hover { background: var(--c-soft); }
.filter-btn.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ----- Dog detail ----- */
.dog-detail { padding: 2rem 0 4rem; }
.breadcrumb { font-size: .9rem; color: var(--c-muted); margin: 0 0 1.4rem; }
.breadcrumb .sep { margin: 0 .4rem; }
.dog-header {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}
@media (max-width: 800px) {
  .dog-header { grid-template-columns: 1fr; }
  .contact-card { position: static; }
}
.dog-subtitle { color: var(--c-muted); margin: .2rem 0 .6rem; font-size: 1rem; }
.contact-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 80px;
}
.contact-card-title { font-family: var(--f-serif); font-size: 1.3rem; color: var(--c-primary); margin: 0 0 .4rem; }
.contact-card .btn { margin: 1rem 0; }
.contact-mini { font-size: .9rem; color: var(--c-muted); border-top: 1px solid var(--c-border); padding-top: 1rem; line-height: 1.5; }
.contact-mini strong { color: var(--c-text); }

/* ----- Gallery ----- */
.gallery {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: .8rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.gallery-main {
  aspect-ratio: 4/3;
  background: var(--c-soft);
  border-radius: var(--r-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.thumb {
  width: 80px; height: 60px;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  background: var(--c-soft);
  padding: 0; overflow: hidden; cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--c-primary); }

/* ----- Dog body sections ----- */
.dog-body { display: grid; gap: 2rem; }
.dog-section { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 1.6rem 1.8rem; box-shadow: var(--shadow-sm); }
.dog-section h2 { margin-top: 0; padding-bottom: .6rem; border-bottom: 1px solid var(--c-border); }

/* ----- Facts ----- */
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.fact-table { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; margin: 0; }
.fact-table dt { color: var(--c-muted); }
.fact-table dd { margin: 0; font-weight: 500; }
.trait-pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-content: start; }
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .85rem;
  background: #eef5ec; color: var(--c-success); border: 1px solid #c5dfb8;
}
.pill-yes::before { content: "✓"; font-weight: 700; }

/* ----- Pedigree ----- */
.pedigree {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: stretch;
  background: linear-gradient(180deg, #fbf8f1 0%, #f4efe7 100%);
  padding: 1.4rem;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  overflow-x: auto;
}
.ped-col { display: grid; gap: .8rem; }
.ped-col-0 { grid-template-rows: 1fr; align-content: center; }
.ped-col-1 { grid-template-rows: 1fr 1fr; align-content: center; }
.ped-col-2 { grid-template-rows: repeat(4, 1fr); }
.ped-col-3 { grid-template-rows: repeat(8, 1fr); }
.ped-node {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: .55rem .7rem;
  font-size: .85rem;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 44px;
  box-shadow: var(--shadow-sm);
}
.ped-self { background: var(--c-primary); color: #fff; border-left-color: var(--c-primary-dark); border-color: var(--c-primary); }
.ped-self .ped-meta { color: rgba(255,255,255,.85); }
.ped-male { border-left-color: var(--c-male); }
.ped-female { border-left-color: var(--c-female); }
.ped-rel { display: block; font-size: .7rem; color: var(--c-muted); letter-spacing: .05em; margin-bottom: .15rem; }
.ped-self .ped-rel { color: rgba(255,255,255,.8); }
.ped-name { font-weight: 600; color: inherit; line-height: 1.25; }
.ped-meta { color: var(--c-muted); font-size: .75rem; margin-top: .15rem; }
.pedigree-legend { font-size: .8rem; color: var(--c-muted); margin-top: .8rem; }

/* ----- Footer ----- */
.site-footer { background: #2a2722; color: #d8d2c5; padding: 2.5rem 0; margin-top: 3rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.site-footer a { color: #f0e6d2; }
.site-footer .muted { color: #948e82; }

/* ----- Generic content ----- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.4rem; }
.prose code { background: var(--c-soft); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.list-plain { list-style: none; padding: 0; }
.page-header { margin: 2rem 0 1.6rem; }

/* ----- Legal pages ----- */
.legal { padding: 2rem 0 4rem; max-width: 880px; }
.legal .page-header { margin-top: 1rem; }
.legal-disclaimer {
  margin: 0 0 2rem;
  padding: 1.2rem 1.4rem;
  background: #fff5e1;
  border: 1px solid #f0c875;
  border-left: 6px solid #b07c1a;
  border-radius: var(--r-md);
  color: #5e451a;
  font-size: .95rem;
  line-height: 1.55;
}
.legal-disclaimer strong:first-child { color: #6f4f0d; display: block; margin-bottom: .3rem; font-size: 1rem; }
.legal-body { max-width: none; }
.legal-body h2 { margin-top: 2.2rem; padding-bottom: .4rem; border-bottom: 1px solid var(--c-border); font-size: 1.4rem; }
.legal-body h3 { margin-top: 1.6rem; font-size: 1.1rem; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.legal-body td, .legal-body th { padding: .5rem .8rem; border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.legal-body th { font-weight: 600; }
.legal-body blockquote { border-left: 3px solid var(--c-border); margin: 1rem 0; padding: .4rem 1rem; color: var(--c-muted); background: var(--c-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.legal-address {
  display: block;
  font-style: normal;
  background: var(--c-soft);
  border-left: 4px solid var(--c-primary);
  padding: .8rem 1.1rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: .6rem 0 1.4rem;
  line-height: 1.55;
}
.legal-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
}
.legal-nav h2 { font-size: 1rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .08em; }
.legal-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.legal-nav a[aria-current="page"] { color: var(--c-text); font-weight: 600; pointer-events: none; }

.footer-bottom { padding-top: 1.4rem; margin-top: 1.4rem; border-top: 1px solid #444036; }

/* ----- Mailto forms ----- */
.mailto-form {
  display: grid;
  gap: 1.2rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.6rem 1.8rem;
  box-shadow: var(--shadow-sm);
  margin: 1rem 0 2rem;
}
.mailto-form .form-fieldset {
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 1rem 1.2rem 1.2rem;
  display: grid;
  gap: .8rem;
}
.mailto-form .form-fieldset legend {
  padding: 0 .5rem;
  font-weight: 600;
  color: var(--c-primary);
  font-size: .95rem;
}
.mailto-form label {
  display: block;
  font-size: .9rem;
  color: var(--c-muted);
}
.mailto-form label.radio-row,
.mailto-form label.checkbox-row {
  font-size: .95rem;
  color: var(--c-text);
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  cursor: pointer;
}
.mailto-form label.checkbox-row a { color: var(--c-primary); }
.mailto-form input[type="text"],
.mailto-form input[type="email"],
.mailto-form input[type="tel"],
.mailto-form input[type="date"],
.mailto-form input:not([type]),
.mailto-form select,
.mailto-form textarea {
  display: block;
  width: 100%;
  padding: .55rem .8rem;
  margin-top: .3rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .95rem;
  font-family: inherit;
  color: var(--c-text);
  background: var(--c-bg);
}
.mailto-form input:focus,
.mailto-form select:focus,
.mailto-form textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(139, 74, 43, .15);
}
.mailto-form textarea { font-family: inherit; resize: vertical; min-height: 60px; }
.mailto-form .form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.mailto-form .form-fineprint { margin: 0; }
.mailto-form .form-consent { margin: 0; }
.js-mail-link, .js-tel-link { color: var(--c-primary); }

/* ----- Maintenance page ----- */
body.maintenance {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top right, rgba(201,140,78,.20), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(139,74,43,.18), transparent 55%),
    var(--c-bg);
  opacity: 0;
  transition: opacity 2.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
body.maintenance.is-ready { opacity: 1; }

/* ----- Social links ----- */
.social-links {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  gap: .8rem;
  justify-content: center;
}
.social-links a {
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-soft);
  color: var(--c-primary);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.social-links a:hover {
  background: var(--c-primary);
  color: var(--c-surface);
  transform: translateY(-2px);
  text-decoration: none;
}
.social-links svg { width: 20px; height: 20px; display: block; }
.footer-social { display: flex; flex-direction: column; gap: .6rem; }
.footer-social .social-links { margin-top: 0; justify-content: flex-start; }
.footer-social .social-links a { background: rgba(255,255,255,.08); color: #f0e6d2; }
.footer-social .social-links a:hover { background: var(--c-accent); color: var(--c-text); }
.maintenance-main {
  width: 100%;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.maintenance-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(40, 30, 20, .12);
  padding: 3rem 2.4rem;
  max-width: 580px;
  width: 100%;
  text-align: center;
}
.maintenance-logo {
  width: 220px;
  height: auto;
  aspect-ratio: 854 / 1280;
  margin: 0 auto 1.4rem;
  display: block;
  border-radius: var(--r-md);
  object-fit: cover;
  background: var(--c-soft);
  box-shadow: 0 12px 32px rgba(139,74,43,.22);
  border: 4px solid var(--c-surface);
  outline: 1px solid var(--c-border);
}
.maintenance-kicker {
  display: block;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: .6rem;
}
.maintenance-card h1 {
  font-family: var(--f-sans);
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--c-text);
  line-height: 1.15;
}
.maintenance-lead {
  color: var(--c-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 1.8rem;
}
.maintenance-paws {
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  margin: 0;
  color: var(--c-primary);
}
.maintenance-paws span { display: inline-flex; animation: paw-bounce 1.6s ease-in-out infinite; }
.maintenance-paws svg { width: 28px; height: 28px; display: block; }
.maintenance-paws span:nth-child(2) { animation-delay: .2s; }
.maintenance-paws span:nth-child(3) { animation-delay: .4s; }
@keyframes paw-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .7; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

/* ----- Responsive ----- */
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .pedigree { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}
@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .site-nav ul {
    display: none;
    position: absolute; top: 64px; right: 0; left: 0;
    background: var(--c-surface);
    flex-direction: column; padding: 1rem;
    border-bottom: 1px solid var(--c-border);
  }
  .site-nav ul.is-open { display: flex; }
  .header-grid { position: relative; }
}
