/* ===========================================================
   Goxyland — base styles
   A plain, high-contrast, easy-to-read layout. Warm paper
   ground, working-dog green, and a tan field accent. No cards,
   no shadows — hairline rules do the separating. Sized and
   spaced for readers who don't want to squint or hunt for
   what's clickable.
=========================================================== */

:root {
  /* --- palette --- */
  --bg:        #FAF8F1;   /* warm paper */
  --bg-soft:   #F1EEE0;   /* slightly deeper panel tone */
  --bg-soft-2: #E7E1CC;   /* one step deeper still — hover on entries that already sit on --bg-soft */
  --ink:       #212A1C;   /* near-black, green undertone */
  --ink-soft:  #46503D;   /* muted body text (still high contrast) */
  --green:     #74B559;   /* brand green */
  --green-deep:#3E6B37;   /* deep forest, for text-on-light emphasis / hover */
  --green-ink: #24361F;   /* dark green, used for footer + dark panels */
  --tan:       #C79A5D;   /* field / fur accent — decorative use only */
  --tan-deep:  #7A5220;   /* darkened tan — safe for text/labels */
  --line:      #DED7C2;   /* hairline border */
  --line-soft: #EAE5D5;
  --female:    #A15A6D;   /* dam badge — used only for the small gender badge */
  --male:      #4F7A9E;   /* sire badge — used only for the small gender badge */
  --surface:   #fff;      /* "paper mat" behind photo frames, photo/video cards */

  --font-display: "Fraunces", Georgia, "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1120px;
  --gutter: 24px;
}

/* --- dark theme ---
   Same warm, green-forest identity, inverted: deep near-black green
   ground instead of paper, brightened accents so text and links stay
   readable against it. Toggled via the theme-toggle button (see
   initThemeToggle in main.js), which sets data-theme on <html>. */
