@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --cream: #fdf6f0;
  --cream-dark: #f5ebe0;
  --rose: #c97b84;
  --rose-dark: #a85f68;
  --rose-light: #f0d0d4;
  --rose-pale: #fef5f6;
  --sage: #8fa89e;
  --sage-light: #c5d8d1;
  --gold: #d4a96a;
  --gold-light: #f5e4c8;
  --text: #2d1f1f;
  --text-muted: #7a5c5c;
  --text-light: #b09090;
  --card: #ffffff;
  --border: #ece0d8;
  --shadow-sm: 0 2px 8px rgba(100,50,50,0.07);
  --shadow: 0 4px 24px rgba(100,50,50,0.10);
  --shadow-lg: 0 8px 48px rgba(100,50,50,0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 28px;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; line-height: 1.25; }

/* ── Layout ── */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ── Navigation ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,246,240,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  color: var(--text);
}
.nav-logo-paw { font-size: 1.6rem; }
.nav-links {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.nav-links a {
  display: block; padding: 8px 16px;
  text-decoration: none; color: var(--text-muted);
  font-size: 0.95rem; font-weight: 500;
  border-radius: 40px;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--rose-dark); background: var(--rose-pale);
}
.nav-links .btn-nav {
  background: var(--rose); color: #fff;
  padding: 8px 20px; border-radius: 40px;
  font-weight: 600;
}
.nav-links .btn-nav:hover { background: var(--rose-dark); color: #fff; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--text);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 40px;
  font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none; border: 2px solid transparent;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-outline { border-color: var(--rose); color: var(--rose); background: transparent; }
.btn-outline:hover { background: var(--rose-pale); }

.btn-ghost { background: rgba(255,255,255,0.6); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #fff; }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ── Hero (index) ── */
.hero {
  padding: 72px 0 80px;
  text-align: center;
}
.hero-badge {
  display: inline-block; margin-bottom: 20px;
  padding: 6px 18px; border-radius: 40px;
  background: var(--gold-light); color: var(--gold);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 16px; }
.hero h1 em { color: var(--rose); font-style: italic; }
.hero p  { font-size: 1.1rem; color: var(--text-muted); max-width: 540px; margin: 0 auto 40px; }

/* ── Cat of the Day card ── */
.cotd-wrap {
  max-width: 860px; margin: 0 auto;
}
.cotd-card {
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--card);
}
.cotd-photo { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.cotd-photo img { width: 100%; height: 100%; object-fit: cover; }
.cotd-info {
  padding: 48px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.cotd-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-light); margin-bottom: 12px;
}
.cotd-info h2 { font-size: 2.6rem; margin-bottom: 8px; }
.cotd-info .age { color: var(--text-muted); margin-bottom: 24px; font-size: 1rem; }
.cotd-hearts {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--rose-pale); padding: 10px 18px; border-radius: 40px;
  margin-bottom: 32px; width: fit-content;
  color: var(--rose-dark); font-weight: 600;
}
.cotd-hearts .heart-icon { font-size: 1.2rem; }

/* ── Stats bar ── */
.stats-bar {
  display: flex; justify-content: center; gap: 48px;
  padding: 40px 0; border-top: 1px solid var(--border);
  margin-top: 64px;
}
.stat { text-align: center; }
.stat-number { font-family: 'Playfair Display', serif; font-size: 2.4rem; font-weight: 700; color: var(--rose); }
.stat-label  { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ── Heart Reaction Banner (cat profile) ── */
.hearts-banner {
  background: linear-gradient(135deg, #fff0f2, #fde8d8);
  border-bottom: 1px solid var(--rose-light);
  padding: 28px 0;
  text-align: center;
  position: relative;
}
.hearts-banner-inner {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.hearts-banner-title {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--rose);
}
.hearts-banner-count {
  font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 700;
  color: var(--rose-dark); line-height: 1;
}
.hearts-banner-subtitle { color: var(--text-muted); font-size: 0.9rem; }
.heart-btn {
  background: var(--rose); color: #fff;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; border-radius: 40px;
  font-size: 1rem; font-weight: 700;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 16px rgba(201,123,132,0.35);
  transition: all 0.2s;
}
.heart-btn:hover { background: var(--rose-dark); transform: scale(1.04); }
.heart-btn.hearted { background: var(--rose-pale); color: var(--rose-dark); box-shadow: none; }
.heart-btn.hearted:hover { background: var(--rose-light); transform: scale(1.02); }
.heart-btn .btn-heart-icon { font-size: 1.3rem; transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.heart-btn:active .btn-heart-icon { transform: scale(1.4); }
@keyframes heartPop { 0%{transform:scale(1)} 50%{transform:scale(1.4)} 100%{transform:scale(1)} }
.heart-pop { animation: heartPop 0.35s cubic-bezier(0.34,1.56,0.64,1); }

/* ── Cat Profile ── */
.profile-hero {
  padding: 56px 0 48px;
}
.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.profile-gallery {}
.profile-main-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--cream-dark);
  margin-bottom: 12px;
}
.profile-main-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-thumbs {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.profile-thumb {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.7;
  flex-shrink: 0;
}
.profile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-thumb.active { border-color: var(--rose); opacity: 1; }
.profile-thumb:hover { opacity: 0.9; }

.profile-info {}
.profile-name { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 6px; }
.profile-age  { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 28px; }
.profile-meta { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.profile-meta-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; background: var(--cream-dark); border-radius: var(--radius-sm);
}
.profile-meta-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.profile-meta-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-light); }
.profile-meta-value { font-size: 0.95rem; color: var(--text); margin-top: 2px; }

