@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;

  /* HSL Color Palette - Warm Earthy & Sophisticated Tone */
  --clr-primary: hsl(28, 55%, 48%);       /* Terracotta Amber */
  --clr-primary-light: hsl(28, 65%, 94%); /* Warm Cream Tint */
  --clr-primary-dark: hsl(28, 60%, 25%);  /* Deep Earth Red-Brown */
  
  --clr-bg-main: hsl(30, 25%, 98%);       /* Soft Linen White */
  --clr-bg-card: hsl(0, 0%, 100%);        /* Crisp White */
  --clr-bg-dark: hsl(28, 20%, 10%);       /* Dark Charcoal/Chocolate */
  
  --clr-text-main: hsl(28, 20%, 12%);     /* Deep Charcoal */
  --clr-text-muted: hsl(28, 10%, 45%);    /* Warm Gray */
  --clr-text-light: hsl(30, 20%, 95%);    /* Off-white */
  
  --clr-accent: hsl(14, 75%, 50%);        /* Vibrant rust */
  --clr-border: hsl(28, 20%, 90%);        /* Muted border line */
  
  --shadow-sm: 0 2px 8px rgba(28, 15, 5, 0.04);
  --shadow-md: 0 10px 30px rgba(28, 15, 5, 0.08);
  --shadow-lg: 0 20px 50px rgba(28, 15, 5, 0.12);
  
  --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-medium: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --container-width: 1200px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg-main);
  color: var(--clr-text-main);
  line-height: 1.75;
  font-size: 1rem;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--clr-primary-dark);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  background-color: var(--clr-primary);
  border-radius: var(--radius-full);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: 0.75rem;
}

p {
  color: var(--clr-text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Layout & Utility Components
   ========================================================================== */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.section {
  padding: 8rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background-color: var(--clr-primary);
  color: white;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  transition: all var(--transition-medium);
  border: 1px solid transparent;
  box-shadow: 0 4px 15px rgba(216, 112, 43, 0.2);
}

.btn:hover {
  background-color: var(--clr-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(216, 112, 43, 0.3);
}

.badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  background-color: var(--clr-primary-light);
  color: var(--clr-primary);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem 0;
  transition: all var(--transition-medium);
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 1rem 0;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--clr-primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--clr-primary);
}

/* Hamburger Menu Button */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast);
}

.menu-toggle:hover {
  background-color: rgba(28, 15, 5, 0.05);
}

.header.scrolled .menu-toggle:hover {
  background-color: rgba(28, 15, 5, 0.05);
}

.menu-bar {
  width: 22px;
  height: 2px;
  background-color: var(--clr-primary-dark);
  border-radius: var(--radius-full);
  transition: all var(--transition-medium);
}

/* Hamburger to X state */
.menu-toggle.active .menu-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  background-color: var(--clr-text-light);
}

.menu-toggle.active .menu-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--clr-text-light);
}

/* Fullscreen Nav Overlay */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--clr-bg-dark);
  background-image: radial-gradient(circle at 80% 20%, rgba(216, 112, 43, 0.15) 0%, transparent 60%);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

.nav-links {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nav-link-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.nav-overlay.open .nav-link-item {
  opacity: 1;
  transform: translateY(0);
}

/* Cascade animations for links in overlay */
.nav-overlay.open .nav-link-item:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.open .nav-link-item:nth-child(2) { transition-delay: 0.2s; }
.nav-overlay.open .nav-link-item:nth-child(3) { transition-delay: 0.3s; }
.nav-overlay.open .nav-link-item:nth-child(4) { transition-delay: 0.4s; }

.nav-link {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--clr-text-light);
  position: relative;
  display: inline-block;
  padding: 0.5rem 1rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 50%;
  background-color: var(--clr-primary);
  transition: width var(--transition-medium) ease, left var(--transition-medium) ease;
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: white;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

.nav-link.active-page {
  color: var(--clr-primary);
}

.nav-link.active-page::after {
  width: 100%;
  left: 0;
  background-color: var(--clr-primary);
}

/* ==========================================================================
   Hero Section (Top Page)
   ========================================================================== */
.hero-home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 8rem;
  background-image: linear-gradient(135deg, hsl(30, 20%, 96%) 0%, hsl(28, 40%, 93%) 100%);
  overflow: hidden;
}

