/* ============================================================
   Lûnae Studio — design tokens
   Palette matches the real brand world seen on Instagram: soft
   blush pink, warm lavender-to-rose gradient, deep plum ink.
   Light (blush) is the default; dark is a moody plum alternative
   via the header toggle.
   ============================================================ */

:root {
  --bg: #faf1f1;
  --bg-elevated: #ecd3da;
  --bg-elevated-2: #d9b6c2;
  --fg: #3c2430;
  --fg-muted: #8a6672;
  /* Darker than --fg-muted specifically for nav/contact-intent links, so
     they clear WCAG AA (4.5:1) against --bg-elevated-2 and --header-bg. */
  --fg-muted-contrast: #70324a;
  --line: rgba(60, 36, 48, 0.14);
  --header-bg: rgba(250, 241, 241, 0.88);

  --grad-a: #b98fd9;
  --grad-b: #f0a3c4;
  --accent-grad: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  --on-grad: #2c1a29;

  --radius-sm: 10px;
  --radius-md: 22px;
  --radius-pill: 999px;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1200px;
}

:root[data-theme="dark"] {
  --bg: #2a1a24;
  --bg-elevated: #35202c;
  --bg-elevated-2: #402535;
  --fg: #f7e9ed;
  --fg-muted: #cba3b1;
  --fg-muted-contrast: #cba3b1;
  --line: rgba(247, 233, 237, 0.14);
  --header-bg: rgba(42, 26, 36, 0.88);
  --on-grad: #2c1a29;
}

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

/* Stroke-length utilities for the draw-in SVG accents. Kept as classes
   (not inline style="--len:N") so they aren't blocked by a strict CSP
   style-src that has no 'unsafe-inline'. */
.len-45 { --len: 45; }
.len-65 { --len: 65; }
.len-135 { --len: 135; }
.len-290 { --len: 290; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}
.star { animation: twinkle 5s ease-in-out infinite; }
.star-2 { animation-delay: 1.3s; }

h1, h2 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--fg);
}
h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.5em;
  color: var(--fg);
}

h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw + 1rem, 2.5rem); }

p { margin: 0 0 1em; color: var(--fg-muted); max-width: 62ch; }

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

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

.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Buttons — soft gradient pill, matches the real promo-card style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  /* transform-only: box-shadow was dropped from this transition since
     animating box-shadow is paint-triggering, not compositor-friendly */
  transition: transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--grad-a); outline-offset: 3px; }

.btn-primary {
  background: var(--accent-grad);
  color: var(--on-grad);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(185, 143, 217, 0.4); transform: translateY(-1px); }

/* ============ Reveal-on-scroll (IntersectionObserver driven) ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  /* Reduced blur radius: the header is sticky and on-screen for the whole
     scroll, so a lighter blur cuts ongoing compositing cost while keeping
     the frosted-glass look. */
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s var(--ease);
}

.topbar {
  background: var(--bg-elevated-2);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 36px;
  font-size: 0.76rem;
  color: var(--fg-muted-contrast);
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.topbar-item:hover { color: var(--fg); }

@media (max-width: 560px) {
  .topbar-item--ig { display: none; }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark-img { width: 34px; height: 34px; object-fit: contain; filter: invert(1); transition: filter 0.3s var(--ease); }
:root[data-theme="dark"] .brand-mark-img { filter: none; }

/* Lotus "breathes": an almost-imperceptible scale + opacity pulse on the
   header/footer mark, since it lives in the sticky header and is always
   on screen. Transform/opacity only (compositor), amplitude kept tiny
   (<=3.5%) so it never reads as a hover/loading affordance. */
@keyframes lotus-breathe {
  0%, 100% { transform: scale(1); opacity: 0.94; }
  50% { transform: scale(1.035); opacity: 1; }
}
.brand-mark-img { transform-origin: 50% 55%; animation: lotus-breathe 8s var(--ease) infinite; }
@media (prefers-reduced-motion: reduce) {
  .brand-mark-img { animation: none; transform: none; opacity: 1; }
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.4rem;
}
.brand-spark { width: 8px; height: 8px; color: var(--grad-b); transform: translateY(-2px); }
.brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.nav-right { display: flex; align-items: center; gap: 32px; flex: 1; justify-content: flex-end; }
.header-actions { display: flex; align-items: center; gap: 16px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--grad-b); }
.theme-toggle:focus-visible { outline: 2px solid var(--grad-b); outline-offset: 2px; }

.main-nav { display: none; align-items: center; gap: 32px; font-size: 0.92rem; }
.main-nav a { color: var(--fg-muted-contrast); transition: color 0.2s var(--ease); }
.main-nav a:hover { color: var(--fg); }

@media (min-width: 900px) {
  .nav-left { flex: 1; justify-content: flex-end; }
}

.nav-cta { display: none; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 24px;
  border-top: 1px solid var(--line);
  /* Topbar (36px) + header-inner (76px) = 112px of sticky chrome above this
     panel; cap it to the remaining viewport height and let it scroll so the
     "Agendar cita" CTA stays reachable on short/landscape phone screens. */
  max-height: calc(100vh - 112px);
  max-height: calc(100dvh - 112px);
  overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: 12px 0; color: var(--fg-muted-contrast); border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 16px; }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding-block: 88px 96px; }
