/*
  Kennel Stugguhaugen — styles
  - Modern, accessible, mobile-first CSS
  - System supports light/dark via prefers-color-scheme and toggle
*/
:root {
  --bg: #0f1720;
  --surface: #111927;
  --surface-2: #0d1b2a;
  --text: #e6edf3;
  --muted: #9fb0c3;
  --primary: #7cc4ff;
  --primary-ink: #0b1320;
  --accent: #a7f3d0;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --ring: rgba(124, 196, 255, 0.45);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.25);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7fbff;
    --surface: #ffffff;
    --surface-2: #f2f6fb;
    --text: #0b1320;
    --muted: #4a5b75;
    --primary: #0066ff;
    --accent: #00c2a8;
    --ring: rgba(0, 102, 255, 0.25);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
  }
}
/* manual toggle */
[data-theme="dark"] {
  --bg: #0f1720;
  --surface: #111927;
  --surface-2: #0d1b2a;
  --text: #e6edf3;
  --muted: #9fb0c3;
  --primary: #7cc4ff;
  --accent: #a7f3d0;
  --ring: rgba(124, 196, 255, 0.45);
}
[data-theme="light"] {
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-2: #f2f6fb;
  --text: #0b1320;
  --muted: #4a5b75;
  --primary: #0066ff;
  --accent: #00c2a8;
  --ring: rgba(0, 102, 255, 0.25);
}

/* Custom font for brand title */
@font-face {
  font-family: "Chicle";
  src: url("/assets/font/Chicle-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg); /* simplified solid background */
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}
.section {
  padding: clamp(2.2rem, 5vw, 4.6rem) 0; /* tighter vertical rhythm */
}
.section--alt {
  background: var(--surface-2);
}
.section--accent {
  background: var(--surface); /* remove accent gradient */
}

h1,
h2,
h3 {
  line-height: 1.06;
  margin: 0 0 0.5em; /* reduced bottom margin */
}
h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}
/* Chicle display for brand line in hero */
.hero-brand {
  display: block;
  font-family: "Chicle", "Outfit", system-ui, -apple-system, Segoe UI, Roboto,
    sans-serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.2px;
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
}
p {
  color: var(--muted);
  margin: 0 0 0.85rem; /* tighter spacing */
  font-weight: 400;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}
.sr-only {
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--text) 15%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
}
.brand {
  min-width: 0;
}
.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 24px;
  line-height: 1.2;
  font-family: "Chicle", "Outfit", system-ui, -apple-system, Segoe UI, Roboto,
    sans-serif;
  font-weight: 400;
  margin-left: 0.2rem;
}
/* Allow brand to actually grow; remove ellipsis when very narrow */
@media (max-width: 600px) {
  .brand {
    flex: 1 1 auto;
  }
  .brand-text {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}
.brand-text {
  letter-spacing: 0.2px;
}
/* Avoid excessive truncation on very small screens */
@media (max-width: 420px) {
  .brand-text {
    white-space: normal;
    line-height: 1.1;
    font-size: 0.98rem;
    max-width: 60vw;
  }
}
.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--primary);
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  color: var(--muted);
  font-weight: 500;
}
.site-nav a:hover {
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  color: var(--text);
}
.site-nav .btn--primary {
  color: #fff;
  background: var(--primary);
  border-color: color-mix(in oklab, var(--primary) 60%, black);
}
.site-nav .btn--primary:hover {
  filter: brightness(0.95);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  border-radius: 0.6rem;
}
.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  border-radius: 1px;
}
.mode-toggle,
.lang-toggle {
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--text) 15%, transparent);
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }
  /* Force-hide nav until opened; simpler than transform approach */
  .site-nav {
    display: none;
  }
  .site-nav.open {
    display: block;
  }
  .site-nav.open {
    position: fixed;
    inset: 56px 0 0 0; /* sit below sticky header so brand and X remain visible */
    background: var(--surface); /* solid for readability */
    overflow-y: auto;
    z-index: 99999; /* ensure above all content */
    pointer-events: auto;
    animation: fadeSlide 0.25s ease;
  }
  @keyframes fadeSlide {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1rem 1rem 2.25rem;
  }
  .site-nav a,
  .site-nav button {
    width: 100%;
    text-align: left;
    padding: 0.9rem 0.5rem;
    font-size: 1.1rem;
    line-height: 1.3;
    border-radius: 0.6rem;
  }

  /* Neutralize sticky/backdrop-filter so fixed nav isn't trapped in mobile Safari */
  .site-header.menu-open {
    position: static;
    backdrop-filter: none;
  }
}

/* disable body scroll when nav open */
.no-scroll,
body.no-scroll {
  overflow: hidden;
}

