/* ============================================
   NODUS — Design tokens
   ============================================ */
:root{
  --indigo: #17182F;
  --indigo-soft: #1F2140;
  --bone: #F4F0E8;
  --bone-dim: #E9E3D6;
  --coral: #F25C46;
  --gray: #5C5E70;
  --gray-on-bone: #6C6E7E;

  --font-display: 'Archivo', sans-serif;
  --font-body: 'Manrope', sans-serif;

  --container: 1400px;
  --edge: clamp(24px, 5vw, 72px);

  --ease-out: cubic-bezier(.16,.84,.32,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: auto; }
html,body{ margin:0; padding:0; }

body{
  background: var(--bone);
  color: var(--indigo);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family: inherit; }

::selection{ background: var(--coral); color: var(--bone); }

/* focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

/* subtle grain overlay for premium editorial texture */
.grain{
  position: fixed; inset:0; pointer-events:none; z-index: 9998;
  opacity: .025; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================
   LOADER
   ============================================ */
#loader{
  position: fixed; inset:0; z-index: 10000;
  background: var(--indigo);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap: 28px;
}
.loader-logo{
  width: clamp(140px, 20vw, 220px);
  height: auto;
  opacity: 0;
}
.loader-bar-track{
  width: clamp(180px, 22vw, 260px);
  height: 3px;
  position: relative;
  background: rgba(244,240,232,0.14);
  overflow: visible;
  opacity: 0;
}
#loaderWave{ width:100%; height: 16px; position:absolute; top: -6.5px; left:0; overflow: visible; }

/* ============================================
   NAV
   ============================================ */
.nav{
  position: fixed; top:0; left:0; right:0; z-index: 500;
  padding: 22px var(--edge);
  display:flex; align-items:center; justify-content:space-between;
  transition: padding .4s var(--ease-out), background-color .4s var(--ease-out);
  mix-blend-mode: normal;
}
.nav-inner{
  width:100%; display:flex; align-items:center; justify-content:space-between;
}
.nav-logo{ display:block; position:relative; width: 92px; height: 28px; flex-shrink:0; }
.nav-logo-img{
  position:absolute; top:0; left:0; height: 28px; width:auto;
  transition: opacity .35s ease;
}
.nav-logo-white{ opacity:1; }
.nav-logo-indigo{ opacity:0; }

.nav-links{ display:flex; gap: clamp(20px, 2.4vw, 40px); }
.nav-links a{
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  color: var(--bone); opacity: .82;
  position: relative; padding-bottom: 3px;
  transition: opacity .3s ease, color .3s ease;
}
.nav-links a span{ position:relative; display:inline-block; }
.nav-links a span::after{
  content:''; position:absolute; left:0; right:0; bottom:-3px; height:1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-links a:hover{ opacity:1; }
.nav-links a:hover span::after{ transform: scaleX(1); transform-origin: left; }

.nav-cta{
  display:flex; align-items:center; gap:0; font-size: 14px; font-weight:700;
  color: var(--bone); position:relative; flex-shrink:0;
}
.nav-cta-line{
  position:absolute; left:0; bottom:-4px; height:1px; width:100%;
  background: var(--coral); transform: scaleX(1); transform-origin:left;
}

.nav-burger{
  display:none; background:none; border:none; cursor:pointer; padding: 8px;
  width: 40px; height:40px; flex-direction:column; align-items:center; justify-content:center; gap:6px;
}
.nav-burger span{ width: 22px; height:1.5px; background: var(--bone); transition: all .3s ease; display:block; }

.nav-mobile{
  display:none; position:fixed; top:0; left:0; right:0; bottom:0;
  background: var(--indigo); z-index:499;
  flex-direction:column; align-items:flex-start; justify-content:center; gap: 28px;
  padding: var(--edge);
  transform: translateY(-100%); transition: transform .5s var(--ease-in-out);
}
.nav-mobile.open{ display:flex; transform: translateY(0); }
.nav-mobile a{
  font-family: var(--font-display); font-weight:800; font-size: clamp(28px,7vw,40px);
  color: var(--bone);
}
.nav-mobile-cta{ color: var(--coral) !important; margin-top: 12px; }

/* nav state when over light (bone) sections */
.nav.on-light .nav-logo-white{ opacity:0; }
.nav.on-light .nav-logo-indigo{ opacity:1; }
.nav.on-light .nav-links a{ color: var(--indigo); }
.nav.on-light .nav-cta{ color: var(--indigo); }
.nav.on-light .nav-burger span{ background: var(--indigo); }

.nav.scrolled{
  padding-top: 14px; padding-bottom: 14px;
  backdrop-filter: blur(10px);
  background: rgba(23,24,47,0.55);
}
.nav.scrolled.on-light{ background: rgba(244,240,232,0.72); }

/* ============================================
   HERO — coral, editorial statement
   ============================================ */
.hero{
  position: relative;
  min-height: 100svh;
  background: var(--coral);
  color: var(--indigo);
  display:flex; flex-direction:column; justify-content:center;
  padding: 160px var(--edge) 100px;
  overflow:hidden;
}

.hero-inner{ position:relative; max-width: var(--container); margin: 0 auto; width:100%; }

.hero-title{
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(44px, 8.4vw, 108px);
  line-height: 0.98; letter-spacing: -0.01em;
  margin: 0 0 clamp(32px, 4vw, 48px);
  color: var(--indigo);
}
.hero-title .accent-outline{
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--indigo);
}
.hero-title .accent-outline::after{
  content: attr(data-text);
  position: absolute; left:0; top:0;
  color: #F4F0E8;
  -webkit-text-stroke: 1.5px #F4F0E8;
  clip-path: inset(0 100% 0 0);
  animation: nudoFill 1.5s var(--ease-out) .7s forwards;
}
@keyframes nudoFill{
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}
@media (prefers-reduced-motion: reduce){
  .hero-title .accent-outline::after{ animation: none; clip-path: inset(0 0 0 0); }
}

.hero-sub{
  font-size: clamp(16px, 1.5vw, 21px); line-height: 1.5; color: var(--indigo);
  max-width: 560px; margin: 0 0 clamp(48px,6vw,72px);
  font-weight: 600;
}

.hero-ctas{ display:flex; align-items:center; gap: clamp(24px, 3vw, 44px); flex-wrap:wrap; }

.cta-primary-dark{
  display:inline-flex; align-items:center; gap:10px;
  background: var(--indigo); color: var(--bone);
  padding: 17px 30px; font-weight:700; font-size:15px;
  border-radius: 3px;
  transition: transform .35s var(--ease-out), background-color .3s ease;
}
.cta-primary-dark svg{ transition: transform .35s var(--ease-out); }
.cta-primary-dark:hover{ transform: translateY(-3px); }
.cta-primary-dark:hover svg{ transform: translate(2px,-2px); }

.cta-editorial-dark{ color: var(--indigo); }

.cta-primary{
  display:inline-flex; align-items:center; gap:10px;
  background: var(--coral); color: var(--bone);
  padding: 15px 26px; font-weight:700; font-size:15px;
  border-radius: 3px;
  transition: transform .35s var(--ease-out), background-color .3s ease;
}
.cta-primary svg{ transition: transform .35s var(--ease-out); }
.cta-primary:hover{ transform: translateY(-3px); }
.cta-primary:hover svg{ transform: translate(2px,-2px); }

.cta-editorial{
  position:relative; display:inline-flex; flex-direction:column; gap:8px;
  font-weight:700; font-size:15px; color: var(--bone);
}
.cta-editorial-line{
  display:block; height:1px; width:100%; background: currentColor;
  transform: scaleX(0.3); transform-origin:left;
  transition: transform .5s var(--ease-out);
}
.cta-editorial:hover .cta-editorial-line{ transform: scaleX(1); }
.cta-editorial-light{ color: var(--indigo); }
.cta-editorial-dark{ color: var(--indigo); }



/* ============================================
   INSIGHT
   ============================================ */
.insight{
  position: relative;
  background: var(--indigo); color: var(--bone);
  padding: clamp(64px,7vw,100px) var(--edge);
  overflow: hidden;
}
.insight-bg{ position:absolute; inset:0; z-index:0; }
.insight-bg-img{
  width:100%; height:100%; object-fit:cover; object-position: center center;
  filter: grayscale(0.25) contrast(1.05);
}
.insight-bg-overlay{
  position:absolute; inset:0;
  background: linear-gradient(100deg, rgba(23,24,47,0.88) 0%, rgba(23,24,47,0.55) 55%, rgba(23,24,47,0.5) 100%);
}
.insight-inner{ position:relative; z-index:1; max-width: var(--container); margin:0 auto; }

.eyebrow{
  display:inline-block; font-family: var(--font-body); font-weight:700; font-size:12px;
  letter-spacing:.14em; text-transform:uppercase; color: var(--coral);
  margin-bottom: 28px; position:relative; padding-left: 22px;
}
.eyebrow::before{
  content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:14px; height:1px; background: var(--coral);
}
.eyebrow-light{ color: var(--coral); }

.insight-title{
  font-family: var(--font-display); font-weight:800;
  font-size: clamp(26px, 4.2vw, 50px); line-height:1.1; letter-spacing:-0.01em;
  margin: 0 0 clamp(28px,3.6vw,44px);
  max-width: 1180px;
  color: var(--bone);
}
.reveal-word{ display:inline-block; opacity: .22; }
.insight-title .accent{ color: var(--coral); }

.insight-foot{
  display:flex; justify-content:flex-end;
  border-top: 1px solid rgba(244,240,232,0.2);
  padding-top: 20px;
}
.insight-text{
  max-width: 480px; font-size: clamp(16px,1.4vw,19px); line-height:1.6;
  color: var(--bone); margin:0; font-weight:700;
}

/* ============================================
   QUÉ ANALIZAMOS
   ============================================ */
.analizamos{ background: var(--indigo); color: var(--bone); padding: clamp(100px,14vw,180px) var(--edge) 40px; }
.analizamos-head{
  max-width: var(--container); margin: 0 auto clamp(60px,8vw,100px);
  display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap;
}
.section-title{
  font-family: var(--font-display); font-weight:900;
  font-size: clamp(40px,7vw,84px); line-height:0.94; letter-spacing:-0.01em; margin:0;
}
.section-title.light{ color: var(--bone); }

.analizamos-list{ max-width: var(--container); margin: 0 auto; }
.analiza-row{
  position:relative; display:grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid rgba(244,240,232,0.14);
  overflow:hidden;
}
.analiza-row:last-child{ border-bottom: 1px solid rgba(244,240,232,0.14); }
.analiza-num{
  font-family: var(--font-display); font-weight:800; font-size: clamp(28px,3vw,40px);
  color: rgba(244,240,232,0.28);
  transition: color .4s ease;
}
.analiza-body h3{
  font-family: var(--font-display); font-weight:800; font-size: clamp(22px,2.6vw,34px);
  margin: 0 0 12px; letter-spacing:-0.005em;
}
.analiza-body p{
  font-size: clamp(14px,1.15vw,17px); line-height:1.55; color: rgba(244,240,232,0.62);
  max-width: 620px; margin:0; font-weight:500;
}
.analiza-bar{
  position:absolute; left:0; bottom:0; height:2px; width:0%;
  background: var(--coral);
  transition: width .6s var(--ease-out);
}
.analiza-row.is-active .analiza-num{ color: var(--coral); }
.analiza-row.is-active .analiza-bar{ width:100%; }

/* ============================================
   ESPECIALIZACIÓN — cadenas y franquicias + carrusel
   ============================================ */
.especializacion{
  background: var(--indigo); color: var(--bone);
  padding: clamp(100px,14vw,180px) 0 clamp(80px,10vw,120px);
}
.especializacion-head{
  max-width: var(--container); margin: 0 auto clamp(56px,7vw,96px);
  padding: 0 var(--edge);
}
.especializacion-title{
  font-family: var(--font-display); font-weight:900;
  font-size: clamp(34px, 5.6vw, 68px); line-height:1.05; letter-spacing:-0.01em;
  margin: 0 0 28px; max-width: 900px;
}
.especializacion-sub{
  font-size: clamp(17px,1.6vw,22px); font-weight:700; color: var(--bone);
  max-width: 620px; margin: 0 0 22px; line-height:1.4;
}
.especializacion-text{
  font-size: clamp(15px,1.2vw,18px); font-weight:700; line-height:1.65;
  color: #F25C46; max-width: 640px; margin:0;
}

.especial-carousel{
  width:100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.especial-track{
  display:flex; gap: 20px; width: max-content;
  padding: 0 var(--edge);
  will-change: transform;
}
.especial-slide{
  position: relative;
  width: clamp(260px, 26vw, 380px);
  height: clamp(340px, 34vw, 480px);
  flex-shrink:0;
  overflow:hidden;
  border-radius: 3px;
}
.especial-img{
  width:100%; height:100%; object-fit:cover; object-position:center;
  filter: grayscale(0.1) contrast(1.05);
}
.especial-overlay{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(23,24,47,0) 40%, rgba(23,24,47,0.88) 100%);
}
.especial-caption{
  position:absolute; left:0; right:0; bottom:0; padding: 26px 24px;
  display:flex; flex-direction:column; gap:6px;
}
.especial-num{
  font-family: var(--font-display); font-weight:800; font-size:13px; color: var(--coral);
  letter-spacing: .04em;
}
.especial-caption h3{
  font-family: var(--font-display); font-weight:800; font-size: clamp(20px,2vw,26px);
  margin: 0; color: var(--bone);
}
.especial-caption p{
  font-size: 14px; font-weight:600; color: rgba(244,240,232,0.8); margin:0;
}

/* ============================================
   BAKERY
   ============================================ */
.bakery{
  background: var(--indigo); color: var(--bone);
  display:grid; grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.bakery-media{ position:relative; overflow:hidden; }
.bakery-img{
  width:100%; height:100%; object-fit:cover; object-position:center;
  filter: grayscale(0.15) contrast(1.05);
  transform: scale(1.12);
  will-change: transform;
}
.bakery-media-frame{
  position:absolute; inset:0;
  box-shadow: inset 0 0 0 1px rgba(244,240,232,0.08);
  background: linear-gradient(180deg, rgba(23,24,47,0.25), rgba(23,24,47,0) 30%, rgba(23,24,47,0) 70%, rgba(23,24,47,0.35));
}
.bakery-content{
  padding: clamp(60px,7vw,120px) clamp(40px,6vw,96px);
  display:flex; flex-direction:column; justify-content:center;
}
.bakery-logo{
  width: 132px; height:auto; margin: 22px 0 36px;
  opacity: .92;
}
.bakery-title{
  font-family: var(--font-display); font-weight:800;
  font-size: clamp(30px,3.6vw,52px); line-height:1.06; letter-spacing:-0.01em;
  margin: 0 0 28px; max-width: 560px;
}
.bakery-title .accent{ color: var(--coral); }
.bakery-text{
  font-size: clamp(15px,1.2vw,18px); line-height:1.6; color: rgba(244,240,232,0.72);
  max-width: 460px; margin: 0 0 40px; font-weight:500;
}

/* ============================================
   FOOTER — logo + slogan + contacto
   ============================================ */
.site-footer{
  background: var(--indigo); color: var(--bone);
  position:relative;
  overflow:hidden;
}
.accent-outline{
  color: transparent;
  -webkit-text-stroke: 1.5px currentColor;
}

.footer-top{
  padding: clamp(48px,6vw,72px) var(--edge) clamp(28px,4vw,40px);
  max-width: var(--container); margin: 0 auto;
  border-bottom: 1px solid rgba(244,240,232,0.14);
}
.footer-logo{ height: clamp(36px, 4.4vw, 54px); width:auto; margin-bottom: clamp(18px,2.4vw,26px); }
.footer-slogan{
  font-family: var(--font-display); font-weight:900;
  font-size: clamp(26px, 3.8vw, 46px); line-height:1.05; letter-spacing:-0.01em;
  margin:0; color: var(--bone);
}

.footer-main{
  max-width: var(--container); margin: 0 auto;
  padding: clamp(32px,4vw,48px) var(--edge);
  display:flex; justify-content:flex-start;
}
.footer-contact{ display:flex; flex-direction:column; gap: clamp(22px,3vw,32px); align-items:flex-start; }
.footer-cta{
  display:inline-flex; align-items:center; gap:12px;
  font-family: var(--font-display); font-weight:800;
  font-size: clamp(22px,2.6vw,32px); color: var(--bone);
  border-bottom: 2px solid var(--coral);
  padding-bottom: 10px;
}
.footer-cta svg{ color: var(--coral); transition: transform .4s var(--ease-out); flex-shrink:0; }
.footer-cta:hover svg{ transform: translate(4px,-4px); }

.footer-contact-details{
  display:flex; flex-direction:column; gap: 10px;
  font-size: 15px; font-weight:600; color: rgba(244,240,232,0.78);
}
.footer-contact-details a{ color: var(--bone); }
.footer-contact-details a:hover{ color: var(--coral); }

.footer-bottom{
  max-width: var(--container); margin: 0 auto;
  padding: 24px var(--edge) 40px;
  border-top: 1px solid rgba(244,240,232,0.14);
  font-size: 12px; font-weight:600; color: rgba(244,240,232,0.6);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 980px){
  .nav-links, .nav-cta{ display:none; }
  .nav-burger{ display:flex; }

  .analiza-row{ grid-template-columns: 60px 1fr; }

  .especial-slide{ width: clamp(220px, 62vw, 300px); height: clamp(280px, 78vw, 380px); }

  .bakery{ grid-template-columns: 1fr; }
  .bakery-media{ height: 52vh; }
  .bakery-content{ padding: 56px var(--edge) 80px; }

  .footer-main{ flex-direction:column; }
}

@media (max-width: 640px){
  :root{ --edge: 20px; }
  .hero-title{ font-size: clamp(36px, 11vw, 60px); }
  .insight-foot{ justify-content:flex-start; }
  .footer-top{ padding-top: 110px; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal-word{ opacity:1; }
}
