/* ============================================================
   MAGIC BABY NAMES — Design System
   Editorial Luxury archetype: warm ivory, deep berry + antique
   gold accents, Cormorant Garamond display / DM Sans body.
   ============================================================ */

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

:root {
  /* Palette */
  --ivory: #fbf6ef;
  --ivory-deep: #f4ecdf;
  --card: #fffdfa;
  --espresso: #2a2420;
  --espresso-soft: #55493f;
  --berry: #a8434a;
  --berry-deep: #7f2f36;
  --gold: #c9a227;
  --gold-soft: #e4c968;
  --sage: #7c8a6e;
  --sage-soft: #dfe4d5;
  --hairline: rgba(42, 36, 32, 0.1);
  --hairline-soft: rgba(42, 36, 32, 0.06);

  /* Type */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;

  /* Motion */
  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);

  /* Radii */
  --r-lg: 2rem;
  --r-md: 1.25rem;
  --r-sm: 0.75rem;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

main { overflow-x: hidden; width: 100%; max-width: 100%; }

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container { padding: 0 48px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--berry-deep);
  background: rgba(168, 67, 74, 0.08);
  border: 1px solid rgba(168, 67, 74, 0.16);
}

.eyebrow .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--espresso);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.75rem, 5.2vw, 5.25rem); line-height: 1.04; }
h2 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); line-height: 1.08; }
h3 { font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.2; }

p.lede {
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  color: var(--espresso-soft);
  line-height: 1.7;
  max-width: 42ch;
}

section { padding: 88px 0; position: relative; }
@media (min-width: 1024px) { section { padding: 148px 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: transform 700ms var(--ease-fluid), box-shadow 700ms var(--ease-fluid), background 500ms var(--ease-fluid);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--berry);
  color: var(--ivory);
  box-shadow: 0 10px 30px -10px rgba(168, 67, 74, 0.55);
}
.btn-primary:hover { background: var(--berry-deep); box-shadow: 0 16px 40px -12px rgba(127, 47, 54, 0.6); }

.btn-ghost {
  background: rgba(255, 253, 250, 0.7);
  color: var(--espresso);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--card); border-color: rgba(42,36,32,0.2); }

.btn-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 700ms var(--ease-fluid);
  flex-shrink: 0;
}
.btn-ghost .btn-icon-wrap { background: rgba(42,36,32,0.06); }
.btn:hover .btn-icon-wrap { transform: translate(3px, -2px) scale(1.05); }

/* ---------- Nav ---------- */
.nav-pill {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(calc(100% - 32px), 1120px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 22px;
  border-radius: 999px;
  background: rgba(251, 246, 239, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hairline);
  box-shadow: 0 10px 40px -18px rgba(42,36,32,0.25);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .spark { color: var(--gold); font-size: 15px; }

.nav-links {
  display: none;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { position: relative; color: var(--espresso-soft); transition: color 400ms var(--ease-fluid); }
.nav-links a:hover { color: var(--berry); }
@media (min-width: 960px) { .nav-links { display: flex; } }

.nav-cta { display: none; }
@media (min-width: 960px) { .nav-cta { display: inline-flex; } }

.nav-burger {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--espresso);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
}
@media (min-width: 960px) { .nav-burger { display: none; } }
.nav-burger span {
  position: absolute;
  width: 16px; height: 1.5px;
  background: var(--ivory);
  transition: transform 500ms var(--ease-fluid), opacity 300ms var(--ease-fluid);
}
.nav-burger span:nth-child(1) { transform: translateY(-4px); }
.nav-burger span:nth-child(2) { transform: translateY(4px); }
.nav-burger.open span:nth-child(1) { transform: rotate(45deg); }
.nav-burger.open span:nth-child(2) { transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(42, 36, 32, 0.94);
  backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease-fluid);
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(48px);
  transition: transform 700ms var(--ease-out-soft), opacity 700ms var(--ease-out-soft);
}
.mobile-menu.open a { opacity: 1; transform: translateY(0); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding-top: 140px;
  padding-bottom: 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(42,36,32,0.05) 0%, rgba(42,36,32,0.18) 45%, rgba(28,22,18,0.72) 100%),
    linear-gradient(90deg, rgba(28,22,18,0.55) 0%, rgba(28,22,18,0.05) 55%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}
.hero .eyebrow {
  background: rgba(251,246,239,0.16);
  border-color: rgba(251,246,239,0.28);
  color: var(--gold-soft);
}
.hero h1 { color: var(--ivory); margin-top: 22px; max-width: 12ch; }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero p.lede { color: rgba(251,246,239,0.82); margin-top: 22px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero-search {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(251,246,239,0.94);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  max-width: 460px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5);
}
.hero-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--espresso);
  outline: none;
}
.hero-search input::placeholder { color: rgba(42,36,32,0.45); }
.hero-search button {
  border: none;
  background: var(--espresso);
  color: var(--ivory);
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 500ms var(--ease-fluid);
}
.hero-search button:hover { transform: scale(1.06); background: var(--berry); }

/* ---------- Stat bar ---------- */
.stat-bar {
  padding: 56px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-item { text-align: left; }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3vw, 3rem);
  color: var(--berry);
  font-weight: 700;
}
.stat-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--espresso-soft);
  margin-top: 4px;
}

