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

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

:root {
  --rose:    #e8788a;
  --blush:   #fde8ec;
  --deep:    #3b1c28;
  --cream:   #fdf6f0;
  --muted:   #8a6672;
  --white:   #ffffff;
  --shadow:  0 4px 24px rgba(59,28,40,.08);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--deep);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ─────────────────────────────── */
nav {
  background: var(--white);
  border-bottom: 1px solid #f0dde3;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky; top: 0; z-index: 100;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--deep);
  text-decoration: none;
}
.logo span { color: var(--rose); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--rose); }

/* ── HERO ─────────────────────────────── */
.hero {
  text-align: center;
  padding: 64px 5% 48px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 14px;
}
.hero h1 em { color: var(--rose); font-style: italic; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 480px; margin: 0 auto 32px; }

/* ── TOOL ─────────────────────────────── */
.tool-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 36px 32px;
}
.tool-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 8px;
}
.tool-card .subtitle { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }

/* Filter row */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 7px 18px;
  border-radius: 50px;
  border: 1.5px solid #e8d0d6;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--white);
}

/* Name grid */
.name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.name-chip {
  background: var(--blush);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.name-chip:hover { border-color: var(--rose); transform: translateY(-2px); }
.name-chip.selected { background: var(--rose); color: var(--white); border-color: var(--rose); }
.name-chip .name { font-weight: 600; font-size: 1rem; display: block; }
.name-chip .origin { font-size: .72rem; color: inherit; opacity: .7; margin-top: 3px; display: block; }

/* Result box */
.result-box {
  display: none;
  background: linear-gradient(135deg, var(--blush), #fff0f5);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  border: 1.5px solid #f5c6d0;
}
.result-box.show { display: block; animation: fadeIn .3s ease; }
.result-box .selected-name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--rose);
  font-style: italic;
}
.result-box .meta { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.result-box .meaning { margin-top: 12px; font-size: .95rem; color: var(--deep); }
.copy-btn {
  margin-top: 16px;
  padding: 9px 24px;
  background: var(--rose);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  cursor: pointer;
  transition: opacity .2s;
}
.copy-btn:hover { opacity: .85; }

/* ── GENERAL PAGE ─────────────────────── */
.page-wrap {
  max-width: 780px;
  margin: 52px auto;
  padding: 0 5%;
}
.page-wrap h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 6px;
}
.page-wrap h1 span { color: var(--rose); }
.divider { width: 48px; height: 3px; background: var(--rose); border-radius: 4px; margin: 16px 0 28px; }
.page-wrap h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin: 28px 0 10px; }
.page-wrap p { color: var(--muted); line-height: 1.75; margin-bottom: 12px; }
.page-wrap ul { color: var(--muted); line-height: 1.75; padding-left: 20px; margin-bottom: 12px; }

/* Contact form */
.contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.contact-form input,
.contact-form textarea {
  padding: 12px 16px;
  border: 1.5px solid #e8d0d6;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  background: var(--white);
  color: var(--deep);
  outline: none;
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--rose); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button {
  align-self: flex-start;
  padding: 11px 28px;
  background: var(--rose);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity .2s;
}
.contact-form button:hover { opacity: .85; }
.success-msg {
  display: none;
  background: #edfaf2;
  color: #2d7a50;
  border: 1px solid #a8e6c0;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: .92rem;
}

/* ── FOOTER ─────────────────────────────── */
footer {
  margin-top: auto;
  background: var(--deep);
  color: #c8a8b4;
  text-align: center;
  padding: 28px 5%;
  font-size: .85rem;
}
footer a { color: var(--rose); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 10px; }

@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

@media (max-width: 600px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .8rem; }
  .tool-card { padding: 24px 18px; }
  .name-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