.hero-copy { max-width: 54ch; position: relative; z-index: 1; }
.hero-sub { font-size: 1.15rem; margin-bottom: 2em; }

@media (min-width: 900px) {
  .hero { padding-block: 96px 132px; }
  .hero-copy { max-width: 760px; }
  .hero h1 { font-size: clamp(2.6rem, 5vw + 1rem, 4.2rem); }
}

/* ============================================================
   About — photo + editorial text
   ============================================================ */
.about { padding-block: 96px; border-top: 1px solid var(--line); background: var(--bg-elevated); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
.about-photo-frame {
  position: relative;
  max-width: 380px;
  margin-inline: auto;
  justify-self: center;
}
.about-photo {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-inner { max-width: 60ch; }
.about-inner p:last-child { margin-bottom: 0; }

/* Botanical sprig that draws itself in behind the "Sobre nosotros" photo the
   first time the section enters view, then stays static (not a loop).
   Desktop-only decoration; hidden on narrow viewports. */
.about-branch { display: none; }
@media (prefers-reduced-motion: reduce) {
  .about-branch path { stroke-dashoffset: 0; transition: none; }
}

@media (min-width: 800px) {
  .about-grid { grid-template-columns: 0.7fr 1.3fr; gap: 56px; align-items: start; }

  .about-branch {
    display: block;
    position: absolute;
    top: -24px;
    right: -36px;
    width: 150px;
    height: auto;
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
  }
  .about-branch path {
    fill: none;
    stroke: var(--fg-muted);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: var(--len);
    stroke-dashoffset: var(--len);
    transition: stroke-dashoffset 1.8s var(--ease);
  }
  .about-branch path:nth-of-type(2) { transition-delay: 0.25s; }
  .about-branch path:nth-of-type(3) { transition-delay: 0.45s; }
  .about-photo.is-visible ~ .about-branch path { stroke-dashoffset: 0; }
}

/* ============================================================
   Services
   ============================================================ */
.services { padding-block: 96px; border-top: 1px solid var(--line); }
.services h2 { margin-bottom: 0.9em; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.service-card {
  padding: 36px 32px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
.service-card i { font-size: 1.7rem; color: var(--grad-b); margin-bottom: 16px; display: block; }
.service-card p { margin-bottom: 0; }

@media (min-width: 700px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Quote — matches the real brand's quote-card post
   ============================================================ */
.quote-section { padding-block: 88px; background: var(--bg-elevated); }
.quote-card {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  padding: 56px 32px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
/* Thin tendril that draws itself in over the quote card's top-left corner
   the first time it enters view, reinforcing the editorial/printed feel of
   the big quote glyph. Reuses the accent tone to read as a lighter sibling
   of the "about" branch decoration. */
.quote-vine {
  position: absolute;
  top: -10px;
  left: -14px;
  width: 60px;
  height: auto;
  opacity: 0.4;
  pointer-events: none;
}
.quote-vine path {
  fill: none;
  stroke: var(--grad-b);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1.4s var(--ease) 0.1s;
}
.quote-card.is-visible .quote-vine path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .quote-vine path { stroke-dashoffset: 0; transition: none; }
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--grad-b);
  display: block;
  margin-bottom: 8px;
}
.quote-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2vw + 1rem, 1.8rem);
  color: var(--fg);
  max-width: 46ch;
  margin: 0 auto;
}

/* ============================================================
   Process — editorial numbered rows
   ============================================================ */
.process { padding-block: 96px; border-top: 1px solid var(--line); background: var(--bg-elevated); }
.process h2 { margin-bottom: 1.2em; max-width: 20ch; }

.process-list { list-style: none; margin: 0; padding: 0; }
.process-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: baseline;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.process-list li:last-child { border-bottom: 1px solid var(--line); }
.process-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--grad-b);
}
.process-list h3 { margin-bottom: 0.3em; }
.process-list p { margin-bottom: 0; }