.profile-story { padding: 48px 0; }
.profile-story h3 { font-size: 1.5rem; margin-bottom: 20px; }
.profile-story-text {
  font-size: 1.05rem; color: var(--text-muted);
  line-height: 1.85;
  max-width: 720px;
  white-space: pre-line;
}

/* ── Catalog ── */
.catalog-header { padding: 56px 0 40px; }
.catalog-header h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.catalog-header p  { color: var(--text-muted); }
.catalog-search-bar {
  display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap;
}
.search-input-wrap {
  position: relative; flex: 1; min-width: 240px;
}
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 1.1rem; color: var(--text-light); pointer-events: none; }
.search-input {
  width: 100%; padding: 14px 18px 14px 48px;
  border: 2px solid var(--border); border-radius: 40px;
  background: var(--card); font-size: 0.95rem; font-family: 'Inter', sans-serif;
  color: var(--text); outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--rose); }
.search-input::placeholder { color: var(--text-light); }

.age-filter {
  padding: 14px 20px; border: 2px solid var(--border); border-radius: 40px;
  background: var(--card); font-size: 0.95rem; font-family: 'Inter', sans-serif;
  color: var(--text); outline: none; cursor: pointer;
  transition: border-color 0.2s; appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a5c5c' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.age-filter:focus { border-color: var(--rose); }

.cats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px; padding-bottom: 80px;
}
.cat-card { text-decoration: none; color: inherit; display: block; }
.cat-card-photo {
  aspect-ratio: 4/3; overflow: hidden;
  background: var(--cream-dark);
}
.cat-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.cat-card:hover .cat-card-photo img { transform: scale(1.05); }
.cat-card-body { padding: 20px; }
.cat-card-name { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.cat-card-age  { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.cat-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.cat-card-hearts { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--rose); font-weight: 600; }
.cat-card-date   { font-size: 0.8rem; color: var(--text-light); }

.no-results { text-align: center; padding: 80px 0; color: var(--text-muted); }
.no-results .emoji { font-size: 3rem; display: block; margin-bottom: 16px; }

/* ── About Page ── */
.about-hero { padding: 72px 0 56px; }
.about-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.about-hero .lead { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; line-height: 1.8; }

.about-intro { padding: 0 0 64px; }
.about-intro-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center;
}
.about-intro-text h2 { font-size: 1.8rem; margin-bottom: 20px; }
.about-intro-text p  { color: var(--text-muted); line-height: 1.85; margin-bottom: 16px; }
.about-intro-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 3/4; }
.about-intro-img img { width: 100%; height: 100%; object-fit: cover; }

