/* ==========================================================================
   Dr. Sergio Barroso — Tricología & Trasplante Capilar
   Landing page premium — mobile-first
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root{
  --navy: #0c161e;
  --navy-deep: #08111a;
  --ivory: #F7F4EE;
  --gold: #C9A96A;
  --gold-light: #E4D2A8;
  --gold-dark: #A6813F;
  --gray: #6C7483;
  --white: #FFFFFF;

  --font-display: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --container-narrow: 720px;

  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --dur-s: .35s;
  --dur-m: .6s;
  --dur-l: .9s;

  --shadow-card: 0 1px 2px rgba(23,58,112,.04), 0 12px 32px -12px rgba(23,58,112,.14);
  --shadow-card-hover: 0 4px 10px rgba(23,58,112,.06), 0 24px 48px -16px rgba(23,58,112,.22);
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body{
  margin: 0;
  background: var(--white);
  color: #14161B;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
ul, ol{ list-style: none; margin: 0; padding: 0; }
h1,h2,h3,h4,p{ margin: 0; }
svg{ display: block; }

:focus-visible{
  outline: 2px solid var(--gold-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

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

/* ---------- Layout helpers ---------- */
.wrap{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow{ max-width: var(--container-narrow); }
.center{ text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow{
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}

h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: #14161B;
  max-width: 20ch;
}
h2.center{ max-width: 22ch; }

.accent{ color: var(--navy); }

.section-lede{
  font-size: 1.02rem;
  color: var(--gray);
  max-width: 50ch;
  margin-top: 16px;
}

/* ---------- Buttons & links ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 12px;
  transition: transform var(--dur-s) var(--ease), box-shadow var(--dur-s) var(--ease), background var(--dur-s) var(--ease);
  white-space: nowrap;
}
.btn svg{
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.btn-primary{
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(23,58,112,.45);
}
.btn-primary:hover{
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -12px rgba(23,58,112,.55);
}
.btn-block{ width: 100%; padding: 18px 30px; font-size: 1.02rem; }

.link-underline{
  font-size: .95rem;
  font-weight: 600;
  color: #14161B;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--gold);
  transition: color var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.link-underline:hover{ color: var(--navy); border-color: var(--navy); }

/* ---------- Reveal-on-scroll ---------- */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-l) var(--ease), transform var(--dur-l) var(--ease);
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Check icons / lists ---------- */
.check-icon{
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.check-icon svg{
  width: 100%; height: 100%;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-checklist,
.check-list{
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
}
.hero-checklist li,
.check-list li{
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .97rem;
  font-weight: 500;
  color: #14161B;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header{
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand{ display: inline-flex; max-width: 100%; }
.brand-logo{
  width: clamp(320px, 78vw, 680px);
  max-width: 100%;
  height: auto;
}

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-fab{
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px -6px rgba(37,211,102,.6);
  transition: transform var(--dur-s) var(--ease), box-shadow var(--dur-s) var(--ease);
}
.whatsapp-fab:hover{
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 34px -8px rgba(37,211,102,.7);
}
.whatsapp-fab svg{
  width: 28px; height: 28px;
  fill: none; stroke: var(--white); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  background: var(--ivory);
  padding: 56px 0 0;
  overflow: hidden;
}
.hero-grid{
  display: grid;
  gap: 44px;
}
.hero h1{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  line-height: 1.14;
  letter-spacing: -.01em;
  color: #14161B;
  margin-bottom: 22px;
}
.hero-lede{
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 52ch;
  margin-bottom: 30px;
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-bottom: 8px;
}
.hero-photo{
  margin: 0 -24px 0;
  border-radius: 0;
  overflow: hidden;
}
.hero-photo img{ width: 100%; }

@media (min-width: 720px){
  .hero-photo{
    margin: 0;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}
@media (min-width: 960px){
  .hero-grid{
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
  }
  .hero-photo{ margin-left: 0; margin-right: 0; max-width: none; }
}

/* ==========================================================================
   PROPÓSITO
   ========================================================================== */
.purpose{
  background: var(--ivory);
  padding: 72px 0 88px;
  text-align: center;
}
.purpose-text{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.2vw, 2.15rem);
  line-height: 1.4;
  color: #14161B;
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services{
  background: var(--white);
  padding: 88px 0 96px;
}
.services-grid{
  margin-top: 48px;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
.service-card{
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 32px 28px;
  border: 1px solid rgba(23,58,112,.1);
  transition: box-shadow var(--dur-s) var(--ease), transform var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.service-card:hover{
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
  border-color: rgba(201,169,106,.4);
}
.service-badge{
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: var(--navy);
  margin-bottom: 22px;
}
.service-badge svg{
  width: 28px; height: 28px;
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card h3{
  font-family: var(--font-display);
  font-size: 1.26rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.service-card > p{
  color: var(--gray);
  font-size: .93rem;
  margin-bottom: 20px;
}
.service-bullets{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(23,58,112,.08);
}
.service-bullets li{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: #14161B;
}
.service-bullets li::before{
  content: '';
  flex-shrink: 0;
  width: 15px; height: 15px;
  margin-top: 2px;
  background: var(--navy);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4L19 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4L19 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

/* ==========================================================================
   MÉTODO
   ========================================================================== */
.method{
  background: var(--ivory);
  padding: 88px 0 96px;
}
@media (min-width: 900px){
  .method .wrap{ text-align: center; }
  .method h2{ margin-left: auto; margin-right: auto; }
  .method .section-lede{ margin-left: auto; margin-right: auto; }
}
.steps{
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 640px;
}
@media (min-width: 900px){
  .steps{
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }
}
.step{
  display: flex;
  gap: 22px;
  background: var(--white);
  border: 1px solid rgba(23,58,112,.08);
  border-radius: var(--radius-m);
  padding: 26px 26px;
}
.step-num{
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.step-body h3{
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.step-body p{
  color: var(--gray);
  font-size: .93rem;
  max-width: 44ch;
}

/* ==========================================================================
   TRASPLANTE CAPILAR (galería)
   ========================================================================== */
.transplant{
  background: var(--white);
  padding: 88px 0 96px;
}
.transplant-gallery{
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.transplant-item{
  position: relative;
  margin: 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
}
.transplant-item img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 20%;
}
.transplant-item figcaption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 24px;
  background: linear-gradient(0deg, rgba(14,39,80,.85), transparent);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
@media (min-width: 760px){
  .transplant-gallery{ flex-direction: row; }
  .transplant-item{ flex: 1; }
}

/* ==========================================================================
   PHILOSOPHY
   ========================================================================== */
.philosophy{
  background: var(--navy);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(201,169,106,.14), transparent 55%);
  padding: 100px 0;
  text-align: center;
}
.philosophy-text{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 6vw, 3.1rem);
  line-height: 1.25;
  color: var(--ivory);
}
.gold-em{
  color: var(--gold-light);
  font-style: italic;
}
.philosophy-sub{
  margin-top: 26px;
  font-size: .95rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(247,244,238,.6);
}

/* ==========================================================================
   ABOUT / EL MÉDICO
   ========================================================================== */
.about{
  background: var(--white);
  padding: 96px 0;
}
.about-grid{
  display: grid;
  gap: 44px;
  align-items: start;
}
.about-photo{
  margin: 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.about-photo img{ width: 100%; }
.about-copy h2{ margin: 6px 0 22px; }
.about-copy > p{
  color: var(--gray);
  font-size: 1rem;
  max-width: 48ch;
  margin-bottom: 22px;
}
.pull-quote{
  margin: 0 0 22px;
  padding: 26px 26px 26px 26px;
  border-left: 3px solid var(--gold);
  background: var(--ivory);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.pull-quote p{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.06rem;
  line-height: 1.5;
  color: #14161B;
  margin: 0;
}
@media (min-width: 860px){
  .about-grid{ grid-template-columns: .8fr 1fr; }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq{
  background: var(--ivory);
  padding: 96px 0;
}
.faq h2{ margin: 6px 0 44px; }
.accordion-item{
  border-bottom: 1px solid rgba(23,58,112,.12);
}
.accordion-trigger{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: #14161B;
}
.accordion-trigger svg{
  flex-shrink: 0;
  width: 20px; height: 20px;
  fill: none; stroke: var(--gold-dark); stroke-width: 1.8;
  transition: transform var(--dur-s) var(--ease);
}
.accordion-trigger[aria-expanded="true"] svg{ transform: rotate(180deg); }
.accordion-panel{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-m) var(--ease);
}
.accordion-panel p{
  overflow: hidden;
  color: var(--gray);
  padding-right: 40px;
}
.accordion-item:has(.accordion-trigger[aria-expanded="true"]) .accordion-panel{
  grid-template-rows: 1fr;
}
.accordion-item:has(.accordion-trigger[aria-expanded="true"]) .accordion-panel p{
  padding-bottom: 24px;
}
.accordion-panel.is-open{ grid-template-rows: 1fr; }
.accordion-panel.is-open p{ padding-bottom: 24px; }

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.final-cta{
  background: var(--white);
  padding: 96px 0 110px;
}
.cta-card{
  max-width: 640px;
  margin: 0 auto;
  background: var(--ivory);
  border-radius: var(--radius-l);
  padding: 56px 32px;
  text-align: center;
}
.cta-card h2{
  margin: 0 auto 16px;
}
.cta-card > p:not(.eyebrow){
  color: var(--gray);
  font-size: 1.02rem;
  max-width: 40ch;
  margin: 0 auto 32px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{
  background: var(--white);
  border-top: 1px solid rgba(23,58,112,.08);
  padding: 64px 0 40px;
  text-align: center;
}
.footer-phone{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #14161B;
  margin-bottom: 16px;
}
.footer-phone svg{
  width: 20px; height: 20px;
  fill: none; stroke: #25D366; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.footer-desc{
  color: var(--gray);
  font-size: .92rem;
  max-width: 46ch;
  margin: 0 auto 26px;
}
.footer-links{
  display: flex;
  gap: 26px;
  justify-content: center;
  margin-bottom: 30px;
}
.footer-links a{
  color: var(--navy);
  font-size: .88rem;
  font-weight: 600;
  transition: color var(--dur-s) var(--ease);
}
.footer-links a:hover{ color: var(--gold-dark); }
.footer-rule{
  border: none;
  border-top: 1px solid rgba(23,58,112,.1);
  max-width: var(--container);
  margin: 0 auto 24px;
}
.footer-bottom p{
  color: var(--gray);
  font-size: .8rem;
  margin-bottom: 4px;
}
