/* ============================================================
   Dra. Lorena Ávila — Dermatologia & Tricologia
   Design foundation
   ============================================================ */

:root {
  /* Brand greens (from the filigree logo) */
  --verde: #2d4a45;
  --verde-deep: #1b322e;
  --verde-deeper: #142824;
  --verde-soft: #5e7a73;
  --verde-line: #3c5b54;

  /* Warm grounds */
  --ivory: #fbf7f0;
  --ivory-2: #f7f1e7;
  --sand: #f1e9db;
  --nude: #e7dac8;
  --blush: #f3e6e1;
  --blush-deep: #ecd6cf;

  /* Metal */
  --gold: #bf9d5c;
  --gold-soft: #d7c197;
  --gold-deep: #a8854a;

  /* Ink + text */
  --ink: #2a2723;
  --text: #6f665b;
  --text-soft: #8c8275;

  /* On dark */
  --cream: #f4eee3;
  --cream-muted: rgba(244, 238, 227, 0.72);
  --cream-faint: rgba(244, 238, 227, 0.42);

  /* Type */
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Outfit", "Helvetica Neue", Arial, sans-serif;

  /* Metrics */
  --wide: 1240px;
  --narrow: 760px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

::selection { background: var(--verde); color: var(--ivory); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 32px; }
.narrow { max-width: var(--narrow); }

section { position: relative; }

.pad { padding-block: clamp(72px, 11vw, 148px); }
.pad-sm { padding-block: clamp(56px, 8vw, 104px); }

/* ---------- Type scale ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.on-dark .eyebrow { color: var(--gold-soft); }
.on-dark .eyebrow::before,
.on-dark .eyebrow.center::after { background: var(--gold-soft); opacity: 0.7; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--verde);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.04;
}

.display {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
}
.h2 {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.06;
}
.h3 {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.12;
}
em, .ital {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-deep);
}
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--cream); }
.on-dark em, .on-dark .ital { color: var(--gold-soft); }

.lead {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--text);
  line-height: 1.78;
  font-weight: 300;
  max-width: 56ch;
}
.on-dark .lead, .on-dark p { color: var(--cream-muted); }

p { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  padding: 16px 30px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.45s var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform 0.45s var(--ease); }
.btn-primary {
  background: var(--verde);
  color: var(--cream);
}
.btn-primary:hover { background: var(--verde-deep); transform: translateY(-2px); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(168, 133, 74, 0.6);
}
.btn-gold:hover { background: var(--gold-deep); transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(168, 133, 74, 0.7); }
.btn-gold:hover svg { transform: translateX(3px); }
.btn-ghost {
  background: transparent;
  color: var(--verde);
  border-color: rgba(45, 74, 69, 0.28);
}
.btn-ghost:hover { border-color: var(--verde); background: rgba(45, 74, 69, 0.04); }
.on-dark .btn-ghost { color: var(--cream); border-color: rgba(244, 238, 227, 0.32); }
.on-dark .btn-ghost:hover { border-color: var(--cream); background: rgba(244, 238, 227, 0.07); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Decorative line/mark helpers ---------- */
.mark-watermark {
  position: absolute;
  opacity: 0.05;
  pointer-events: none;
  filter: grayscale(0);
}

.hair-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(191,157,92,0.5), transparent);
  border: 0;
  margin: 0;
}

/* ---------- Layout / utility helpers ---------- */
/* Reserve header height (topbar 42 + header 88) so the HTMX include
   swap-in does not cause layout shift. */
.header-slot { min-height: 130px; }
.bg-ivory { background: var(--ivory); }
.bg-ivory-2 { background: var(--ivory-2); }
.tac { text-align: center; }
.sec-head--mb { margin-bottom: 54px; }
.mt-22 { margin-top: 22px; }
.mt-8 { margin-top: 8px; }
.cta-inner { position: relative; z-index: 2; }
.mm-logo { height: 44px; }
.tech-figure .tech-photo {
  object-fit: contain;
  padding-top: 24px;
  background: linear-gradient(160deg, #3c5b54, #1b322e);
}
