/* Mef Hair Studio. Colores tomados de su logo: café, crema y espresso. */
@font-face { font-family: 'Bodoni Moda'; src: url('/fonts/bodoni.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('/fonts/jost.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  --brown: #835929;
  --brown-dark: #6b4820;
  --brown-deep: #5a3c1b;
  --gold: #d6b68c;
  --cream: #f4ebdf;
  --ink: #221912;
  --muted: #6f6257;
  --paper: #f8f3ec;
  --paper-2: #efe5d8;
  --line: #ddd0c0;
  --dark: #221912;
  --serif: 'Bodoni Moda', Didot, 'Bodoni 72', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-optical-sizing: auto; letter-spacing: -0.01em; line-height: 1.08; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { width: min(1200px, 100% - 56px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.i { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Textura de grano sobre los fondos de color */
.hero, .review, .dark, .foot { position: relative; isolation: isolate; }
.hero::before, .review::before, .dark::before, .foot::before { content: ''; position: absolute; inset: 0; background: url('/img/grano.png'); opacity: .55; pointer-events: none; z-index: -1; mix-blend-mode: overlay; }

/* Botones y links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 36px; background: var(--ink); color: var(--paper); font-weight: 500; font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--ink); border-radius: 999px; transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease); }
.btn:hover { background: var(--brown); border-color: var(--brown); transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(34, 25, 18, .55); }
.btn-cream { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn-cream:hover { background: #fff; border-color: #fff; color: var(--ink); }
.link { font-weight: 500; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--brown); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; }
.link span { display: inline-block; transition: transform .3s var(--ease); }
.link:hover span { transform: translateX(5px); }
.link-cream { color: var(--cream); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 32px; }

/* Encabezado */
.top { position: sticky; top: 0; z-index: 20; background: rgba(248, 243, 236, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: 36px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--serif); font-size: 19px; font-weight: 500; }
.brand img { border-radius: 50%; }
.nav { display: flex; gap: 34px; margin-left: auto; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.top-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 999px; font-size: 11.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); text-decoration: none; transition: background .3s var(--ease), color .3s var(--ease); }
.top-cta:hover { background: var(--ink); color: var(--paper); }

/* Portada: café de su logo, con collage de fotos y sello girando */
.hero { background: radial-gradient(120% 90% at 85% 10%, #9a6a34 0%, var(--brown) 45%, var(--brown-deep) 100%); color: var(--cream); padding: 96px 0 120px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; min-height: min(72vh, 680px); }
.kicker { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: rgba(244, 235, 223, .75); margin-bottom: 36px; display: flex; align-items: center; gap: 16px; }
.kicker::before { content: ''; width: 40px; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(56px, 7.4vw, 112px); line-height: .98; letter-spacing: -0.03em; color: #fff; }
.hero h1 span { display: block; font-style: italic; font-weight: 400; color: var(--gold); padding-left: .6em; }
.lead { font-size: 19px; font-weight: 300; color: rgba(244, 235, 223, .82); max-width: 25em; margin: 34px 0 44px; }

.hero-art { position: relative; height: 600px; }
.photo { margin: 0; position: absolute; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(20, 12, 6, .6); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-main { right: 0; top: 0; width: 76%; height: 86%; border-radius: 240px 240px 4px 4px; }
.photo-small { left: 0; bottom: 0; width: 42%; height: 46%; border: 8px solid var(--cream); border-radius: 4px; }
.seal { position: absolute; left: 6%; top: 8%; width: 168px; height: 168px; display: grid; place-items: center; }
.seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--cream); font: 500 13px var(--sans); animation: spin 26s linear infinite; }
.seal img { border-radius: 50%; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Franja con sus servicios */
.marquee { overflow: hidden; background: var(--cream); border-block: 1px solid var(--line); padding: 26px 0; }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 40px; animation: slide 38s linear infinite; }
.marquee span { font-family: var(--serif); font-style: italic; font-size: clamp(28px, 3.4vw, 44px); color: var(--ink); white-space: nowrap; }
.marquee i { font-style: normal; color: var(--brown); font-size: 18px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Secciones */
.section { padding: 120px 0; }
.section h2 { font-size: clamp(40px, 4.8vw, 64px); }

/* Servicios */
.services-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 72px; align-items: start; }
.services-side .muted { margin-top: 18px; font-weight: 300; font-size: 18px; max-width: 18em; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.service-group h3 { font-family: var(--sans); font-size: 11.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--brown); padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.service-group ul { list-style: none; margin: 0; padding: 0; }
.svc { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .4s var(--ease), color .3s; }
.svc::before { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 0; background: var(--brown); transition: width .5s var(--ease); }
.svc span { font-family: var(--serif); font-size: 27px; line-height: 1.15; }
.svc em { font-style: normal; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; color: var(--brown); opacity: 0; transform: translateX(-8px); transition: opacity .3s var(--ease), transform .3s var(--ease); white-space: nowrap; }
.svc em::after { content: ' →'; }
.svc:hover { padding-left: 10px; color: var(--brown); }
.svc:hover::before { width: 100%; }
.svc:hover em, .svc:focus-visible em { opacity: 1; transform: none; }

/* Consulta */
.dark { background: var(--dark); color: var(--paper); overflow: hidden; }
.dark::after { content: 'Mef'; position: absolute; right: -2%; bottom: -12%; font-family: var(--serif); font-style: italic; font-size: 34vw; line-height: 1; color: rgba(214, 182, 140, .045); pointer-events: none; z-index: -1; }
.dark h2 { color: #fff; }
.consult-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 72px; align-items: end; margin-bottom: 60px; }
.consult-head p { color: rgba(248, 243, 236, .7); font-weight: 300; font-size: 18px; max-width: 32em; }
.consult { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.steps { display: grid; gap: 14px; }
.step { margin: 0; padding: 28px 30px 30px; border: 1px solid rgba(248, 243, 236, .1); border-radius: 20px; min-width: 0; background: linear-gradient(180deg, rgba(248, 243, 236, .045), rgba(248, 243, 236, .015)); transition: border-color .4s, background .4s; }
.step.is-done { border-color: rgba(214, 182, 140, .4); background: linear-gradient(180deg, rgba(214, 182, 140, .09), rgba(214, 182, 140, .02)); }
.step legend { float: left; width: 100%; display: flex; align-items: center; gap: 14px; padding: 0; margin-bottom: 18px; font-family: var(--serif); font-size: 22px; color: #fff; line-height: 1.3; }
.step legend + * { clear: both; }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(248, 243, 236, .3); font: 500 12.5px/1 var(--sans); color: var(--gold); transition: background .3s, color .3s, border-color .3s; }
.step.is-done .step-n { background: var(--gold); border-color: var(--gold); color: var(--dark); font-size: 0; }
.step.is-done .step-n::before { content: ''; width: 10px; height: 5px; margin-top: -2px; border-left: 2px solid var(--dark); border-bottom: 2px solid var(--dark); transform: rotate(-45deg); }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border: 1px solid rgba(248, 243, 236, .2); border-radius: 999px; font-size: 15px; color: rgba(248, 243, 236, .88); transition: border-color .2s, background .25s var(--ease), color .2s, transform .2s var(--ease); }
.opt:hover span { border-color: rgba(248, 243, 236, .6); }
.opt:active span { transform: scale(.96); }
.opt input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--dark); font-weight: 500; }
.opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

.chat { position: sticky; top: 96px; border-radius: 22px; overflow: hidden; background: #ece2d4; color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.chat-head img { border-radius: 50%; }
.chat-head strong { display: block; font-size: 15px; font-weight: 500; }
.chat-head span { display: block; font-size: 12.5px; color: var(--muted); }
.chat-body { padding: 30px 20px 34px; min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; }
.bubble { align-self: flex-end; max-width: 92%; white-space: pre-line; background: #fff; padding: 12px 16px 14px; border-radius: 18px 18px 4px 18px; font-size: 15px; line-height: 1.55; box-shadow: 0 1px 1px rgba(34, 25, 18, .08); }
.chat-foot { padding: 16px 20px 20px; background: var(--paper); border-top: 1px solid var(--line); display: grid; gap: 12px; }
.chat-progress { font-size: 13px; color: var(--muted); text-align: center; }
.btn-wa { width: 100%; background: var(--brown); border-color: var(--brown); color: #fff; }
.btn-wa:hover { background: var(--brown-dark); border-color: var(--brown-dark); }
.consult:not(.is-complete) .btn-wa { background: transparent; color: var(--ink); border-color: var(--ink); }
.consult:not(.is-complete) .btn-wa:hover { background: var(--ink); color: var(--paper); }

/* Reseñas */
.review { background: linear-gradient(160deg, var(--brown) 0%, var(--brown-deep) 100%); color: var(--cream); text-align: center; overflow: hidden; }
.review::after { content: '“'; position: absolute; left: 50%; top: 4%; transform: translateX(-50%); font-family: var(--serif); font-size: 420px; line-height: 1; color: rgba(244, 235, 223, .06); pointer-events: none; z-index: -1; }
.review-inner { max-width: 680px; display: grid; justify-items: center; gap: 26px; }
.review h2 { color: #fff; }
.review p { color: rgba(244, 235, 223, .82); font-weight: 300; font-size: 19px; }
.stars { display: flex; gap: 8px; color: var(--gold); font-size: 24px; }
.stars span { display: inline-block; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 72px; align-items: start; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { border-top: 1px solid var(--ink); }
.facts dt { color: var(--muted); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; padding-top: 9px; }
.facts dd { margin: 0; font-family: var(--serif); font-size: 26px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
.facts dd > a:not(.link) { text-decoration: none; transition: color .2s; }
.facts dd > a:not(.link):hover { color: var(--brown); }
.facts .link { font-family: var(--sans); }

/* Pie con su marca en grande */
.foot { background: var(--dark); color: rgba(248, 243, 236, .6); padding: 40px 0 36px; overflow: hidden; font-size: 13px; letter-spacing: .06em; }
.foot-word { font-family: var(--serif); font-style: italic; font-size: clamp(120px, 26vw, 360px); line-height: .95; letter-spacing: -0.04em; margin: 0 0 28px -0.04em; color: var(--cream); background: linear-gradient(180deg, var(--cream) 30%, rgba(214, 182, 140, .15)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.foot-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(248, 243, 236, .12); padding-top: 22px; }

.float-wa { display: none; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; min-height: 0; }
  .hero-art { height: 520px; max-width: 560px; width: 100%; }
}

@media (max-width: 960px) {
  .nav { display: none; }
  .top-cta { margin-left: auto; }
  .services-grid, .consult-head, .consult, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .consult-head { margin-bottom: 36px; gap: 16px; }
  .chat { position: static; }
  .section { padding: 88px 0; }
  .svc em { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
  body { padding-bottom: 80px; }
  .wrap { width: calc(100% - 32px); }
  .top-inner { height: 60px; }
  .brand { font-size: 16px; }
  .brand img { width: 34px; height: 34px; }
  .top-cta { padding: 0 16px; font-size: 10.5px; }
  .hero { padding: 48px 0 64px; }
  .kicker { margin-bottom: 24px; font-size: 11px; }
  .hero h1 { font-size: 54px; }
  .hero h1 span { padding-left: .4em; }
  .lead { font-size: 17px; margin: 24px 0 32px; }
  .actions { gap: 22px; }
  .actions .btn { width: 100%; }
  .hero-art { height: 430px; }
  .photo-main { width: 80%; height: 84%; border-radius: 180px 180px 4px 4px; }
  .photo-small { width: 46%; height: 42%; border-width: 6px; }
  .seal { width: 120px; height: 120px; left: 0; top: 4%; }
  .seal img { width: 68px; height: 68px; }
  .seal-ring { font-size: 14px; }
  .marquee { padding: 18px 0; }
  .marquee-track { gap: 28px; }
  .section { padding: 64px 0; }
  .services { grid-template-columns: 1fr; gap: 36px; }
  .svc { padding: 18px 0; }
  .svc span { font-size: 23px; }
  .step { padding: 22px 18px 24px; border-radius: 16px; }
  .step legend { font-size: 19px; }
  .opt span { font-size: 14.5px; padding: 0 16px; min-height: 44px; }
  .review::after { font-size: 260px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { font-size: 22px; }
  .float-wa { display: flex; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 30; min-height: 54px; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border-radius: 999px; box-shadow: 0 14px 30px -12px rgba(34, 25, 18, .6); }
}

/* En celular el botón flotante aparece al bajar, para no repetir el de la portada. */
@keyframes wa-in { from { opacity: 0; visibility: hidden; transform: translateY(120%); } to { opacity: 1; visibility: visible; transform: none; } }
@supports (animation-timeline: scroll()) {
  @media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
    .float-wa { animation: wa-in linear both; animation-timeline: scroll(root); animation-range: 520px 680px; }
  }
}

/* Animaciones */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes unveil { from { clip-path: inset(100% 0 0 0 round 240px 240px 4px 4px); } to { clip-path: inset(0 0 0 0 round 0); } }
  @keyframes unveil-flat { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes zoom-out { from { transform: scale(1.15); } to { transform: none; } }
  @keyframes fade-in { from { opacity: 0; transform: scale(.85) rotate(-20deg); } to { opacity: 1; transform: none; } }
  @keyframes star { 0% { opacity: 0; transform: scale(.4) rotate(-30deg); } 70% { transform: scale(1.2); } 100% { opacity: 1; transform: none; } }
  @keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.03); } 100% { transform: scale(1); } }

  .hero .kicker, .hero h1, .hero .lead, .hero .actions { animation: rise 1.1s var(--ease) both; }
  .hero h1 { animation-delay: .1s; }
  .hero .lead { animation-delay: .3s; }
  .hero .actions { animation-delay: .45s; }
  .photo-main { animation: unveil-flat 1.4s cubic-bezier(.7, 0, .2, 1) .2s both; }
  .photo-main img { animation: zoom-out 2.4s var(--ease) .2s both; }
  .photo-small { animation: unveil-flat 1.2s cubic-bezier(.7, 0, .2, 1) .65s both; }
  .photo-small img { animation: zoom-out 2.2s var(--ease) .65s both; }
  .seal { animation: fade-in 1.2s var(--ease) 1s both; }

  .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .reveal.reveal-delay { transition-delay: .12s; }
  .reveal.is-visible { opacity: 1; transform: none; }
  .review-inner.is-visible .stars span { animation: star .6s var(--ease) both; }
  .review-inner.is-visible .stars span:nth-child(2) { animation-delay: .08s; }
  .review-inner.is-visible .stars span:nth-child(3) { animation-delay: .16s; }
  .review-inner.is-visible .stars span:nth-child(4) { animation-delay: .24s; }
  .review-inner.is-visible .stars span:nth-child(5) { animation-delay: .32s; }
  .bubble.is-typing { animation: rise .45s var(--ease) both; }
  .consult.is-complete .btn-wa { animation: pop .6s var(--ease) both; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; } .marquee-track > :nth-child(n+13) { display: none; } }

/* Página 404 */
.notfound { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; text-align: center; }
.notfound img { border-radius: 50%; }
.notfound h1 { font-size: clamp(34px, 6vw, 52px); }
.notfound h1 em { font-style: italic; }