/* ============================================================
   Mid-page CTA band — soft gradient, matches the promo post
   ============================================================ */
.cta-band { padding-block: 32px 96px; }
.cta-band-inner {
  padding: 56px 32px;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--accent-grad);
  position: relative;
  overflow: hidden;
}
/* A single oversized, translucent petal drifting almost imperceptibly in
   the promo card's corner — ambient air, not a bounce. Clipped cleanly by
   the card's own overflow:hidden + rounded corners; kept behind the copy
   (first child) and low-opacity so it never competes with the title/CTA. */
.cta-petal {
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: 180px;
  height: auto;
  opacity: 0.14;
  pointer-events: none;
  animation: petal-drift 20s var(--ease) infinite;
  z-index: 0;
}
@keyframes petal-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-6px, -10px) rotate(3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-petal { animation: none; }
}

.cta-band-inner::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: calc(var(--radius-md) - 6px);
  pointer-events: none;
}
.cta-band-inner h2,
.cta-band-inner p { color: var(--on-grad); position: relative; }
.cta-band-inner p { opacity: 0.85; }
.cta-band-inner h2 { margin-bottom: 0.2em; }
.cta-band-inner p { margin-bottom: 1.6em; }
.cta-band-inner .btn-primary {
  background: var(--on-grad);
  color: #fff;
  position: relative;
}

/* ============================================================
   Why — divided strip (no cards)
   ============================================================ */
.why { padding-block: 96px; }
.why h2 { margin-bottom: 1em; }
.why-strip { display: grid; grid-template-columns: 1fr; }
.why-item { padding-block: 28px; border-top: 1px solid var(--line); }
.why-item:last-child { border-bottom: 1px solid var(--line); }
.why-item p { margin-bottom: 0; }

@media (min-width: 800px) {
  .why-strip { grid-template-columns: repeat(3, 1fr); }
  .why-item { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 8px 32px; }
  .why-item:first-child { border-left: none; padding-left: 0; }
  .why-item:last-child { border-bottom: none; }
}

/* ============================================================
   FAQ — accordion
   ============================================================ */
.faq { padding-block: 96px; border-top: 1px solid var(--line); }
.faq-inner { max-width: 760px; }
.faq h2 { margin-bottom: 1em; }

.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-item:first-child { border-top: 1px solid var(--line); }

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  text-align: left;
  padding: 22px 0;
  cursor: pointer;
}
.accordion-trigger i { color: var(--grad-b); transition: transform 0.3s var(--ease); flex-shrink: 0; }
.accordion-trigger[aria-expanded="true"] i { transform: rotate(180deg); }

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s var(--ease);
  /* Scopes the layout recalculation this transition forces to just this
     panel, instead of letting the browser consider the rest of the page. */
  contain: layout;
}
.accordion-panel > p { overflow: hidden; min-height: 0; margin: 0 0 22px; }
.accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; }

/* ============================================================
   Contact
   ============================================================ */
.contact { padding-block: 96px; border-top: 1px solid var(--line); background: var(--bg-elevated); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: stretch; }
.contact-copy h2 { margin-bottom: 0.4em; }

.contact-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--fg-muted); }
.contact-list i { color: var(--grad-b); font-size: 1.1rem; }
.contact-list a { color: var(--fg); border-bottom: 1px solid transparent; transition: border-color 0.2s var(--ease); }
.contact-list a:hover { border-color: var(--grad-b); }
/* Plain (non-button) contact links, e.g. WhatsApp: widen the tap target to
   the ~44px minimum recommended for mobile without changing the button-
   styled booking link below, which already clears that via .btn padding. */
.contact-list a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 10px;
}

.contact-map { min-height: 280px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
.contact-map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; }

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { padding-block: 56px 40px; border-top: 1px solid var(--line); background: var(--bg-elevated-2); }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.footer-tag { font-family: var(--font-display); font-style: italic; color: var(--fg-muted); margin: 0; padding-bottom: 4px; line-height: 1.4; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.footer-nav a { color: var(--fg-muted-contrast); }
.footer-nav a:hover { color: var(--fg); }
.footer-copy { font-size: 0.85rem; color: var(--fg-muted); opacity: 0.8; margin: 8px 0 0; }
.footer-credit { font-size: 0.8rem; color: var(--fg-muted); opacity: 0.7; margin: 0; }
.footer-credit a { color: var(--fg-muted); border-bottom: 1px solid var(--line); transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.footer-credit a:hover { color: var(--fg); border-color: var(--fg); }