html[data-theme="dark"] {
  --bg:        #1A1E15;
  --bg-soft:   #262B1F;
  --bg-soft-2: #2E3524;
  --surface:   #22271E;
  --ink:       #EDEAD9;
  --ink-soft:  #B7BEA6;
  --green:     #8FCB73;
  --green-deep:#8AC66E;
  --green-ink: #0F150B;
  --tan:       #D8AE72;
  --tan-deep:  #E7C68C;
  --line:      #3A4030;
  --line-soft: #2C321F;
  --female:    #D98CA0;
  --male:      #7FB0D6;
}
html[data-theme="dark"] .hero {
  background: radial-gradient(120% 100% at 15% 0%, #232A19 0%, var(--bg) 55%);
}
html[data-theme="dark"] .photo-frame .placeholder {
  background: linear-gradient(160deg, var(--bg-soft), #171B11);
}
html[data-theme="dark"] .litter-status {
  background: #1D2A15;
}
html[data-theme="dark"] .litter-status.is-expected {
  background: #2E2410;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Lets every element fade between light/dark colors when the theme
   toggle is used, instead of snapping instantly. Elements that
   declare their own `transition` (buttons, hover-zoom photos, etc.)
   simply keep their own list — this only fills in the rest. */
*, *::before, *::after {
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Faint paper-grain texture over the warm background — an inline
   SVG noise filter, so it's a few bytes of CSS and no image
   request. Kept low-opacity and behind everything, purely tactile. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%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");
}

::selection { background: var(--green); color: var(--green-ink); }
::-moz-selection { background: var(--green); color: var(--green-ink); }

html {
  scrollbar-color: var(--green-deep) var(--bg-soft);
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--green-deep); border-radius: 7px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--green-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }

a { color: var(--green-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--ink); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

:focus-visible {
  outline: 3px solid var(--green-deep);
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

/* skip link — invisible until keyboard-focused */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--green-ink);
  color: #fff;
  padding: 1em 1.4em;
  z-index: 200;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.95em 1.7em;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn-primary {
  background: var(--green-deep);
  color: #fff;
}
.btn-primary:hover {
  background: var(--green-ink);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(36, 54, 31, 0.45);
}
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--green-deep); color: var(--green-deep); }

/* --- header / nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 160ms ease;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 14px -8px rgba(33, 42, 28, 0.25);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 1.2rem; flex-shrink: 0; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.theme-toggle:hover, .theme-toggle:focus-visible {
  background: var(--bg-soft);
  transform: rotate(-8deg);
}
.theme-toggle svg { display: block; }
.theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: block; }

.main-nav { display: flex; align-items: center; gap: 2.2rem; }
.main-nav a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 0.4em 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -3px;
  height: 3px;
  background: var(--green);
  transition: left 180ms ease, right 180ms ease;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a[aria-current="page"]::after {
  left: 0;
  right: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5em;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  padding: 0.6em 0.9em;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-body);
}
.nav-toggle svg { display: block; }

@media (max-width: 780px) {
  .main-nav {
    position: fixed;
    inset: 88px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { width: 100%; padding: 1em 0; border-bottom: 1px solid var(--line-soft); font-size: 1.15rem; }
  .nav-toggle { display: inline-flex; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 1.28rem; }
  .header-actions { gap: 0.6rem; }
  .nav-toggle { padding: 0.55em 0.7em; gap: 0.4em; }
  .theme-toggle { width: 36px; height: 36px; }
}

/* --- footer --- */
.site-footer {
  border-top: 6px solid var(--green);
  background: var(--green-ink);
  color: #EFECDD;
  padding: 1.75rem 0 1rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
}
.foot-brand img { width: 190px; height: auto; margin-bottom: 1rem; }
.contact-card-head h2 {
  font-size: 1.3rem; /* promoted from h3 to h2 for correct heading order; kept the original h3 size */
}
.site-footer h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8em;
}
.site-footer p { color: #D8DCC9; font-size: 1rem; }
.site-footer a { color: #D9F0C6; font-weight: 500; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; }
.site-footer .foot-brand p { max-width: 30ch; color: #C7CDB4; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 0.6em; font-size: 1.05rem; }
.foot-bottom {
  margin-top: 1.1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #3C4E33;
  font-size: 0.95rem;
  color: #AEB596;
}

/* --- section rhythm --- */
.section { padding: 1.875rem 0; }
.section-tight { padding: 1.5rem 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: linear-gradient(180deg, #28391F 0%, var(--green-ink) 100%); color: #F3F1E4; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #CBD6C1; }
.section-dark a { color: #C7E6B4; }

.eyebrow {
  color: var(--green-deep);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5em;
  display: block;
}
.section-dark .eyebrow { color: var(--green); }

.more-link { display: inline-flex; align-items: center; gap: 0.45em; margin-top: 2.4rem; font-weight: 600; }
.more-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* --- loading skeletons (litters, dogs, photos, videos) ---
   Plain static markup sitting inside #litter-list / #dogs-female /
   #dogs-male / #photo-grid / #video-grid from the start — no JS
   timing logic needed. The matching render*() function in main.js
   always overwrites that container's innerHTML unconditionally
   (whether there's real data or an empty-state message), so these
   simply vanish the moment that happens. aria-hidden + inert since
   they carry no real content for assistive tech. */
.skeleton-entry { pointer-events: none; }
.skeleton-block {
  background: var(--bg-soft);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
html[data-theme="dark"] .skeleton-block::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.skeleton-lines { display: flex; flex-direction: column; gap: 0.6rem; padding-top: 0.3rem; }
.skeleton-photo-tile { width: 140px; height: 140px; border: 1px solid var(--line); }
.skeleton-video-tile { aspect-ratio: 16 / 9; border: 1px solid var(--line); }

/* --- scroll reveal ---
   Applied only via JS (see initScrollReveal in main.js), so pages
   stay fully visible with JS off or without IntersectionObserver
   support — this is a progressive enhancement, never load-bearing. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- hero --- */
.hero {
  padding: 1.75rem 0;
  background: radial-gradient(120% 100% at 15% 0%, #F5F1E2 0%, var(--bg) 55%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.75rem;
  align-items: center;
}
.hero-copy p.lede { font-size: 1.22rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 1rem; margin-top: 0.95rem; flex-wrap: wrap; }
.hero-actions .btn { flex: 1 1 0; justify-content: center; white-space: nowrap; }
.hero-secondary-actions { display: flex; gap: 1rem; margin-top: 0.85rem; flex-wrap: wrap; }
.hero-secondary-actions .btn { flex: 1 1 0; justify-content: center; }
.hero-art { position: relative; }
.photo-frame {
  position: relative;
  border: 1px solid var(--line);
  padding: 10px;
  background: var(--surface);
  box-shadow: 0 18px 40px -20px rgba(33, 42, 28, 0.28);
}
.photo-frame img { width: 100%; height: auto; display: block; }
.photo-frame .placeholder {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, var(--bg-soft), #E4DFC9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem;
  border: 1px dashed var(--line);
}

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 480px; }
}

/* --- litter logbook --- */
.section-anchor { scroll-margin-top: 100px; }
.litter-list { border-top: 1px solid var(--line); }
.litter-entry {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 2.5rem;
  padding: 1.4rem var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  border-bottom: 1px solid var(--line);
  border-radius: 4px;
  scroll-margin-top: 100px;
  transition: background-color 140ms ease;
}
.litter-entry:hover { background: var(--bg-soft); }
.section-soft .litter-entry:hover { background: var(--bg-soft-2); }
.litter-meta { padding-top: 0.2rem; }
.litter-date {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--ink);
  display: block;
}
.litter-status {
  display: inline-block;
  margin-top: 0.45em;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green-deep);
  background: #E7F1DF;
  padding: 0.3em 0.8em;
  border-radius: 3px;
}
.litter-status.is-expected { color: var(--tan-deep); background: #F6EBD8; }
.litter-status.is-placed { color: var(--ink-soft); background: var(--bg-soft); }

.litter-body h3 { margin-bottom: 0.2em; }
.litter-body h3 a { color: inherit; text-decoration: none; }
.litter-body h3 a:hover, .litter-body h3 a:focus-visible {
  color: var(--green-deep);
  text-decoration: underline;
}
.litter-parents { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 0.9em; }
.litter-parents strong { color: var(--ink); font-weight: 700; }

.litter-parents-panel {
  display: flex;
  gap: 1.6rem;
  margin: 1rem 0 1.4rem;
  flex-wrap: wrap;
}
.parent-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  width: 210px;
}
.parent-card.parent-card-plain { cursor: default; }
.parent-photo {
  width: 208px;
  height: 208px;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.parent-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.parent-card:hover .parent-photo img, .parent-card:focus-visible .parent-photo img {
  transform: scale(1.06);
}
.parent-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
  border: 1px dashed var(--line);
  box-sizing: border-box;
}
.parent-name {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.7em;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
}
.parent-card:hover .parent-name, .parent-card:focus-visible .parent-name { color: var(--green-deep); }
.parent-role { margin-top: 1.1em; color: var(--ink-soft); font-size: 0.9rem; }
.parent-external { color: var(--ink-soft); font-size: 0.85em; }
.gender-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.92rem;
  flex-shrink: 0;
}
.gender-badge.female { background: var(--female); }
.gender-badge.male { background: var(--male); }

@media (max-width: 480px) {
  .litter-parents-panel { gap: 0.8rem; }
}

.placeholder-thumb {
  width: 140px;
  height: 140px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--bg-soft);
  text-align: center;
  padding: 0.5em;
}

/* --- news posts (mixed into "Senaste nytt" alongside litters) --- */
.news-post-media {
  display: block;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0;
  margin-bottom: 1.1rem;
  cursor: pointer;
}
.news-post-media img { width: 100%; height: auto; display: block; }
.news-post-media-placeholder {
  width: 100%;
  max-width: 420px;
  height: 220px;
  margin-bottom: 1.1rem;
}

@media (max-width: 660px) {
  .litter-entry { grid-template-columns: 1fr; gap: 0.8rem; }
  .litter-meta { display: block; }
  .litter-date { font-size: 1.2rem; }
  .litter-status { margin-top: 0.4em; }
  .litter-parents-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
  }
  .parent-card { width: auto; }
  .parent-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

/* --- dogs (males/females) --- */
.dog-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 2.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.dog-row:first-child { border-top: 1px solid var(--line); }
.dog-portrait .placeholder {
  aspect-ratio: 1/1;
  border: 1px dashed var(--line);
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--ink-soft); text-align: center; padding: 0.8rem;
}
.dog-row h3 { margin-bottom: 0.15em; }
.dog-sub { color: var(--green-deep); font-weight: 700; font-size: 0.98rem; margin-bottom: 0.7em; }
.dog-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0.9em 0 0.3em; padding: 0; list-style: none; font-size: 1rem; color: var(--ink-soft); }
.dog-facts li strong { color: var(--ink); }

@media (max-width: 660px) {
  .dog-row { grid-template-columns: 120px 1fr; }
}

/* --- dogs overview list (dogs.html) --- */
.dog-list { border-top: 1px solid var(--line); }
.dog-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.8rem;
  align-items: center;
  padding: 0.9rem var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  overflow: hidden;
  transition: background-color 140ms ease;
}
.dog-card:hover, .dog-card:focus-visible {
  background: var(--bg-soft);
}
.section-soft .dog-card:hover, .section-soft .dog-card:focus-visible {
  background: var(--bg-soft-2);
}
.dog-card-thumb {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  transition: transform 300ms ease;
}
.dog-card:hover .dog-card-thumb, .dog-card:focus-visible .dog-card-thumb {
  transform: scale(1.06);
}
.dog-card-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  border-style: dashed;
}
.dog-card h3 { margin-bottom: 0.15em; }
.dog-card .dog-sub { margin-bottom: 0; }
.dog-card-link {
  display: inline-block;
  margin-top: 0.7em;
  font-weight: 700;
  color: var(--green-deep);
}
.dog-card:hover .dog-card-link, .dog-card:focus-visible .dog-card-link { color: var(--ink); }

