/* ============================================================
   NATALIA CÁRDENAS · MEDICINA ESTÉTICA
   Rediseño 2025 — Luxury Editorial
   ============================================================ */

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

/* ── Variables ────────────────────────────────────────────── */
:root {
  --linen:       #F5F1EB;
  --linen-deep:  #EDE8DE;
  --carbon:      #1A1916;
  --warm-grey:   #7A746E;
  --hairline:    #DDD7CE;
  --azul:        #4A637C;
  --azul-faint:  rgba(74, 99, 124, 0.06);

  --ff-display:  'Cormorant Garamond', Georgia, serif;
  --ff-body:     'DM Sans', system-ui, sans-serif;

  --nav-h:       72px;
  --pad-x:       clamp(28px, 7vw, 100px);
  --section-v:   clamp(88px, 11vw, 152px);
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --t:           0.55s var(--ease);
  --t-fast:      0.22s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  font-weight: 300;
  color: var(--carbon);
  background: var(--linen);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* ── Typography ───────────────────────────────────────────── */
.d-xl {
  font-family: var(--ff-display);
  font-size: clamp(4.2rem, 9.5vw, 11rem);
  font-weight: 300;
  line-height: 0.93;
  letter-spacing: -0.03em;
}
.d-lg {
  font-family: var(--ff-display);
  font-size: clamp(3rem, 6vw, 7rem);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.022em;
}
.d-md {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 4vw, 5rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.016em;
}
.d-sm {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 2.5vw, 2.6rem);
  font-weight: 300;
  line-height: 1.18;
}
.label {
  font-family: var(--ff-body);
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--azul);
}
.body-text {
  font-size: 0.93rem;
  line-height: 1.82;
  color: var(--warm-grey);
  font-weight: 300;
}
.italic, em { font-style: italic; }
.text-azul { color: var(--azul); }
.text-grey { color: var(--warm-grey); }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section { padding: var(--section-v) 0; }

/* ── Reveal animations ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.r1 { transition-delay: 0.10s; }
.r2 { transition-delay: 0.20s; }
.r3 { transition-delay: 0.30s; }
.r4 { transition-delay: 0.40s; }
.r5 { transition-delay: 0.50s; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
  background: rgba(245, 241, 235, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.nav.scrolled { border-bottom-color: var(--hairline); }

/* Three equal arms: left and right flex:1 keep logo centered always */
.nav-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  min-width: 0;
}
.nav-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}
.nav-logo img { height: 80px; width: auto; mix-blend-mode: multiply; }
.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  min-width: 0;
}
.nav-links {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--carbon);
  position: relative;
  transition: color var(--t-fast);
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--azul);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--azul); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-ig {
  color: var(--warm-grey);
  display: flex;
  align-items: center;
  transition: color var(--t-fast);
}
.nav-ig:hover { color: var(--azul); }

.nav-cta {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--azul);
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-cta::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-cta:hover::after { transform: scaleX(1); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  width: 40px;
  height: 40px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--carbon);
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile overlay ───────────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: var(--linen);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
.nav-overlay.open { opacity: 1; pointer-events: all; }

.nav-overlay-links {
  width: 100%;
  padding: 0 var(--pad-x);
}
.nav-overlay-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 300;
  color: var(--carbon);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color var(--t-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-overlay-link:first-child { border-top: 1px solid var(--hairline); }
.nav-overlay-link:hover { color: var(--azul); }
.nav-overlay.open .nav-overlay-link { opacity: 1; transform: none; }
.nav-overlay.open .nav-overlay-link:nth-child(1) { transition-delay: 0.05s; }
.nav-overlay.open .nav-overlay-link:nth-child(2) { transition-delay: 0.10s; }
.nav-overlay.open .nav-overlay-link:nth-child(3) { transition-delay: 0.15s; }
.nav-overlay.open .nav-overlay-link:nth-child(4) { transition-delay: 0.20s; }
.nav-overlay.open .nav-overlay-link:nth-child(5) { transition-delay: 0.25s; }
.nav-overlay-link svg { opacity: 0.4; flex-shrink: 0; }

/* ── Link styles ──────────────────────────────────────────── */
.link-text {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--azul);
  position: relative;
}
.link-text::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: calc(100% - 28px);
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.link-text:hover::after { width: 100%; }
.link-text svg { transition: transform 0.35s var(--ease); }
.link-text:hover svg { transform: translateX(5px); }

