/* ==========================================================================
   TIỆM NHÀ MẦM — Landing styles
   Mobile-first, breakpoints: 720 (tablet), 980 (desktop).
   ========================================================================== */

:root {
  /* Brand palette: deep teal apothecary + cream ấm (lấy cảm hứng từ Ego webflow #08262A) */
  --bg:        #f6f1e7;
  --paper:    #ffffff;
  --ink:        #0e2a2d;
  --ink-soft:  #4a5b5d;
  --moss:      #08262A;
  --moss-deep: #04181b;
  --moss-soft: #d6e3e4;
  --moss-tint: #e7eff0;
  --terra:     #a55a3e;
  --terra-soft:#f1d9cc;
  --line:      #e3dccb;
  --line-soft: #f1ece1;
  --focus:     #a55a3e;
  --shadow-sm: 0 1px 2px rgba(20,20,15,.04);
  --shadow:    0 1px 2px rgba(20,20,15,.04), 0 8px 24px rgba(20,20,15,.06);
  --shadow-lg: 0 4px 12px rgba(20,20,15,.08), 0 24px 48px rgba(20,20,15,.10);
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 22px;
  --maxw: 1120px;

  --fs-base: 16.5px;
  --fs-sm: 14px;
  --fs-lg: 18px;
  --fs-h3: 20px;
  --fs-h2: 28px;
  --fs-h1: 40px;
  --fs-hero: 48px;
  --lh: 1.6;

  --ease: cubic-bezier(.2,.7,.2,1);
}

/* Reset & base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  position: relative;
}
/* Subtle paper-grain texture overlay — gives "printed" feel, kills AI-template vibe */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.03 0 0 0 0 0.15 0 0 0 0 0.16 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .045;
  mix-blend-mode: multiply;
}
h1, h2, h3, .hero-title, .section h2 {
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.005em;
}
h1 em, h2 em, h3 em, .hero-title em { font-style: italic; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--moss-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 0 0 8px 0; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* Header ------------------------------------------------------------------ */
.site-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; flex: 0 0 auto; }
.brand-text strong { display: block; font-size: 15px; letter-spacing: .04em; color: var(--moss-deep); font-weight: 800; }
.brand-text em { display: block; font-size: 12px; font-style: normal; color: var(--ink-soft); }

.nav {
  position: fixed; inset: 64px 0 auto 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  transform: translateY(-110%);
  transition: transform .28s var(--ease);
  z-index: 19;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.nav.open { transform: translateY(0); }
.nav a {
  padding: 14px 20px; color: var(--ink); font-weight: 600; font-size: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.nav a:last-child { border-bottom: 0; }
.nav a:hover { background: var(--moss-tint); text-decoration: none; }

.nav-toggle {
  margin-left: auto;
  width: 44px; height: 44px;
  background: transparent; border: 0; cursor: pointer; padding: 10px;
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  border-radius: 10px;
}
.nav-toggle:hover { background: var(--moss-tint); }
.nav-toggle-bar {
  width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-cta { display: none; }
.phone-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 999px; color: var(--moss-deep); font-weight: 700;
}
.phone-link:hover { background: var(--moss-tint); text-decoration: none; }
.cta-btn {
  background: var(--moss); color: #fff;
  padding: 10px 16px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  transition: background .2s var(--ease), transform .2s var(--ease);
  position: relative;
}
.cta-btn:hover { background: var(--moss-deep); text-decoration: none; transform: translateY(-1px); }

/* Soft pulse ring for header CTA */
@media (prefers-reduced-motion: no-preference) {
  .cta-btn.pulse::after {
    content: "";
    position: absolute; inset: 0; border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(8, 38, 42, .35);
    animation: pulse-ring 4s var(--ease) infinite;
    pointer-events: none;
  }
  @keyframes pulse-ring {
    0%, 80% { box-shadow: 0 0 0 0 rgba(8,38,42,0); }
    88% { box-shadow: 0 0 0 0 rgba(8,38,42,.4); }
    100% { box-shadow: 0 0 0 14px rgba(8,38,42,0); }
  }
}

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 48px 0 36px;
  overflow: hidden;
}
.hero-art {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.hero-art img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .55;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art img {
    animation: drift 14s ease-in-out infinite alternate;
  }
  @keyframes drift {
    from { transform: translateX(-6px); }
    to { transform: translateX(6px); }
  }
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 640px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  color: var(--terra);
  font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  font-size: 12px;
}
.kicker span { opacity: .5; }
.hero-title {
  font-size: var(--fs-hero);
  line-height: 1.08; margin: 0 0 18px;
  color: var(--moss-deep);
  font-weight: 500; letter-spacing: -0.01em;
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
}
.hero-title em { font-style: italic; color: var(--terra); }
.lede {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: var(--fs-lg);
  max-width: 32em;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  border: 1.5px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn.primary { background: var(--moss); color: #fff; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--moss-deep); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--moss-deep); border-color: var(--moss); }
.btn.ghost:hover { background: var(--moss-soft); text-decoration: none; }
.btn.block { display: flex; justify-content: center; margin-top: 14px; }

/* Trust band -------------------------------------------------------------- */
.trust-band { padding: 0 0 28px; }
.trust-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}
.trust-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 16px 8px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  transition: border-color .25s var(--ease);
}
.trust-card:hover { border-top-color: var(--moss); }
.trust-card b { font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif; font-weight: 500; font-size: 17px; color: var(--moss-deep); }
.trust-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--terra);
}

