/* =============================================================
   ELE7 STUDIO — styles.css
   Archetype: Editorial Dark Warm (adaptado a barbería)
   Secciones:
   1. Tokens  2. Reset  3. Utilidades  4. Tipografía
   5. Componentes  6. Secciones  7. Efectos  8. Responsive
   9. Reduced-motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --mesh-x     { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --mesh-y     { syntax: "<percentage>"; inherits: false; initial-value: 50%; }

:root {
  --bg:        #0E0C0A;
  --bg-2:      #15110D;
  --bg-3:      #1E1813;
  --bg-4:      #241D16;
  --cream:     #F2EBDA;
  --cream-2:   #DDD2BC;
  --cream-3:   #8B7E68;
  --accent:    #C9763B;
  --accent-2:  #A85F2A;
  --gold:      #C9A66B;
  --line:      rgba(242,235,218,.12);
  --line-soft: rgba(242,235,218,.07);

  --serif: "Fraunces", "Iowan Old Style", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "IBM Plex Mono", "SFMono-Regular", monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
html.menu-open { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--serif); }
em { font-style: italic; }
::selection { background: var(--accent); color: var(--bg); }

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

section[id] { scroll-margin-top: 84px; }

/* =============================================================
   3. Utilidades
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  border-radius: 8px; font-weight: 600; font-size: .9rem;
}
.skip-link:focus { top: 1rem; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap;
}

.section-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cream-3);
}
.section-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: .6rem; font-weight: 480; }
.section-title em { color: var(--gold); }
.section-sub { color: var(--cream-2); max-width: 46ch; margin-top: .9rem; font-size: 1.05rem; }

.section-with-mesh { position: relative; overflow: hidden; isolation: isolate; }
.section-with-mesh::before {
  content: ""; position: absolute; inset: -10%; z-index: -1;
  background:
    radial-gradient(60% 50% at var(--mesh-x) var(--mesh-y), rgba(201,118,59,.30), transparent 60%),
    conic-gradient(from var(--mesh-angle), rgba(201,166,107,.16), rgba(168,95,42,.08), rgba(201,118,59,.18), rgba(201,166,107,.16));
  filter: blur(80px) saturate(120%);
  opacity: .85;
  animation: meshShift 24s linear infinite;
  mix-blend-mode: screen;
}
@keyframes meshShift {
  0%   { --mesh-angle: 0deg;   --mesh-x: 30%; --mesh-y: 38%; }
  50%  { --mesh-angle: 180deg; --mesh-x: 68%; --mesh-y: 62%; }
  100% { --mesh-angle: 360deg; --mesh-x: 30%; --mesh-y: 38%; }
}

.has-grain { position: relative; }
.has-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

/* Marco de imagen: degradé de respaldo mientras carga / si falla (sin red de stock) */
.img-frame {
  position: relative; overflow: hidden; border-radius: 14px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-4));
}
.img-frame::before {
  content: "Ele7 Studio"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cream-3); opacity: .5;
}
.img-frame img { position: relative; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease-soft); }
.img-frame.is-loaded img { opacity: 1; }
.img-frame.is-loaded::before { display: none; }
.img-frame.is-fallback::before { content: "N\00B07"; font-family: var(--serif); font-size: 2rem; opacity: .3; }

/* =============================================================
   4. Tipografía
   ============================================================= */
.glyph {
  display: inline-block; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem); color: var(--gold); opacity: .9;
}
.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cream-3); }

/* =============================================================
   5. Componentes
   ============================================================= */

/* --- Skip / splash --- */
.splash {
  position: fixed; inset: 0; z-index: 10000; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .9s var(--ease-soft), clip-path 1.05s var(--ease-soft);
  animation: splashSafety .01s 4.5s forwards;
}
.splash-inner { text-align: center; }
.splash-logo-text {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--cream); letter-spacing: .02em;
}
.splash-line {
  display: block; width: 64px; height: 1px; background: var(--accent); margin: 1rem auto 0;
  animation: splashGrow 1.1s var(--ease-soft) forwards;
}
@keyframes splashGrow { from { width: 0; opacity: 0; } to { width: 64px; opacity: 1; } }
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }

