:root {
  /* 3-color palette */
  --purple:     #462aa7;  /* deep purple  */
  --pink:       #bf2c8f;  /* vibrant pink */
  --taupe:      #9E9A88;  /* warm gray    */

  /* Site tokens mapped from palette */
  --warm-white: #E5E2D5;  /* light taupe   — tags, logos, decorative */
  --dark-pink:  #bf2c8f;  /* pink         — buttons, links, active  */
  --light-blue: #A89FD8;  /* lavender     — file upload borders */
  --light-pink: #E0A8D4;  /* light pink   */
  --teal:       #09A1A1;  /* teal         — available badge */
  --dark-blue:  #9E9A88;  /* taupe        */

  --tan:        #E5E2D5;  /* light taupe   — accents, highlights */
  --tan-light:  #EAE7DA;  /* lighter taupe */
  --tan-dark:   #bf2c8f;  /* pink         — buttons, links, active */
  --black:      #44433c;  /* text taupe   — text, dark backgrounds */
  --off-white:  #9E9A88;  /* taupe page background */
  --gray:       #44433c;  /* text taupe   — secondary text */
  --gray-light: #E2DFD2;  /* light taupe    — subtle backgrounds */
  --green:      #09A1A1;  /* teal         — available badge */
  --green-light:#D9F2F2;  /* teal light */
  --red:        #c0392b;
  --red-light:  #fdf0ee;
  --amber:      #BDB9A8;  /* muted taupe  — pending badge */
  --amber-light:#ECEAE4;  /* light taupe */
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 6px 32px rgba(0,0,0,0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--off-white);
  color: var(--black);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

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

/* ── Header ── */
header {
  background: var(--pink);
  color: #fff;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(191,44,143,0.4);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  flex-shrink: 0;
}

.logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  color: #fff;
  font-size: 1.08rem;
}

.logo-paw {
  font-size: 1.5rem;
}

