:root {
  --primary: #1F2937;
  --primary-light: #374151;
  --accent: #F97316;
  --accent-hover: #EA580C;
  --bg-color: #F3F4F6;
  --surface: #FFFFFF;
  --text: #111827;
  --text-muted: #6B7280;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #111827;
    --primary-light: #1F2937;
    --accent: #F97316;
    --accent-hover: #FB923C;
    --bg-color: #030712;
    --surface: #111827;
    --text: #F9FAFB;
    --text-muted: #9CA3AF;
    --glass-bg: rgba(17, 24, 39, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
  }
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 3rem;
}

h2 {
  font-size: 2.25rem;
}

h3 {
  font-size: 1.5rem;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeIn 0.8s ease-out forwards;
}

main.container {
  flex-grow: 1;
  padding: 10rem 1.5rem 4rem;
  /* combine container padding with top padding */
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 6rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links li {
  position: relative;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.5rem 0;
  display: inline-block;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
}

.nav-links li:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  display: block;
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background: var(--bg-color);
  color: var(--accent);
}

.dropdown-submenu-parent {
  position: relative;
}

.dropdown-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  transform: translateX(10px);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 0.5rem;
}

.dropdown-submenu-parent:hover .dropdown-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4rem;
  display: flex;
  align-items: flex-start;
  /* Aligns content to top */
  justify-content: flex-end;
  /* Aligns content to right */
  min-height: 85vh;
  box-shadow: var(--shadow-lg);
  padding-top: 8rem;
  /* Account for fixed header */
}

.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  /* Extra height for parallax movement */
  object-fit: cover;
  z-index: 1;
  transform-origin: center top;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: right;
  /* Right align text */
  color: #fff;
  padding: 2rem 4rem;
  max-width: 600px;
  /* More compact for corner alignment */
  width: 100%;
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  /* Much more transparent */
  backdrop-filter: blur(8px);
  /* Reduced blur for clarity */
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Subtle border */
  border-radius: var(--radius);
  box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.2);
}

.hero-intro {
  padding: 2.5rem;
  margin-top: 2rem;
}

.hero-intro br {
  margin-bottom: 0.5rem;
  display: block;
  content: "";
}

.hero-overlap-section {
  margin-top: -4rem;
  position: relative;
  z-index: 10;
}

.hero-intro-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  align-items: center;
}

.hero-intro.glass-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  text-align: center;
  max-width: 800px;
}

.hero-intro h2 {
  color: var(--text);
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
}

.hero-intro p.intro-lead {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-intro p.intro-lead em {
  color: var(--accent);
}

.hero-intro p.intro-wish {
  font-size: 1rem;
  opacity: 0.8;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero-intro p.intro-signature {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 600;
  color: var(--text);
}

.contact-card.glass-card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 2.5rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text);
}

.contact-item a {
  color: inherit;
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--accent);
}

.hero-content h1 {
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  color: #fff;
}

/* Feature/Info Section */
.info-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  align-items: start;
}

@media(min-width: 900px) {
  .info-section {
    grid-template-columns: 1fr 400px;
  }
}

.info-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.info-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: var(--transition);
}

.info-content a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

.info-image-container {
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2.5rem 2.5rem 0;
}

@media (max-width: 899px) {
  .info-content {
    padding: 2rem 1.5rem 0.5rem 1.5rem;
  }
  .info-image-container {
    padding: 0 1.5rem 2rem 1.5rem;
  }
}

.dog-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.fact-card {
  background: var(--bg-color);
  padding: 0.2rem 0.25rem;
  border-radius: 4px;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.05rem;
  transition: var(--transition);
}

.fact-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--surface);
}

.fact-label {
  font-size: 0.48rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  opacity: 0.8;
  line-height: 1.1;
  white-space: nowrap;
}

.fact-value {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  line-height: 1.1;
  white-space: nowrap;
}