/* Luna card */
.luna-section { padding: 64px 0; }
.luna-card {
  background: linear-gradient(135deg, #fff5f6 0%, #fdf0e8 100%);
  border: 1px solid var(--rose-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.luna-grid {
  display: grid; grid-template-columns: 340px 1fr;
}
.luna-photo { position: relative; overflow: hidden; }
.luna-photo img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 460px; }
.luna-photo-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px 28px;
  background: linear-gradient(transparent, rgba(45,31,31,0.65));
  color: #fff;
}
.luna-photo-name { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; }
.luna-photo-years { font-size: 0.9rem; opacity: 0.85; margin-top: 2px; }
.luna-info { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.luna-badge {
  display: inline-block; margin-bottom: 20px;
  padding: 5px 14px; border-radius: 40px;
  background: var(--rose-pale); color: var(--rose);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.luna-info h2 { font-size: 1.8rem; margin-bottom: 20px; line-height: 1.3; }
.luna-info p  { color: var(--text-muted); line-height: 1.85; margin-bottom: 16px; font-size: 1rem; }
.luna-info .quote {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 1.1rem; color: var(--rose-dark); border-left: 3px solid var(--rose-light);
  padding-left: 20px; margin: 28px 0;
}

.mission-section { padding: 64px 0; }
.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.mission-card { padding: 32px 28px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); }
.mission-icon { font-size: 2rem; margin-bottom: 16px; display: block; }
.mission-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.mission-card p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; }

/* ── Submit Form ── */
.submit-header { padding: 56px 0 40px; }
.submit-header h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 10px; }
.submit-header p  { color: var(--text-muted); max-width: 520px; }

.submit-form {
  max-width: 760px; padding-bottom: 80px;
}
.form-section { margin-bottom: 48px; }
.form-section-title {
  font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600;
  color: var(--text); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-label span { color: var(--rose); }
.form-optional { font-weight: 400; color: var(--text-muted); }
.form-input, .form-select, .form-textarea {
  padding: 13px 18px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); font-size: 0.95rem; font-family: 'Inter', sans-serif;
  color: var(--text); outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--rose); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-light); }
.form-textarea { resize: vertical; min-height: 150px; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); }

/* Photo Upload */
.photo-upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px 28px; text-align: center;
  cursor: pointer; background: var(--cream-dark);
  transition: border-color 0.2s, background 0.2s;
}
.photo-upload-zone:hover, .photo-upload-zone.drag-over {
  border-color: var(--rose); background: var(--rose-pale);
}
.photo-upload-zone input[type="file"] { display: none; }
.upload-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.upload-label { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.upload-label span { color: var(--rose); text-decoration: underline; cursor: pointer; }
.upload-hint { font-size: 0.85rem; color: var(--text-muted); }
.upload-count { font-size: 0.8rem; font-weight: 600; color: var(--rose); margin-top: 8px; }

.photo-preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px; margin-top: 16px;
}
.preview-item {
  position: relative; aspect-ratio: 1;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--cream-dark);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-remove {
  position: absolute; top: 5px; right: 5px;
  background: rgba(45,31,31,0.7); color: #fff;
  border: none; cursor: pointer; border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: background 0.2s;
}
.preview-remove:hover { background: var(--rose-dark); }
.preview-main-badge {
  position: absolute; bottom: 5px; left: 5px;
  background: var(--rose); color: #fff;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 40px;
}

/* Form success */
.submit-success {
  display: none; text-align: center; padding: 80px 40px;
}
.submit-success .success-icon { font-size: 4rem; display: block; margin-bottom: 20px; }
.submit-success h2 { font-size: 2rem; margin-bottom: 12px; }
.submit-success p  { color: var(--text-muted); max-width: 400px; margin: 0 auto 32px; }

/* ── Footer ── */
.footer {
  background: var(--text); color: rgba(255,255,255,0.55);
  padding: 48px 0;
  margin-top: auto;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-logo {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  color: #fff; font-weight: 700; text-decoration: none;
}
.footer-copy  { font-size: 0.85rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--rose-light); }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-muted); }
.empty-state .emoji { font-size: 4rem; display: block; margin-bottom: 20px; }
.empty-state h2  { margin-bottom: 12px; }
.empty-state p   { margin-bottom: 28px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .cotd-card { grid-template-columns: 1fr; }
  .cotd-photo { aspect-ratio: 16/9; }
  .profile-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-intro-img { max-height: 320px; }
  .luna-grid { grid-template-columns: 1fr; }
  .luna-photo img { min-height: 280px; }
  .mission-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--cream); border-bottom: 1px solid var(--border); padding: 12px 24px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav { position: relative; }
  .stats-bar { gap: 24px; flex-wrap: wrap; justify-content: center; }
  .cotd-info { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .cats-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── Language toggle ── */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--cream-dark); border: 1.5px solid var(--border);
  border-radius: 40px; padding: 6px 14px;
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  color: var(--text-muted); font-family: 'Inter', sans-serif;
  transition: all 0.2s; white-space: nowrap; letter-spacing: 0.03em;
}
.lang-toggle:hover { border-color: var(--rose); color: var(--rose); background: var(--rose-pale); }

/* ── Fade-in animation ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.5s ease forwards; }
.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