@media (max-width: 660px) {
  .dog-card { grid-template-columns: 100px 1fr; gap: 1.2rem; }
  .dog-card-thumb { width: 100px; height: 100px; }
}

/* --- dog profile page (dog.html) --- */
.back-link {
  display: inline-block;
  margin-bottom: 1.8rem;
  font-weight: 600;
}
.share-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--green-deep);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.share-btn:hover, .share-btn:focus-visible { color: var(--ink); }
.dog-hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: start;
}
.dog-hero-info h1 { margin-bottom: 0.2em; }
.dog-hero-info .dog-sub { font-size: 1.05rem; }
@media (max-width: 780px) {
  .dog-hero { grid-template-columns: 1fr; }
}

.profile-section { padding: 2.2rem 0; border-top: 1px solid var(--line); }

/* --- video gallery --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem 1.8rem;
  margin-top: 1.25rem;
}
.video-card {
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
  padding: 0;
  font-family: var(--font-body);
}
.video-card:hover .play-badge, .video-card:focus-visible .play-badge {
  background: var(--green-deep);
  transform: translate(-50%, -50%) scale(1.06);
}
.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: #10140D;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(36, 54, 31, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 140ms ease, transform 140ms ease;
}
.play-badge svg { margin-left: 4px; }
.video-card .video-info { display: block; padding: 1.1rem 1.2rem 1.3rem; }
.video-card h3 { font-size: 1.12rem; margin-bottom: 0.3em; }
.video-card p { font-size: 0.98rem; margin: 0; }
.video-empty {
  border: 1px dashed var(--line);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

/* --- photo gallery (also used for litter photos, and dog-profile
   galleries — one consistent tile size everywhere) --- */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}