.logo-dog {
  display: inline-block;
  width: 36px;
  height: 29px;
  background-color: var(--tan);
  -webkit-mask-image: url('../images/gsd_shape.svg');
  mask-image: url('../images/gsd_shape.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  flex-shrink: 0;
  transform: scaleX(-1);
}

.logo-img {
  height: 86px;
  width: auto;
  flex-shrink: 0;
}

nav {
  display: flex;
  gap: 0.25rem;
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

nav a:hover, nav a.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ── Hero ── */
.hero-home {
  background: linear-gradient(135deg, #1e1060 0%, #462aa7 100%);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

.hero-home-text {
  padding: 4.5rem 3rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-home-img {
  overflow: hidden;
}

.hero-home-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-headline {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-logo {
  display: none;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: 50%;
}

.hero-home h1 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-home h1 span { color: var(--tan); }

.hero-home p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 480px;
  margin-bottom: 2rem;
}

@media (max-width: 700px) {
  .hero-home {
    grid-template-columns: 1fr;
  }
  .hero-home-img {
    height: 440px;
    order: -1;
  }
  .hero-home-img img {
    object-position: center 15%;
  }
  .hero-home-text {
    padding: 2.5rem 1.5rem 3rem;
  }
  .hero-logo {
    display: block;
  }
  .hero-home h1 {
    margin-bottom: 0;
  }
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
  border: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--dark-pink);
  color: #fff;
}

.btn-primary:hover {
  background: #9e2478;
  box-shadow: 0 4px 14px rgba(191,44,143,0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: var(--tan);
  color: var(--tan);
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Section wrapper ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.section-sub {
  color: var(--gray);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* ── Dog Grid ── */
.dogs-bg {
  background: var(--purple);
}

.dogs-bg .section-title,
.dogs-bg .section-sub {
  color: #fff;
}

.dogs-bg .section-sub {
  opacity: 0.75;
}

.dog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  align-items: start;
}



.dog-card {
  background: var(--off-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.dog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dog-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--off-white);
}

.dog-card-img-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.dog-card-info {
  padding: 0.05rem 0.9rem 0.05rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dog-card-name {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
}

.dog-card-meta {
  font-size: 0.78rem;
  color: var(--gray);
}

.dog-card-desc {
  font-size: 0.8rem;
  color: var(--black);
  opacity: 0.75;
  line-height: 1.5;
  text-align: left;
}

.dog-card-expandable {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
  overflow: hidden;
  width: 100%;
}

.dog-card-expandable-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.3rem;
}

.dog-card-expandable.open {
  grid-template-rows: 1fr;
}

.dog-card-actions {
  display: flex;
}

.dog-card-toggle {
  background: #9e2478;
  border: none;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.1rem 0.6rem;
  transition: background 0.15s;
  white-space: nowrap;
}

.dog-card-toggle:hover {
  background: #861d6e;
}

.dog-card-toggle-arrow {
  display: inline-block;
  font-size: 0.68rem;
}

.dog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-start;
}

.dog-card-tag {
  font-size: 0.68rem;
  background: var(--warm-white);
  color: var(--black);
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
}

.dog-card-adopt-btn {
  flex: 1;
  display: block;
  text-align: center;
  background: var(--dark-pink);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.1rem;
  text-decoration: none;
  transition: background 0.15s;
}

.dog-card-adopt-btn:hover { background: #9e2478; }

@media (max-width: 600px) {
  .section-title,
  .section-sub { text-align: center; }

  .dog-grid { gap: 3px; }
  .dog-card { background: var(--dark-pink); cursor: pointer; }
  .dog-card-info { padding: 0.1rem 0.2rem 0.1rem; gap: 0; }
  .dog-card-name { font-size: 0.82rem; line-height: 1.1; color: #fff; }
  .dog-card-toggle { display: none; }
  .dog-card-actions { display: none; }

  .dog-card.mobile-expanded {
    grid-column: 1 / -1;
  }
  .dog-card.mobile-expanded .dog-card-img {
    aspect-ratio: auto;
    object-fit: contain;
    width: 100%;
    background: var(--dark-pink);
  }
  .dog-card.mobile-expanded .dog-card-name {
    font-size: 1.6rem;
  }
  .dog-card.mobile-expanded .dog-card-info {
    padding: 0.5rem 0.9rem 0.4rem;
  }
  .dog-card.mobile-expanded .dog-card-desc {
    color: #fff;
    opacity: 0.9;
  }
  .dog-card.mobile-expanded .dog-card-meta {
    color: rgba(255,255,255,0.75);
  }
  .dog-card.mobile-expanded .dog-card-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
  }
  .dog-card.mobile-expanded .dog-card-actions {
    display: flex;
  }
  .dog-card.mobile-expanded .dog-card-adopt-btn {
    background: #fff;
    color: var(--purple);
    font-size: 0.9rem;
    padding: 0.4rem;
  }
  .dog-card.mobile-expanded .dog-card-adopt-btn:hover {
    background: var(--off-white);
  }
}

/* ── Dog Detail Page ── */
.dog-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.dog-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  transition: color 0.15s;
}

.dog-detail-back:hover { color: var(--purple); }

.dog-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 640px) {
  .dog-detail-grid { grid-template-columns: 1fr; }
}

.dog-detail-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 420px;
  box-shadow: var(--shadow);
}

.dog-detail-info h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.dog-detail-info .badge {
  font-size: 0.8rem;
  margin-bottom: 1.2rem;
  display: inline-block;
}

.detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1rem;
  margin-bottom: 1.4rem;
}

.fact-item { font-size: 0.88rem; }
.fact-label { color: var(--gray); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }

.compat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.compat-tag {
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-weight: 500;
}

.compat-yes { background: var(--green-light); color: var(--green); }
.compat-no  { background: var(--red-light); color: var(--red); }

.dog-detail-desc {
  font-size: 0.97rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 1.8rem;
}

.traits-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.trait-tag {
  background: var(--tan-light);
  color: var(--purple);
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-weight: 500;
  text-transform: capitalize;
}

/* ── Adoption Form ── */
.form-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.form-page h1 {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.form-page .subtitle {
  color: var(--gray);
  margin-bottom: 2.5rem;
}

.form-section {
  background: #E8E5D8;
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
  margin-bottom: 1.4rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--tan-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr; }
}

.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 0.87rem;
  font-weight: 600;
  color: #333;
}

label .req { color: var(--red); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #C8C4B0;
  border-radius: 7px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #F0EDE4;
  color: var(--black);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--tan-dark);
  box-shadow: 0 0 0 3px rgba(70,42,167,0.18);
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}

