/* ===== DermaSense · Belleza y Bienestar ===== */

:root {
  /* Brand */
  --terracotta: #d06030;      /* logo color */
  --terracotta-dark: #b04d22; /* AA contrast on white */
  --terracotta-700: #9f451e;  /* AA for small labels on cream-2 */
  --terracotta-800: #8f3d1a;
  --terracotta-100: #f6e2d6;
  --terracotta-50: #fbeee6;
  --sage: #8a9a6b;

  /* Neutrals */
  --cream: #faf4ee;
  --cream-2: #f4e8df;
  --white: #ffffff;
  --ink: #38271d;
  --muted: #6f5d50;           /* AA (>=4.5:1) on cream, cream-2 and white */
  --line: #ecdccf;

  /* System */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 18px 40px -24px rgba(120, 60, 30, 0.45);
  --shadow-sm: 0 8px 24px -16px rgba(120, 60, 30, 0.5);
  --maxw: 1160px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Keyboard focus indicator */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.gallery-item:focus-visible,
.loc-item:focus-visible {
  outline: 3px solid var(--terracotta-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

a { color: var(--terracotta-dark); text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.4rem; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--terracotta-dark); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--terracotta-700);
  margin: 0 0 0.7rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.82rem 1.5rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--terracotta-dark); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--terracotta-800); color: #fff; }
.btn-ghost { background: transparent; color: var(--terracotta-dark); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); border-color: var(--terracotta-100); color: var(--terracotta-dark); }
.btn-light { background: #fff; color: var(--terracotta-dark); }
.btn-light:hover { color: var(--terracotta-800); }
.btn-wa { background: var(--terracotta-dark); color: #fff; padding: 0.6rem 1.1rem; }
.btn-wa:hover { background: var(--terracotta-800); color: #fff; }

.ico-wa, .ico-ig { width: 1.15em; height: 1.15em; fill: currentColor; }
.ico-ig { fill: none; stroke: currentColor; stroke-width: 2; }

/* ===== Topbar ===== */
.topbar {
  background: var(--terracotta-dark);
  color: #fff;
  font-size: 0.82rem;
}
.topbar-inner { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.5rem 1.4rem; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 700; }
.topbar-sep { opacity: 0.5; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand-mark { border-radius: 50%; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; color: var(--terracotta-dark); letter-spacing: -0.02em; }

.nav-links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav-links > li > a:not(.btn) { color: var(--ink); font-weight: 600; font-size: 0.98rem; position: relative; }
.nav-links > li > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--terracotta); transition: width 0.2s ease;
}
.nav-links > li > a:not(.btn):hover::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; background: none; border: 0; padding: 10px; min-width: 44px; min-height: 44px; cursor: pointer; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero { position: relative; padding: 4.5rem 0 3.5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
.hero-copy h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 500; margin-bottom: 1.1rem; }
.hero-copy h1 em { font-style: italic; color: var(--terracotta-dark); }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 34rem; margin: 0 0 2rem; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero-media { position: relative; }
.hero-media > img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: center 14%;
  border-radius: 140px 140px var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero-badge {
  position: absolute; bottom: 1.2rem; left: -0.6rem;
  display: flex; align-items: center; gap: 0.6rem;
  background: #fff; padding: 0.7rem 1rem; border-radius: 16px; box-shadow: var(--shadow-sm);
}
.hero-badge img { border-radius: 50%; }
.hero-badge strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--terracotta-dark); line-height: 1; }
.hero-badge span { font-size: 0.78rem; color: var(--muted); }