.hero-home::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 112, 43, 0.08) 0%, transparent 70%);
  top: -10%;
  right: -10%;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 550px;
}

.hero-title-main {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--clr-primary-dark);
  margin-bottom: 1.5rem;
}

.hero-title-main span {
  color: var(--clr-primary);
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-image-container {
  position: relative;
}

.hero-image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
  transition: transform var(--transition-medium);
  aspect-ratio: 4/3;
}

.hero-image-wrapper:hover {
  transform: rotate(0) scale(1.02);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg-shape {
  position: absolute;
  top: 10%;
  left: -5%;
  width: 110%;
  height: 100%;
  background-color: var(--clr-primary-light);
  border-radius: var(--radius-lg);
  z-index: -1;
  transform: rotate(-3deg);
}

/* ==========================================================================
   Dog Overview Section (Top Page)
   ========================================================================== */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.overview-text {
  font-size: 1.05rem;
}

.overview-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background-color: var(--clr-bg-card);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  transition: all var(--transition-medium);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--clr-primary-light);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--clr-primary);
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ==========================================================================
   Breed Banners Section (Top Page)
   ========================================================================== */
.breeds-section {
  background-color: var(--clr-primary-light);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 5rem;
}

.section-header h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.breed-banners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.breed-banner-card {
  background-color: var(--clr-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-medium);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.breed-banner-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.breed-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.breed-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.breed-banner-card:hover .breed-card-img img {
  transform: scale(1.08);
}

.breed-card-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.breed-card-title {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.breed-card-desc {
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.breed-card-link {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--clr-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.breed-card-link span {
  transition: transform var(--transition-fast);
}

.breed-banner-card:hover .breed-card-link span {
  transform: translateX(4px);
}

/* ==========================================================================
   Breed Detail Page Styling
   ========================================================================== */
.hero-breed {
  position: relative;
  height: 60vh;
  min-height: 450px;
  background-color: var(--clr-bg-dark);
  display: flex;
  align-items: flex-end;
  padding-bottom: 5rem;
  color: white;
  overflow: hidden;
}

.hero-breed-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-breed-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: brightness(0.85);
}

.hero-breed-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--clr-bg-dark) 0%, rgba(28, 15, 5, 0.4) 60%, transparent 100%);
}

.hero-breed-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-breed-content h1 {
  color: white;
  margin-bottom: 1rem;
}

.hero-breed-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  margin-bottom: 0;
}

/* Breed Quick Info Grid */
.quick-info-section {
  padding: 4rem 0;
  background-color: var(--clr-bg-card);
  border-bottom: 1px solid var(--clr-border);
}

.quick-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.info-item {
  border-left: 2px solid var(--clr-primary);
  padding-left: 1.5rem;
}

.info-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--clr-text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-primary-dark);
}

/* Detailed Description Layout */
.breed-details-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 5rem;
  align-items: start;
}

.breed-article {
  font-size: 1.05rem;
}

.breed-article h3 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--clr-primary-dark);
}

.breed-article h3:first-of-type {
  margin-top: 0;
}

.breed-article p {
  margin-bottom: 1.8rem;
}

.stats-card {
  background-color: var(--clr-bg-card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--clr-border);
}

.stats-card h3 {
  border-bottom: 2px solid var(--clr-primary-light);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.stat-row {
  margin-bottom: 1.5rem;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.stat-bar-container {
  height: 8px;
  background-color: var(--clr-bg-main);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background-color: var(--clr-primary);
  border-radius: var(--radius-full);
}

/* Bottom Navigation Banner (Next Page Navigation) */
.next-breed-banner {
  background-color: var(--clr-bg-dark);
  color: white;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.next-breed-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.2;
}

.next-breed-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.next-breed-container {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.next-breed-title {
  color: white;
  margin-bottom: 1.5rem;
}

.next-breed-tag {
  color: var(--clr-primary);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--clr-bg-dark);
  color: var(--clr-text-light);
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.footer-logo span {
  color: var(--clr-primary);
}

.footer-copyright {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid, .overview-grid, .breed-details-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-image-container {
    order: -1;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .breed-banners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .quick-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 5rem 0;
  }
  
  .breed-banners-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .quick-info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stats-card {
    padding: 2rem;
  }
  
  .footer-grid {
    flex-direction: column;
    text-align: center;
  }
}