/* --- Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  background: transparent;
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), backdrop-filter .4s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(14,12,10,.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 1.1rem; }
.nav-logo { font-family: var(--serif); font-style: italic; font-size: 1.25rem; letter-spacing: .01em; }
.nav-logo span { color: var(--gold); }
.nav-links { display: none; gap: 2rem; align-items: center; }
.nav-link {
  position: relative; padding: .25rem 0; font-size: .92rem; color: var(--cream-2);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta-wrap { display: none; }
.nav-burger {
  display: inline-flex; flex-direction: column; gap: 5px; padding: .5rem; z-index: 210;
}
.nav-burger span { width: 22px; height: 1.5px; background: var(--cream); display: block; transition: transform .3s var(--ease-out), opacity .3s; }
.nav-mobile {
  position: fixed; inset: 0; z-index: 190; background: var(--bg-2); color: var(--cream);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .65s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile-links { display: flex; flex-direction: column; gap: 1.4rem; text-align: center; }
.nav-mobile-links a { font-family: var(--serif); font-size: 1.9rem; font-style: italic; }
.nav-mobile-cta { margin-top: 1.6rem; }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-size: .92rem; font-weight: 600;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s, color .3s;
}
.btn-primary {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 4px 14px rgba(201,118,59,.18), 0 1px 3px rgba(0,0,0,.2);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(201,118,59,.28), 0 8px 18px rgba(0,0,0,.3); }
.btn-ghost {
  border: 1px solid var(--line); color: var(--cream);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--accent); background: rgba(201,118,59,.08); }
.btn-sm { padding: .6rem 1.2rem; font-size: .82rem; }

.has-magnetic { display: inline-flex; position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: inherit;
  will-change: transform; transition: transform .8s var(--ease-soft);
}

/* --- Cards --- */
.card {
  --rx: 0deg; --ry: 0deg;
  background: var(--bg-3); border: 1px solid var(--line-soft); border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), box-shadow .55s var(--ease-soft), border-color .4s;
}
.card.has-tilt:hover { transition-duration: .15s; border-color: rgba(201,118,59,.35); }
.card:hover {
  box-shadow: 0 40px 80px -20px rgba(201,118,59,.18), 0 24px 48px -16px rgba(0,0,0,.45);
}
.card-price {
  font-family: var(--mono); font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--gold);
  margin-top: .3rem;
}
.card-price small { font-size: .9rem; color: var(--cream-3); font-weight: 400; }
.card-name { font-size: 1.5rem; margin-top: .9rem; }
.card-desc { color: var(--cream-2); margin-top: .7rem; font-size: .96rem; }
.card-cta { margin-top: 1.4rem; }

/* --- Badge abierto/cerrado --- */
.status-badge {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono);
  font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line);
}
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cream-3); }
.status-badge.is-open { color: #BFE3A0; border-color: rgba(191,227,160,.3); }
.status-badge.is-open::before { background: #8FCB5C; animation: pulseDot 2.4s ease-in-out infinite; }
.status-badge.is-closed { color: var(--cream-3); }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* --- Marquee --- */
.marquee { overflow: hidden; position: relative; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee::after  { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.marquee-track {
  display: flex; gap: 3rem; white-space: nowrap; padding-block: 1.1rem;
  animation: marqueeScroll 26s linear infinite;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3);
}
.marquee-track span.sep { color: var(--accent); }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =============================================================
   6. Secciones
   ============================================================= */

.hero {
  position: relative; min-height: 100svh; display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg .img-frame { position: absolute; inset: 0; border-radius: 0; }
.hero-bg img { animation: ambientZoom 30s ease-in-out infinite; }
@keyframes ambientZoom {
  0%, 100% { transform: scale(1.05) translate3d(0,0,0); }
  50%      { transform: scale(1.13) translate3d(-1%,-1%,0); }
}
.hero-tint { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, rgba(14,12,10,.55) 0%, rgba(14,12,10,.55) 45%, rgba(14,12,10,.94) 100%); }
.hero-inner { position: relative; z-index: 1; padding-block: 7rem 4rem; width: 100%; }
.hero-meta { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-title { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 460; margin-top: .4rem; }
.hero-title em { color: var(--gold); }
.hero-sub { color: var(--cream-2); max-width: 46ch; margin-top: 1.2rem; font-size: 1.08rem; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2.1rem; }

.concept {
  padding-block: clamp(5rem, 10vw, 8rem);
}
.concept-grid {
  display: grid; gap: 2.5rem; align-items: start;
}
.concept-figure { aspect-ratio: 16/10; }
.concept-text { display: grid; gap: 1.6rem; align-content: start; }
.concept-num { font-family: var(--mono); color: var(--accent); font-size: 1rem; }
.concept-body { color: var(--cream-2); font-size: 1.08rem; max-width: 52ch; }
.concept-body + .concept-body { margin-top: -.6rem; }

.services { padding-block: clamp(4rem, 9vw, 7rem); background: var(--bg-2); }
.services-grid { display: grid; gap: 1.5rem; margin-top: 2.6rem; }

.gallery { padding-block: clamp(4.5rem, 9vw, 7rem); }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.gallery-arrows { display: flex; gap: .6rem; }
.gallery-arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; transition: border-color .3s, background .3s;
}
.gallery-arrow:hover { border-color: var(--accent); background: rgba(201,118,59,.08); }
.gallery-track {
  display: flex; gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-top: 2.4rem; padding-bottom: .5rem;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-card {
  --rx: 0deg; --ry: 0deg;
  flex: 0 0 auto; width: min(78vw, 360px); aspect-ratio: 4/5; scroll-snap-align: start;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft);
}
.gallery-card.has-tilt:hover { transition-duration: .15s; }
.gallery-card .img-frame { width: 100%; height: 100%; }
.gallery-card .img-frame img { transition: transform .8s var(--ease-soft), filter .55s; }
.gallery-card:hover .img-frame img { transform: scale(1.08); filter: saturate(1.15) brightness(1.04); }

.location { padding-block: clamp(4.5rem, 9vw, 7rem); background: var(--bg-2); }
.location-grid { display: grid; gap: 2rem; margin-top: 2.6rem; }
.location-info { display: grid; gap: 1.6rem; align-content: start; }
.info-row { display: flex; gap: .9rem; align-items: flex-start; }
.info-row .label { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3); min-width: 7rem; }
.info-row .value { color: var(--cream); font-size: 1rem; }
.info-row .value small { display: block; color: var(--cream-3); font-size: .85rem; margin-top: .15rem; }
.map-frame { border-radius: 16px; overflow: hidden; border: 1px solid var(--line-soft); aspect-ratio: 4/3; }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.25) sepia(.18) saturate(1.1); }