.litter-photo-grid { margin-top: 1.1rem; }
.photo-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0;
  cursor: pointer;
  display: block;
  width: 140px;
  overflow: hidden;
}
.photo-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--bg-soft);
  transition: transform 300ms ease;
}
.photo-card:hover img, .photo-card:focus-visible img {
  transform: scale(1.06);
}
.photo-card figcaption {
  padding: 0.6rem 0.7rem 0.7rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: left;
}
.photo-empty {
  border: 1px dashed var(--line);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--ink-soft);
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(15, 18, 12, 0.94);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  z-index: 100; padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox-media { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.lightbox-media img, .lightbox-media video { max-width: min(920px, 88vw); max-height: 72vh; display: block; }
.lightbox-caption {
  color: #EDEAD9; margin: 1rem 0 0; text-align: center;
  font-size: 0.98rem; max-width: 60ch;
}
.lightbox-counter { color: #9CA68C; margin: 0.4rem 0 0; font-size: 0.88rem; text-align: center; }
.lightbox-close {
  position: absolute; top: 1.4rem; right: 1.6rem;
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.8rem; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.lightbox-close:hover, .lightbox-close:focus-visible { background: rgba(255,255,255,0.24); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 52px; height: 52px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background-color 140ms ease;
  z-index: 1;
}
.lightbox-nav:hover, .lightbox-nav:focus-visible { background: rgba(255,255,255,0.24); }
.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }
@media (max-width: 640px) {
  .lightbox-nav { width: 44px; height: 44px; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

/* --- misc content pages --- */
.prose { max-width: 68ch; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 780px) {
  .two-col { grid-template-columns: 1fr; }
}

.contact-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.contact-list li { padding: 0.75em 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
.contact-list li strong { display: inline-block; min-width: 120px; color: var(--ink); }

/* --- 404 page --- */
.error-page {
  text-align: center;
  padding: 2rem 0 2.5rem;
}
.error-page img { margin: 0 auto 1.5rem; max-width: 280px; }
.error-page p { margin-left: auto; margin-right: auto; }
.error-page .btn { margin-top: 1.5rem; }
