/* assets/css/style.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-bg:       #ffffff;
  --c-surface:  #f7f6f3;
  --c-border:   #e5e3de;
  --c-text:     #1a1a18;
  --c-muted:    #6b6b67;
  --c-accent:   #1a1a18;
  --c-accent-fg:#ffffff;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-pill:999px;
  --max-w:      600px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.name-field-wrap { margin-bottom: 1.25rem; }
.name-field-wrap input {
  width: 100%;
  max-width: 280px;
  padding: 11px 18px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  font-size: 1rem;
  background: var(--c-bg);
  color: var(--c-text);
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.name-field-wrap input:focus { border-color: var(--c-text); }
.name-field-wrap input::placeholder { color: var(--c-muted); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--c-text);
}

/* ── Main / screens ─────────────────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.screen { display: none; }
.screen.active { display: block; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 2rem 0; }
.hero-icon { font-size: 56px; margin-bottom: 1rem; }
.hero h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 0.75rem; }
.hero p { font-size: 1.05rem; color: var(--c-muted); max-width: 420px; margin: 0 auto 2rem; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-accent-fg);
  border: none;
  padding: 13px 32px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.82; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
}
.btn-secondary:hover { background: var(--c-surface); }

.btn-back {
  background: none;
  border: none;
  color: var(--c-muted);
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 1.25rem;
  padding: 4px 0;
}
.btn-back:hover { color: var(--c-text); }
.btn-back:disabled { opacity: 0.3; cursor: default; }

/* ── Progress ───────────────────────────────────────────────────────────── */
.progress-bar {
  height: 3px;
  background: var(--c-border);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--c-accent);
  transition: width 0.35s ease;
  border-radius: 2px;
}

/* ── Question ───────────────────────────────────────────────────────────── */
.q-meta { margin-bottom: 0.5rem; }
.q-counter { font-size: 0.8rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.q-text { font-size: 1.25rem; font-weight: 500; line-height: 1.4; margin-bottom: 1.5rem; }

.options { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  font-size: 0.95rem;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
  transition: background 0.1s, border-color 0.1s;
}
.opt-btn:hover { background: var(--c-surface); border-color: #c5c3be; }
.opt-btn.selected { border: 2px solid var(--c-accent); background: var(--c-surface); }

/* ── Result ─────────────────────────────────────────────────────────────── */
.result-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.result-emoji { font-size: 64px; margin-bottom: 0.75rem; }
.result-label { font-size: 0.75rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.4rem; }
.breed-name   { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 1rem; }
.breed-desc   { font-size: 0.95rem; color: var(--c-muted); line-height: 1.7; max-width: 420px; margin: 0 auto 1.5rem; }

.traits { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.trait {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  font-size: 0.8rem;
  color: var(--c-muted);
}

.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.result-actions-secondary { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.btn-share { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; border: none; transition: opacity 0.15s; }
.btn-share:hover { opacity: 0.88; }
.btn-facebook { background: #1877f2; color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; }

/* ── Loading ────────────────────────────────────────────────────────────── */
.loading-wrap { text-align: center; padding: 4rem 0; color: var(--c-muted); }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-illustration { margin-bottom: 1rem; display: flex; justify-content: center; }
.result-illustration .breed-circle-img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; object-position: center top; display: block; overflow: hidden; background: var(--c-surface); }
.result-illustration .result-emoji { font-size: 64px; }

/* ── Circle illustrations ────────────────────────────────────────────────── */
.breed-circle-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  overflow: hidden;
  background: var(--c-surface);
}

/* ── Breed page ─────────────────────────────────────────────────────────── */
.breed-page { max-width: var(--max-w); }
.breed-hero { text-align: center; margin-bottom: 2rem; }
.breed-emoji-lg { font-size: 80px; margin-bottom: 1rem; }
.breed-img { width: 100%; max-width: 400px; border-radius: var(--radius-lg); margin-bottom: 1rem; }
.breed-hero h1 { font-size: 2rem; font-weight: 600; margin-bottom: 0.75rem; }
.breed-tagline { color: var(--c-muted); max-width: 480px; margin: 0 auto; }
.breed-traits { margin-bottom: 2rem; }
.breed-traits h2 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--c-muted); }
.social-proof { text-align: center; color: var(--c-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.cta-box { background: var(--c-surface); border-radius: var(--radius-lg); padding: 2rem; text-align: center; margin-bottom: 2rem; }
.cta-box h2 { margin-bottom: 0.5rem; }
.cta-box p  { color: var(--c-muted); margin-bottom: 1.25rem; }
.breed-nav  { text-align: center; color: var(--c-muted); font-size: 0.9rem; }
.breed-nav h2 { font-size: 0.85rem; margin-bottom: 0.4rem; }
.breed-nav a  { color: var(--c-text); }

/* ── Breeds grid ────────────────────────────────────────────────────────── */
.breeds-page h1   { font-size: 1.75rem; font-weight: 600; margin-bottom: 0.5rem; }
.breeds-page .intro { color: var(--c-muted); margin-bottom: 2rem; }
.breed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.breed-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--c-text);
  transition: background 0.12s;
  display: block;
}
.breed-card:hover { background: var(--c-border); }
.breed-card-emoji { font-size: 2rem; margin-bottom: 0.5rem; }
.breed-card-img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; object-position: center top; display: block; margin-bottom: 0.75rem; outline: 3px solid var(--c-surface); outline-offset: -3px; }
.breed-card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.breed-card p  { font-size: 0.85rem; color: var(--c-muted); margin-bottom: 0.75rem; line-height: 1.5; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-muted);
}
.site-footer a { color: var(--c-text); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero h1   { font-size: 1.6rem; }
  .breed-name { font-size: 1.4rem; }
  .result-actions { flex-direction: column; align-items: center; }
}

/* ── Language dropdown ───────────────────────────────────────────────────── */
.lang-dropdown { position: relative; }
.lang-current { background: transparent; border: 1px solid var(--c-border); border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; color: var(--c-text); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.lang-current:hover { background: var(--c-surface); }
.lang-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--c-border); border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden; z-index: 100; min-width: 150px; }
.lang-dropdown.open .lang-menu { display: block; }
.lang-menu a { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 14px; color: var(--c-text); text-decoration: none; }
.lang-menu a:hover { background: var(--c-surface); }
.lang-menu a.active { font-weight: 600; }

/* ── English name under local breed name ─────────────────────────────────── */
.breed-name-en { font-size: 13px; color: var(--c-muted); margin-top: -0.5rem; margin-bottom: 0.75rem; font-style: italic; }
.breed-name-en-page { font-size: 14px; color: var(--c-muted); margin-top: -0.5rem; margin-bottom: 0.5rem; font-style: italic; }
.breed-card-name-en { font-size: 12px; color: var(--c-muted); margin-top: -0.5rem; margin-bottom: 0.4rem; font-style: italic; }