/* ============================================================
   House of Meera — shared base
   Reset · WhatsApp button · reveal utilities
   ============================================================ */

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

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; }

input, button, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: none; padding: 0; }

a { color: inherit; }

h1, h2, h3 { text-wrap: balance; line-height: 1.12; }

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--focus-ring, #b28d3c);
  outline-offset: 3px;
}

::selection { background: #b28d3c; color: #faf8f3; }

/* Semantic z-scale */
:root {
  --z-nav: 100;
  --z-float: 200;   /* floating actions */
  --z-menu: 300;    /* mobile nav overlay */
}

/* ---------- Scroll reveal ----------
   Content stays visible by default. JavaScript adds .is-in only to play the
   enhancement, so a script, observer or cache failure can never blank a page. */
[data-reveal] { opacity: 1; transform: none; }
.js [data-reveal].is-in {
  animation: hom-reveal .7s cubic-bezier(.22,1,.36,1) both;
  animation-delay: var(--reveal-delay, 0s);
}
@keyframes hom-reveal {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal].is-in { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--z-float);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 26px rgba(20, 40, 30, .35);
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease, opacity .18s ease;
}
.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 16px 34px rgba(20, 40, 30, .4);
}
body.has-menu .whatsapp-fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.9);
}
.whatsapp-fab svg { width: 28px; height: 28px; }
.whatsapp-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #25d366;
  animation: fab-pulse 2.6s cubic-bezier(.22,1,.36,1) infinite;
}
@keyframes fab-pulse {
  0%   { transform: scale(1); opacity: .7; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
@media (max-width: 640px) {
  .whatsapp-fab { right: 12px; bottom: 12px; width: 50px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab::after { animation: none; opacity: 0; }
}

/* ---------- Form success toast (shared behaviour) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(16px);
  z-index: var(--z-float);
  background: #14243a;
  color: #f4f0e6;
  border: 1px solid rgba(217, 188, 122, .4);
  border-radius: 10px;
  padding: 14px 22px;
  font-size: .9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease, transform .4s cubic-bezier(.22,1,.36,1);
  max-width: min(92vw, 420px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