.dog-label {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.dog-label.memorial {
  background: #607d8b;
  /* Respectful slate grey */
  margin-bottom: 0.75rem;
}

.info-image {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: block;
}

.pedigree-image {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* Gallery */
.gallery-section {
  margin-top: 4rem;
}

.gallery-grid {
  column-count: 3;
  column-gap: 1.5rem;
  width: 100%;
}

.gallery-item {
  display: inline-block;
  /* Required for column-count masonry */
  width: 100%;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
  z-index: 10;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (max-width: 1024px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    column-count: 1;
  }
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  padding: 1.25rem;
  background: var(--surface);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  flex-grow: 1;
  /* Fills remaining space */
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-caption {
  background: var(--accent);
  color: #fff;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

.lightbox-caption {
  color: #fff;
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: var(--transition);
}

.lightbox-close:hover {
  transform: rotate(90deg);
  color: var(--accent);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

@media (max-width: 1024px) {
  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.3);
  }
}


/* Footer */
.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 6rem;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    clip-path: circle(0% at 100% 0);
    transition: clip-path 0.4s ease-in-out;
  }

  .nav-links.active {
    clip-path: circle(150% at 100% 0);
  }

  .dropdown-menu,
  .dropdown-submenu {
    position: static;
    transform: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    display: none;
    padding-left: 1rem;
    border: none;
    border-left: 2px solid var(--glass-border);
    margin-top: 0.5rem;
  }

  .nav-links li:hover .dropdown-menu,
  .dropdown-submenu-parent:hover .dropdown-submenu {
    transform: none;
  }

  .nav-link.open+.dropdown-menu {
    display: flex;
  }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  padding: 0.75rem 2rem;
  border-radius: 100px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: auto;
  min-width: 320px;
  animation: cookieSlideUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  color: #fff;
  font-size: 0.85rem;
}

.cookie-content p {
  margin: 0;
  white-space: nowrap;
}

.cookie-banner.fade-out {
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: all 0.5s ease;
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 1rem;
    width: 90%;
    border-radius: 20px;
    padding: 1.25rem;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .cookie-content p {
    white-space: normal;
  }
}

/* Pedigree Chart */
.pedigree-container {
  width: 100%;
  overflow-x: auto;
  padding: 2rem 0;
  -webkit-overflow-scrolling: touch;
}

.pedigree-tree {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  min-width: 800px;
  justify-content: center;
  padding: 1rem;
}

.pedigree-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 1rem;
  flex: 1;
}

.pedigree-node {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  text-align: center;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pedigree-node:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.pedigree-node.empty {
  background: transparent;
  border: 1px dashed var(--glass-border);
  box-shadow: none;
  opacity: 0.3;
}

.pedigree-node.empty:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--glass-border);
}

.pedigree-node .name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.pedigree-node .name a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: var(--transition);
}

.pedigree-node .name a:hover {
  color: var(--accent-hover);
}

.pedigree-node .title {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.pedigree-node .info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Connector Lines */
.pedigree-col:not(:last-child) .pedigree-node::after {
  content: '';
  position: absolute;
  right: -2rem;
  top: 50%;
  width: 2rem;
  height: 1px;
  background: var(--glass-border);
  z-index: -1;
}

/* Branching logic for 2nd and 3rd columns */
.pedigree-col:nth-child(2) .pedigree-node:nth-child(odd)::before,
.pedigree-col:nth-child(3) .pedigree-node:nth-child(odd)::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 50%;
  width: 2rem;
  height: 50%;
  border-left: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
  border-top-left-radius: 8px;
  z-index: -1;
}

.pedigree-col:nth-child(2) .pedigree-node:nth-child(even)::before,
.pedigree-col:nth-child(3) .pedigree-node:nth-child(even)::before {
  content: '';
  position: absolute;
  left: -2rem;
  bottom: 50%;
  width: 2rem;
  height: 50%;
  border-left: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  border-bottom-left-radius: 8px;
  z-index: -1;
}

/* Mobile Navigation Pill */
.mobile-nav-pill {
  display: none;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  width: auto;
  max-width: 90vw;
  justify-content: space-around;
  gap: 1.5rem;
}

.mobile-nav-pill.hidden {
  transform: translateX(-50%) translateY(200%);
  opacity: 0;
}

.mobile-nav-pill a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--text);
  opacity: 0.6;
  font-size: 0.7rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.mobile-nav-pill a svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-nav-pill a.active {
  color: var(--accent);
  opacity: 1;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .mobile-nav-pill {
    display: flex;
  }

  .site-header .nav-links {
    display: none !important;
    /* Hide original nav links on mobile to use pill */
  }

  .menu-toggle {
    display: none !important;
  }
}