/* ---------- Section headers ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 56px;
  max-width: 720px;
}
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- Bento explore grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-auto-flow: dense;
  gap: 20px;
}
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .bento { grid-template-columns: repeat(4, 1fr); } }

.bento-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  transition: transform 700ms var(--ease-fluid), box-shadow 700ms var(--ease-fluid), border-color 500ms var(--ease-fluid);
}
.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(42,36,32,0.28);
  border-color: rgba(168,67,74,0.3);
}
.bento-card.wide { grid-column: span 1; }
@media (min-width: 720px) { .bento-card.wide { grid-column: span 2; } }

.bento-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--ivory-deep);
  display: flex; align-items: center; justify-content: center;
  color: var(--berry);
}
.bento-card h3 { margin-top: 22px; }
.bento-card p { color: var(--espresso-soft); font-size: 14.5px; margin-top: 10px; line-height: 1.65; }
.bento-card .go {
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--berry-deep);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Name spotlight cards ---------- */
.spotlight-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.spotlight-track::-webkit-scrollbar { display: none; }

.name-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 288px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 30px 26px;
}
.name-card .tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
}
.name-card h3 { margin-top: 14px; font-size: 2rem; }
.name-card .meaning { color: var(--espresso-soft); font-size: 14px; margin-top: 10px; line-height: 1.6; }
.name-card .meta-row {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 12.5px;
  color: var(--espresso-soft);
}
.name-card .meta-row span { display: flex; align-items: center; gap: 5px; }
.name-card .meta-row strong { color: var(--espresso); font-weight: 600; }

/* ---------- Origin pill strip ---------- */
.origin-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.origin-pill {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card);
  font-size: 14px;
  font-weight: 500;
  transition: background 400ms var(--ease-fluid), border-color 400ms var(--ease-fluid), transform 400ms var(--ease-fluid);
}
.origin-pill:hover { background: var(--espresso); color: var(--ivory); border-color: var(--espresso); transform: translateY(-2px); }

/* ---------- Editorial / GSAP pin section ---------- */
.editorial {
  background: var(--espresso);
  color: var(--ivory);
  border-radius: 0;
}
.editorial .eyebrow { background: rgba(251,246,239,0.1); border-color: rgba(251,246,239,0.2); color: var(--gold-soft); }
.editorial h2 { color: var(--ivory); }
.editorial p.lede { color: rgba(251,246,239,0.72); }

.editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: start;
}
@media (min-width: 960px) { .editorial-grid { grid-template-columns: 0.85fr 1.15fr; } }

.editorial-pin { position: sticky; top: 140px; }

.editorial-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid rgba(251,246,239,0.14);
  gap: 20px;
}
.editorial-row:last-child { border-bottom: 1px solid rgba(251,246,239,0.14); }
.editorial-row .en { font-family: var(--font-display); font-size: 1.7rem; color: var(--ivory); }
.editorial-row .em { font-size: 13.5px; color: rgba(251,246,239,0.6); text-align: right; max-width: 40ch; }

/* ---------- Ebook promo ---------- */
.ebook-panel {
  background: linear-gradient(135deg, var(--berry) 0%, var(--berry-deep) 100%);
  border-radius: var(--r-lg);
  padding: 56px 40px;
  color: var(--ivory);
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
@media (min-width: 900px) { .ebook-panel { grid-template-columns: 1fr 0.55fr; padding: 68px 64px; } }
.ebook-panel .eyebrow { background: rgba(251,246,239,0.14); border-color: rgba(251,246,239,0.25); color: var(--gold-soft); }
.ebook-panel h2 { color: var(--ivory); margin-top: 18px; }
.ebook-panel p.lede { color: rgba(251,246,239,0.86); margin-top: 16px; }
.ebook-cover {
  aspect-ratio: 2/3;
  background: rgba(251,246,239,0.08);
  border: 1px solid rgba(251,246,239,0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  text-align: center;
  padding: 24px;
  font-size: 15px;
  color: rgba(251,246,239,0.85);
  backdrop-filter: blur(6px);
}

/* ---------- FAQ ---------- */
.faq-item {
  border-top: 1px solid var(--hairline);
  padding: 26px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 20px;
}
.faq-q h3 { font-size: 1.25rem; }
.faq-plus {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform 500ms var(--ease-fluid);
}
.faq-plus::before, .faq-plus::after {
  content: '';
  position: absolute;
  background: var(--espresso);
}
.faq-plus::before { width: 11px; height: 1.4px; }
.faq-plus::after { width: 1.4px; height: 11px; transition: transform 400ms var(--ease-fluid); }
.faq-item.open .faq-plus { transform: rotate(45deg); background: var(--berry); border-color: var(--berry); }
.faq-item.open .faq-plus::before, .faq-item.open .faq-plus::after { background: var(--ivory); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 500ms var(--ease-fluid);
}
.faq-a p { padding-top: 16px; color: var(--espresso-soft); max-width: 68ch; font-size: 15px; line-height: 1.7; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--ivory-deep);
  border-radius: var(--r-lg);
  padding: 56px 40px;
  text-align: center;
}
.newsletter form {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter input {
  flex: 1;
  min-width: 220px;
  padding: 15px 22px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
}

/* ---------- Footer ---------- */
footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--hairline);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14.5px; color: var(--espresso-soft); transition: color 300ms var(--ease-fluid); }
.footer-col a:hover { color: var(--berry); }
.footer-bottom {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--espresso-soft);
}

/* ---------- Reveal animation base state ---------- */
.reveal { opacity: 0; transform: translateY(48px); filter: blur(6px); }

/* ---------- Alphabet strip ---------- */
.alpha-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.alpha-pill {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  transition: background 300ms var(--ease-fluid), color 300ms var(--ease-fluid), transform 300ms var(--ease-fluid);
}
.alpha-pill:hover { background: var(--gold); border-color: var(--gold); color: var(--espresso); transform: translateY(-3px); }
