:root {
  /* Seashell garnet afternoon — full palette */
  --warm-white: #F6C992;  /* warm white  */
  --dark-pink:  #F0525C;  /* dark pink   */
  --light-blue: #ACC0D3;  /* light blue  */
  --light-pink: #D396A6;  /* light pink  */
  --teal:       #09A1A1;  /* teal        */
  --dark-blue:  #5484A4;  /* dark blue   */

  /* Site tokens mapped from palette */
  --tan:        #F6C992;  /* warm white  — tags, logos, decorative */
  --tan-light:  #FBE4C4;  /* warm white light */
  --tan-dark:   #F0525C;  /* dark pink   — buttons, links, active  */
  --black:      #1E2E38;  /* deep navy   — header, footer, body text */
  --off-white:  #FBF5EC;  /* warm page background */
  --gray:       #5484A4;  /* dark blue   — secondary text */
  --gray-light: #E4EDF4;  /* light blue tint — subtle backgrounds */
  --green:      #09A1A1;  /* teal        — available badge */
  --green-light:#D9F2F2;  /* teal light */
  --red:        #c0392b;
  --red-light:  #fdf0ee;
  --amber:      #D396A6;  /* light pink  — pending badge */
  --amber-light:#F5E4EA;  /* light pink light */
  --radius: 10px;
  --shadow: 0 2px 12px rgba(30,46,56,0.10);
  --shadow-lg: 0 6px 32px rgba(30,46,56,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(--dark-pink);
  color: #fff;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(240,82,92,0.4);
}

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

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

.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 span {
  color: var(--tan);
}

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

nav a {
  color: rgba(255,255,255,0.8);
  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, #1E2E38 0%, #2A4050 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-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: 320px;
    order: -1;
  }
  .hero-home-text {
    padding: 2.5rem 1.5rem 3rem;
  }
}

.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: #c93a45;
  box-shadow: 0 4px 14px rgba(240,82,92,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(--black);
}

.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(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.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: 1rem 1.2rem;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dog-card-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-pink);
}

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

.dog-card-desc {
  font-size: 0.82rem;
  color: var(--black);
  opacity: 0.7;
  line-height: 1.5;
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.dog-card-desc.expanded {
  display: block;
  overflow: visible;
}

.dog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.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 {
  display: block;
  text-align: center;
  background: var(--dark-pink);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem;
  text-decoration: none;
  transition: background 0.15s;
  margin-top: auto;
}

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

/* ── 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(--tan-dark); }

.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(--tan-dark);
  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: #FDFAF7;
  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(--tan-dark);
  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 #C8D8E4;
  border-radius: 7px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #FDFAF7;
  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(246,201,146,0.25);
}

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(--black);
  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); }

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

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

/* ── 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: 56px; }
  .logo { font-size: 1.05rem; }
  nav a { padding: 0.35rem 0.65rem; font-size: 0.85rem; }
}

@media (max-width: 480px) {
  nav { gap: 0 }
  nav a { padding: 0.35rem 0.5rem; }
}