/* ── Editorial list (home featured treatments) ────────────── */
.trat-list { width: 100%; }
.trat-row {
  display: grid;
  grid-template-columns: 56px 1fr auto 28px;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: padding-left var(--t-fast);
}
.trat-row:first-child { border-top: 1px solid var(--hairline); }
.trat-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--azul);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.trat-row:hover { padding-left: 14px; }
.trat-row:hover::before { transform: scaleY(1); }
.trat-num {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--hairline);
  transition: color var(--t-fast);
  user-select: none;
}
.trat-row:hover .trat-num { color: var(--azul); }
.trat-name {
  font-family: var(--ff-display);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 400;
  transition: color var(--t-fast);
}
.trat-row:hover .trat-name { color: var(--azul); }
.trat-tag {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-grey);
  white-space: nowrap;
}
.trat-arrow {
  color: var(--azul);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity var(--t-fast), transform var(--t-fast);
  display: flex;
  align-items: center;
}
.trat-row:hover .trat-arrow { opacity: 1; transform: none; }

/* ── Accordion (tratamientos page) ───────────────────────── */
.acc-list { width: 100%; }
.acc-item { border-bottom: 1px solid var(--hairline); }
.acc-item:first-child { border-top: 1px solid var(--hairline); }
.acc-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr auto 36px;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: padding-left var(--t-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.acc-trigger::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--azul);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.acc-item.open .acc-trigger::before { transform: scaleY(1); }
.acc-item.open .acc-trigger { padding-left: 14px; }
.acc-num {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--hairline);
  transition: color var(--t-fast);
  user-select: none;
}
.acc-item.open .acc-num { color: var(--azul); }
.acc-title {
  font-family: var(--ff-display);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 400;
}
.acc-cat {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-grey);
  white-space: nowrap;
}
.acc-icon {
  width: 34px; height: 34px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--warm-grey);
  transition: all 0.4s var(--ease);
}
.acc-item.open .acc-icon {
  border-color: var(--azul);
  background: var(--azul);
  color: white;
  transform: rotate(45deg);
}
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.65s var(--ease);
}
.acc-item.open .acc-body { max-height: 900px; }
.acc-content {
  padding: 4px 0 36px 76px;
}
.acc-desc { max-width: 580px; margin-bottom: 20px; }
.acc-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  margin-bottom: 16px;
}
.acc-meta-item { display: flex; flex-direction: column; gap: 4px; }
.acc-meta-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-grey);
}
.acc-meta-val {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--carbon);
}
.acc-obs {
  display: block;
  font-size: 0.83rem;
  font-style: italic;
  color: var(--warm-grey);
  padding-left: 14px;
  border-left: 1px solid var(--azul);
  line-height: 1.6;
}

/* ── Form ─────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-grey);
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  font-family: var(--ff-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--carbon);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--t-fast);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus { border-bottom-color: var(--azul); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { cursor: pointer; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--azul);
}
.form-check span {
  font-size: 0.8rem;
  color: var(--warm-grey);
  line-height: 1.5;
}
.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--linen);
  background: var(--azul);
  padding: 16px 36px;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.btn-submit:hover { background: #3A5268; transform: translateY(-1px); }
.btn-submit svg { transition: transform 0.35s var(--ease); }
.btn-submit:hover svg { transform: translateX(4px); }

/* ── Filter pills ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0;
}
.filter-btn {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-grey);
  padding: 16px 24px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}
.filter-btn:hover { color: var(--azul); }
.filter-btn.active { color: var(--azul); border-bottom-color: var(--azul); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--hairline);
  padding: 64px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
}
.footer-brand img { height: 68px; margin-bottom: 20px; mix-blend-mode: multiply; }
.footer-brand p {
  font-size: 0.82rem;
  color: var(--warm-grey);
  line-height: 1.75;
  max-width: 280px;
}
.footer-col h5 {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--azul);
  margin-bottom: 22px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a {
  font-size: 0.82rem;
  color: var(--warm-grey);
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--carbon); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 0.7rem;
  color: var(--warm-grey);
  letter-spacing: 0.06em;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .acc-content { padding-left: 0; }
}
@media (max-width: 768px) {
  :root { --nav-h: 64px; --pad-x: 24px; --section-v: clamp(64px, 10vw, 96px); }

  /* Hide the entire UL (not just the anchors) — eliminates ghost gap space */
  .nav-links { display: none !important; }
  .nav-hamburger { display: flex; }
  .nav-right .nav-cta { display: none; }
  .nav-right .nav-ig { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .acc-trigger { grid-template-columns: 40px 1fr 34px; gap: 12px; }
  .acc-cat { display: none; }
  .acc-content { padding-left: 0; }
  .trat-row { grid-template-columns: 44px 1fr 22px; gap: 12px; }
  .trat-tag { display: none; }
  .filter-btn { padding: 14px 16px; }
}
@media (max-width: 480px) {
  .acc-trigger { grid-template-columns: 34px 1fr 32px; gap: 10px; }
  .trat-row { grid-template-columns: 34px 1fr 20px; gap: 10px; }
  .acc-meta { gap: 20px; }
}