/* hamburger animation */
.nav-toggle {
  position: relative;
}
.nav-toggle .bar {
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open .bar:nth-child(2) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open .bar:nth-child(3) {
  opacity: 0;
}
.nav-toggle.open .bar:nth-child(4) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  transition: 0.2s;
}
.btn--primary {
  background: var(--primary);
  color: white;
  border-color: color-mix(in oklab, var(--primary) 60%, black);
}
.btn--primary:hover {
  filter: brightness(0.95);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: color-mix(in oklab, var(--text) 20%, transparent);
}
.btn--ghost:hover {
  background: color-mix(in oklab, var(--text) 8%, transparent);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  /* extra space at bottom to breathe around wave and content */
  padding-bottom: clamp(
    4rem,
    8vw,
    6rem
  ); /* wave removed, reduce excess space */
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr; /* align image and text */
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1; /* keep content above the decorative wave */
}
.hero-copy p {
  font-size: 1.05rem;
}
.hero-cta {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
  margin-bottom: 0.3rem; /* tighter spacing */
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.trust-badges li {
  background: color-mix(in oklab, var(--accent) 18%, transparent);
  color: color-mix(in oklab, var(--accent) 90%, black);
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
}
.hero-media {
  position: relative; /* ensure z-index applies */
  z-index: 2; /* keep image above the gradient hills */
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
@media (min-width: 921px) {
  .hero-media {
    transform: none; /* align image with text */
  }
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* hero-wave removed */

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-media {
    order: -1;
  }
}

/* Grid helpers */
.grid {
  display: grid;
  gap: 1.4rem;
}
.grid.two {
  grid-template-columns: 1.1fr 0.9fr;
}
@media (max-width: 920px) {
  .grid.two {
    grid-template-columns: 1fr;
  }
}

.cards {
  display: grid;
  gap: 1rem;
}
.cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 920px) {
  .cards.three {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card img {
  width: 100%;
  aspect-ratio: 16/11;
  object-fit: cover;
}
.card .card-body {
  padding: 1rem;
}
.card.dog .meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0.6rem;
  padding: 0;
  margin: 0.6rem 0 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}
.card.highlight {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.4rem;
}

/* About */
.about-card {
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.about-highlight {
  /* lighter background than the section */
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: 0.8rem;
  padding: 1rem;
}
.about-highlight h3 {
  margin: 0 0 0.4rem;
}
.pill-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.pill {
  background: color-mix(in oklab, var(--primary) 12%, transparent);
  color: color-mix(in oklab, var(--primary) 80%, black);
  border: 1px solid color-mix(in oklab, var(--primary) 40%, transparent);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Puppies */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.6rem;
}
.timeline li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 0.6rem;
}
.timeline .dot {
  width: 12px;
  height: 12px;
  margin-top: 0.35rem;
  background: var(--primary);
  border-radius: 999px;
  box-shadow: 0 0 0 4px var(--ring);
}

/* Health */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
/* responsive auto-fit grid above handles row/column wrapping */

/* Facilities media */
.facility-media {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.facility-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.gallery-item {
  display: block;
  border-radius: 0.8rem;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.03);
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] {
  display: none !important;
}
.lightbox:not([hidden]) {
  display: grid;
  place-items: center;
}
.lightbox img {
  width: min(92vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 0.6rem;
  box-shadow: var(--shadow);
  background: #000;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #0008;
  color: #fff;
  border: 0;
  border-radius: 0.6rem;
  width: 42px;
  height: 42px;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Contact */
.contact-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.contact-link {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border: 1px solid color-mix(in oklab, var(--text) 14%, transparent);
  border-radius: 0.6rem;
}
.card.map {
  padding: 0;
}
.map-embed {
  position: relative;
  padding-bottom: 62%;
  height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  border-radius: 1rem; /* rounded corners */
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit; /* ensure iframe respects rounding */
}
.map-note {
  margin: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Forms */
.interest {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1rem;
}
.interest h3 {
  margin-top: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.6rem 0 0.8rem;
}
.form-grid label,
.block {
  display: grid;
  gap: 0.35rem;
}
label span {
  font-weight: 600;
  color: var(--text);
}
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid color-mix(in oklab, var(--text) 16%, transparent);
  border-radius: 0.6rem;
  padding: 0.6rem 0.7rem;
  font: inherit;
}
input:focus,
textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.form-actions {
  margin-top: 0.8rem;
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 820px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Pricing */
.pricing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}
.pricing-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dashed color-mix(in oklab, var(--text) 12%, transparent);
}
.pricing-list li:last-child {
  border-bottom: 0;
}
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.price-row h3 {
  margin: 0.1rem 0;
}
.price-row .price {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}
.price-row .price span {
  font-weight: 500;
  color: var(--muted);
  margin-left: 0.25rem;
}

/* Dog profiles */
.profile {
  display: grid;
  grid-template-columns: 240px 1fr; /* larger dog image */
  gap: 1.2rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
  border-radius: 1rem;
  padding: 1.1rem 1.2rem;
}
.profile-media {
  border-radius: 0.8rem;
  overflow: hidden;
}
.profile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
.profile-body .details {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  display: grid;
  gap: 0.3rem;
}
@media (max-width: 780px) {
  .profile {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  background: var(--surface-2);
  border-top: 1px solid color-mix(in oklab, var(--text) 12%, transparent);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  align-items: center;
}
.footer-inner nav {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-weight: 600;
}
.legal {
  text-align: right;
  color: var(--muted);
}
@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .legal {
    text-align: center;
  }
}
