/* =========================================
   styles.css for Happy Tails
   ========================================= */

/* ===== 1. DESIGN TOKENS: my colors and fonts ===== */
:root {
  --cream: #fff8ef;     /* page background */
  --brown: #3b2a1e;     /* text, header and footer */
  --orange: #b4501a;    /* links, buttons, accents */
  --tan: #f3d9b8;       /* light accent */
  --white: #ffffff;     /* cards */

  --font-heading: 'Fredoka', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', Arial, sans-serif;
}

/* ===== 2. BASE: the whole page ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--brown);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
}

a {
  color: var(--orange);
  font-weight: 700;
}

a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ===== 3. HEADER AND NAVIGATION ===== */
.site-header {
  background-color: var(--brown);
  color: var(--cream);
  text-align: center;
  padding: 1.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: 2.25rem;
}

.tagline {
  margin: 0;
}

nav ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

nav a {
  color: var(--cream);
  text-decoration: none;
}

nav a:hover {
  color: var(--tan);
  text-decoration: underline;
}

/* ===== 4. MAIN CONTENT ===== */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* Hero */
.hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}

.hero h2 {
  font-size: 2.25rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  background-color: var(--orange);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
}

.button:hover {
  background-color: var(--brown);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background-color: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(59, 42, 30, 0.15);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card h3 {
  font-size: 1.4rem;
  margin: 1rem 1.25rem 0.25rem;
}

.card p {
  margin: 0 1.25rem 1.25rem;
}

/* Horizontal rule */
hr {
  border: none;
  height: 4px;
  width: 80px;
  margin: 2.5rem auto;
  background-color: var(--orange);
  border-radius: 2px;
}

/* ===== 5. FOOTER ===== */
.site-footer {
  background-color: var(--brown);
  color: var(--cream);
  text-align: center;
  padding: 1.5rem;
}

.site-footer a {
  color: var(--tan);
}

/* ===== 6. RESPONSIVE: tablets and desktops ===== */
@media (min-width: 768px) {

  .site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 1.5rem 2.5rem;
  }

  nav ul {
    margin-top: 0;
  }

  .hero h2 {
    font-size: 3rem;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

}