/* Sections ---------------------------------------------------------------- */
.section { padding: 48px 0; }
.section.band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { margin-bottom: 24px; }
.eyebrow {
  display: inline-block;
  margin: 0 0 6px;
  color: var(--terra);
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: 12px;
}
.section h2 {
  font-size: var(--fs-h2); margin: 0 0 8px;
  color: var(--moss-deep); font-weight: 500; letter-spacing: -0.005em;
  max-width: 30em;
  font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  line-height: 1.2;
}

/* Categories -------------------------------------------------------------- */
.cats {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
.cats li a {
  display: grid; grid-template-rows: auto auto;
  gap: 10px;
  align-items: center; justify-items: center;
  text-align: center;
  padding: 18px 10px 14px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  color: inherit;
  height: 100%;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.cats li a:hover {
  border-bottom-color: var(--moss);
  text-decoration: none;
  transform: translateY(-1px);
}
.cat-img {
  width: 64px; height: 64px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .3s var(--ease);
}
.cats li a:hover .cat-img { transform: scale(1.06); }
.cats li b { color: var(--moss-deep); font-size: 15.5px; font-weight: 500; line-height: 1.3; font-family: 'Cormorant Garamond', 'Times New Roman', Georgia, serif; letter-spacing: 0.01em; }

/* About + image ----------------------------------------------------------- */
.about {
  display: grid; gap: 24px;
}
.about-art {
  order: 2;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--moss-tint);
  aspect-ratio: 6 / 5;
  display: flex; align-items: center; justify-content: center;
}
.about-art img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.about-text { order: 1; }
.about-text p { margin: 0 0 14px; color: var(--ink); font-size: 16px; }
.about-text h2 { font-size: var(--fs-h2); margin-bottom: 14px; }
.about-text .btn { margin-top: 4px; }

/* Proof / stats / testimonials ------------------------------------------- */
.stats {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.stats li { background: var(--paper); padding: 18px 14px; text-align: center; }
.stats b {
  display: block; font-size: 30px; color: var(--moss-deep); font-weight: 800; letter-spacing: -.01em;
  line-height: 1.1;
}
.stats span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }

.testimonials { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.t-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 22px 4px 4px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 12px;
  transition: border-color .25s var(--ease);
}
.t-card:hover { border-top-color: var(--moss); }
.t-avatar { width: 64px; height: 64px; border-radius: 50%; }
.t-quote { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.6; font-style: italic; }

/* Contact ----------------------------------------------------------------- */
.contact-grid { display: grid; gap: 14px; }
.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.contact-card h3 { margin: 0 0 10px; color: var(--moss-deep); font-size: 17px; font-weight: 800; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.contact-list .ci { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: var(--moss-tint); border-radius: 8px; }
.contact-list a { color: var(--moss-deep); font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

/* Footer ------------------------------------------------------------------ */
.site-footer { background: var(--moss-deep); color: #e8e0d3; padding: 24px 0; margin-top: 30px; }
.foot-row { display: flex; flex-direction: column; gap: 10px; }
.foot-brand strong { display: block; font-size: 15px; letter-spacing: .04em; color: #fff; }
.foot-brand em { font-style: normal; opacity: .8; font-size: 13px; }
.foot-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; opacity: .9; }
.site-footer a { color: #dfeadf; }
.site-footer a:hover { color: #fff; }

/* Body state when mobile nav open */
body.nav-open { overflow: hidden; }

/* Reveal on scroll -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Tablet ≥ 720 ----------------------------------------------------------- */
@media (min-width: 720px) {
  :root {
    --fs-h1: 52px;
    --fs-hero: 64px;
    --fs-h2: 32px;
  }
  .nav-toggle { display: none; }
  .nav {
    position: static; transform: none; background: transparent;
    border: 0; box-shadow: none; padding: 0; margin-left: auto;
    flex-direction: row; gap: 22px;
  }
  .nav a { padding: 8px 4px; border: 0; font-size: 15px; }
  .nav a:hover { background: transparent; color: var(--moss-deep); }
  .header-cta { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; }
  .hero { padding: 72px 0 56px; }
  .hero-art img { opacity: .65; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
  .about-art { order: 1; aspect-ratio: 5 / 4; }
  .about-text { order: 2; }
  .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 20px; }
  .foot-row { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Desktop ≥ 980 ---------------------------------------------------------- */
@media (min-width: 980px) {
  :root { --fs-hero: 76px; --fs-h2: 36px; }
  .hero { padding: 88px 0 72px; }
  .hero-inner { max-width: 600px; }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .testimonials { grid-template-columns: repeat(3, 1fr); }
  .hero-art img { opacity: .75; }
  .about { grid-template-columns: 1fr 1.1fr; gap: 56px; }
}

/* Mobile-only reveal: no translateY (avoid jank) */
@media (max-width: 719px) {
  .reveal { transform: none; }
}

/* Reduced motion: no animations, no reveal offset, no pulse */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-art img { animation: none !important; }
  .cta-btn.pulse::after { display: none; }
}