.final-cta { padding-block: clamp(5rem, 11vw, 8.5rem); text-align: center; position: relative; }
.final-cta-title { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.final-cta-sub { color: var(--cream-2); max-width: 42ch; margin: 1.1rem auto 0; }
.final-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.2rem; }

.footer { padding-block: 3.5rem 2.2rem; border-top: 1px solid var(--line-soft); }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand { font-family: var(--serif); font-style: italic; font-size: 1.4rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem .3rem; }
.footer-links a { color: var(--cream-2); font-size: .92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line-soft); color: var(--cream-3); font-size: .82rem; }
.footer-meta a { color: var(--cream-3); }
.footer-meta a:hover { color: var(--accent); }

/* --- Página de créditos --- */
.page-credits { background: var(--bg); color: var(--cream); min-height: 100vh; }
.credits-header { padding: 1.6rem var(--gutter); }
.credits-header a { font-size: .9rem; color: var(--cream-2); }
.credits-main { max-width: 720px; margin: 0 auto; padding: 2rem var(--gutter) 5rem; }
.credits-main h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.credits-main > p { color: var(--cream-2); margin-top: 1rem; }
.credits-main > p a { color: var(--gold); text-decoration: underline; }
.credits-list { margin-top: 2rem; display: grid; gap: 1rem; }
.credits-list li { padding: 1rem 1.2rem; background: var(--bg-3); border-radius: 10px; font-size: .9rem; color: var(--cream-2); }
.credits-list a { color: var(--gold); text-decoration: underline; }
.credits-empty { color: var(--cream-3); }

/* =============================================================
   7. Efectos / accesibilidad fina
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
/* Defensa: si algo tuviera reveal + split, nunca debe quedar invisible */
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .concept-grid { grid-template-columns: 1.1fr .9fr; }
  .location-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.2fr 1fr; align-items: start; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta-wrap { display: inline-flex; }
  .nav-burger { display: none; }
  .hero-inner { padding-block: 9rem 5.5rem; }
}

@media (min-width: 1280px) {
  .container { padding-inline: var(--gutter); }
  .concept-grid { grid-template-columns: 1.2fr .8fr; gap: 4rem; }
}

/* =============================================================
   9. Reduced-motion — solo lo realmente intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-bg img { animation: none; }
  .splash { animation-duration: .01s; }
  /* NO se desactivan: tilt, hover, fades, mesh, marquee, magnetic, count-up */
}