textarea { resize: vertical; min-height: 90px; }

.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.radio-option input, .checkbox-option input {
  width: auto;
  cursor: pointer;
  accent-color: var(--tan-dark);
}

.conditional-field {
  display: none;
  margin-top: 0.75rem;
}

.conditional-field.visible { display: block; }

.form-agree {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 1.4rem 1.8rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: #444;
  line-height: 1.7;
}

.form-agree-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.form-agree-check input {
  width: auto;
  margin-top: 3px;
  accent-color: var(--tan-dark);
  flex-shrink: 0;
}

.submit-btn {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.05rem;
}

.form-msg {
  padding: 1rem 1.2rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  display: none;
}

.form-msg.success { background: var(--green-light); color: var(--green); display: block; }
.form-msg.error   { background: var(--red-light); color: var(--red); display: block; }

/* ── About section / stats ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 560px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
}

.stat-card {
  background: var(--purple);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--tan);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* ── How it works ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.step {
  text-align: center;
  padding: 1.5rem 1rem;
}

.step-num {
  width: 44px;
  height: 44px;
  background: var(--tan);
  color: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 0.9rem;
}

.step h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.88rem; color: var(--gray); }

/* ── File Upload ── */
.form-section-optional {
  font-weight: 400;
  text-transform: none;
  font-size: .82rem;
  letter-spacing: 0;
  color: var(--gray);
}

.file-upload-area {
  border: 2px dashed var(--light-blue);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1rem;
  text-align: center;
  background: var(--gray-light);
  transition: border-color .15s, background .15s;
}

.file-upload-area.drag-over {
  border-color: var(--tan-dark);
  background: var(--tan-light);
}

.file-input-hidden { display: none; }

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  font-size: .95rem;
  color: var(--black);
}

.file-upload-label:hover strong { color: var(--purple); }

.file-upload-icon { font-size: 1.8rem; line-height: 1; }

.file-upload-hint {
  display: block;
  font-size: .78rem;
  color: var(--gray);
  margin-top: .1rem;
}

.file-list {
  list-style: none;
  margin-top: .75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.file-list li {
  display: flex;
  align-items: center;
  background: #F0EDE4;
  border: 1px solid var(--light-blue);
  border-radius: 6px;
  padding: .4rem .75rem;
  font-size: .87rem;
  gap: .5rem;
}

.file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  font-size: .78rem;
  color: var(--gray);
  flex-shrink: 0;
}

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  font-size: .95rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.file-remove:hover { color: var(--red); }

/* ── Footer ── */
footer {
  background: var(--purple);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
}

footer strong { color: var(--tan); }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: var(--tan);
  background: rgba(255,255,255,0.10);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  background: var(--pink);
  color: #fff;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  display: block;
}

/* ── Utility ── */
.loading {
  text-align: center;
  padding: 4rem;
  color: var(--gray);
  font-size: 1rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray);
}

.empty-state p { margin-top: 0.5rem; font-size: 0.95rem; }

.energy-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}

.energy-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray); }

.energy-dots {
  display: flex;
  gap: 4px;
}

.energy-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-light);
}

.energy-dot.filled { background: var(--tan); }

/* ── Not found / error page ── */
.not-found {
  text-align: center;
  padding: 5rem 1.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.not-found h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.not-found p { color: var(--gray); margin-bottom: 1.5rem; }

@media (max-width: 768px) {
  .header-inner { height: 72px; }
  .logo { font-size: 0.8rem; }
  .logo-img { height: 56px; }
  nav a { padding: 0.35rem 0.65rem; font-size: 0.85rem; }
}

@media (max-width: 600px) {
  .nav-toggle { display: flex; }

  .logo-img { display: none; }

  nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--pink);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 99;
    gap: 0;
  }

  nav.open { display: flex; }

  nav a {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  nav a:last-child { border-bottom: none; }
}