.blob { position: absolute; border-radius: 50%; filter: blur(10px); z-index: 0; }
.blob-1 { width: 340px; height: 340px; background: radial-gradient(circle, var(--terracotta-100), transparent 70%); top: -80px; right: -60px; }
.blob-2 { width: 300px; height: 300px; background: radial-gradient(circle, #e7ecd9, transparent 70%); bottom: -120px; left: -80px; }
.hero-grid { position: relative; z-index: 1; }

/* ===== Strip marquee ===== */
.strip { background: var(--terracotta-dark); color: #fff; overflow: hidden; padding: 0.9rem 0; }
.strip-track { display: flex; align-items: center; gap: 2.2rem; white-space: nowrap; width: max-content; animation: marquee 40s linear infinite; font-family: var(--serif); font-size: 1.15rem; font-style: italic; }
.strip-track span { opacity: 0.95; }
.strip-sep { color: var(--terracotta-100); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip-track { animation: none; } }

/* ===== Sections ===== */
.section { padding: 5rem 0; }
.section-alt { background: var(--cream-2); }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.section-sub { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* ===== Services grid ===== */
.grid { display: grid; gap: 1.3rem; }
.services { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem 1.5rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--terracotta-100); }
.card-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 15px;
  background: var(--terracotta-50); margin-bottom: 1rem;
}
.card-ico svg { width: 28px; height: 28px; fill: none; stroke: var(--terracotta-dark); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.28rem; margin-bottom: 0.35rem; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }

.services-note { text-align: center; margin-top: 2.5rem; color: var(--muted); font-size: 1.05rem; }
.services-note a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.about-media { position: relative; padding-bottom: 2.5rem; padding-right: 2.5rem; }
.about-media > img { width: 82%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-media-2 { position: absolute; right: 0; bottom: 0; width: 52% !important; border: 6px solid var(--cream-2); }
.about-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.about-copy p { color: var(--muted); margin: 0 0 1rem; }
.about-points { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.about-points li { display: flex; gap: 0.7rem; align-items: baseline; padding: 0.35rem 0; font-weight: 600; color: var(--ink); }
.about-points span { color: var(--terracotta); font-size: 0.9rem; }

/* ===== Gallery ===== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item { overflow: hidden; border-radius: var(--radius-sm); aspect-ratio: 1; box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-cta { text-align: center; margin-top: 2.2rem; }

/* ===== Location ===== */
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.loc-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.loc-copy > p { color: var(--muted); }
.loc-items { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.6rem; }
.loc-item {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1rem 1.2rem; color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.loc-item:hover { transform: translateX(4px); box-shadow: var(--shadow-sm); }
.loc-item strong { color: var(--terracotta-dark); }
.loc-ico { flex: none; display: inline-flex; width: 46px; height: 46px; border-radius: 12px; background: var(--terracotta-50); align-items: center; justify-content: center; }
.loc-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--terracotta-dark); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.map-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  aspect-ratio: 4/3; border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 30%, var(--terracotta-100), transparent 60%),
    repeating-linear-gradient(45deg, var(--cream), var(--cream) 16px, var(--cream-2) 16px, var(--cream-2) 32px);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink);
}
.map-pin { font-size: 2.6rem; }
.map-text { font-family: var(--serif); font-size: 1.4rem; color: var(--terracotta-800); }
.map-open { font-weight: 700; color: var(--terracotta-800); font-size: 0.95rem; }

/* ===== CTA band ===== */
.cta-band { background: linear-gradient(135deg, var(--terracotta-dark), var(--terracotta-800)); color: #fff; padding: 4.5rem 0; text-align: center; }
.cta-inner { max-width: 40rem; margin: 0 auto; }
.cta-inner h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); color: #fff; }
.cta-inner p { font-size: 1.12rem; margin: 0 0 1.8rem; }

/* ===== Footer ===== */
.site-footer { background: #2c1d14; color: #e9dcd2; padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 2.5rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: #c8b5a8; max-width: 22rem; margin: 1rem 0 0; }
.footer-col h3 { font-family: var(--sans); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: #d8c5b8; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 2.5rem; padding-top: 1.5rem; }
.footer-bottom p { color: #b6a396; font-size: 0.86rem; margin: 0; text-align: center; }

/* ===== Floating WhatsApp ===== */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.7);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

/* ===== Reveal animation (gated on JS so content shows without/before JS) ===== */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.4rem 1.2rem;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path 0.3s ease, visibility 0.3s ease;
    box-shadow: var(--shadow);
  }
  .nav-links.open { clip-path: inset(0 0 0 0); visibility: visible; }
  .nav-links > li { padding: 0.35rem 0; }
  .nav-links > li > a:not(.btn) { display: block; padding: 0.5rem 0; }
  .btn-wa { justify-content: center; margin-top: 0.5rem; }

  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-media { max-width: 460px; margin: 0 auto; }
  .about-grid, .loc-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-media { max-width: 460px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .section { padding: 3.5rem 0; }
  .hero { padding: 3rem 0 2.5rem; }
  .services { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar-inner span:nth-child(3), .topbar-sep:nth-of-type(2) { display: none; }
}
