/* Nordik — menú: mega-menú de servicios en la barra y menú a pantalla completa.
   Compartido por todas las páginas; se carga después de styles.css. */

/* ---------- barra ---------- */
.nav { grid-template-columns: 1fr auto !important; }
.nav { z-index: 100; transition: transform 0.6s var(--ease), border-radius 0.4s; }
.nav__links { align-items: center; }
.nav__links > a, .nav__drop {
  position: relative;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--on-dark); transition: color 0.3s;
}
.nav__links > a:hover, .nav__drop:hover, .nav__drop[aria-expanded="true"] { color: var(--white); }
.nav__links > a[aria-current="page"]::after, .nav__drop.is-current::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 4px; height: 4px; translate: -50% 0; background: var(--green);
}
.nav__drop { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; }
.nav__drop .k-ico { width: 7px; height: 10px; stroke: var(--green); stroke-width: 34; transform: rotate(90deg); transition: transform 0.4s var(--ease); }
.nav__drop[aria-expanded="true"] .k-ico { transform: rotate(-90deg); }
.nav__right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.nav__cta { justify-self: auto; }

/* botón de menú: dos líneas que se cruzan */
.nav__menu {
  display: inline-flex !important; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px 0 12px; border-radius: 12px;
  color: var(--white); background: rgba(255, 255, 255, 0.06);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.3s;
}
.nav__menu:hover { background: rgba(255, 255, 255, 0.12); }
.burger { position: relative; width: 18px; height: 10px; }
.burger i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform 0.5s var(--ease), top 0.5s var(--ease), width 0.4s; }
.burger i:first-child { top: 0; }
.burger i:last-child { top: 8.5px; width: 62%; }
.fm-open .burger i { width: 100%; top: 4.25px; }
.fm-open .burger i:first-child { transform: rotate(45deg); }
.fm-open .burger i:last-child { transform: rotate(-45deg); }
.fm-open .nav { border-color: transparent; }

/* ---------- mega-menú de servicios ---------- */
.mega {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 8px);
  padding: 14px;
  background: var(--black); color: var(--white);
  border: 1px solid var(--line-dark); border-radius: 18px;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), visibility 0s 0.45s;
}
.mega.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 0.35s var(--ease), transform 0.45s var(--ease), visibility 0s; }
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* puente para no perder el hover */
.mega__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.mega__card {
  position: relative; display: flex; flex-direction: column;
  padding: 10px 10px 16px; border-radius: 12px;
  background: var(--black-2);
  transition: background 0.3s, transform 0.4s var(--ease);
}
.mega__card:hover, .mega__card:focus-visible { background: #262626; transform: translateY(-3px); }
.mega__img { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 8px; background: #2a2a2a; overflow: hidden; }
.mega__rune {
  font-family: var(--f-rune); font-size: 64px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--green);
  transition: color 0.35s, transform 0.6s var(--ease);
}
.mega__card:hover .mega__img { background: var(--green); }
.mega__card:hover .mega__rune { color: var(--black); -webkit-text-stroke-color: var(--black); transform: scale(1.12) rotate(-4deg); }
.mega__name { margin-top: 14px; padding: 0 4px; font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; line-height: 1.1; }
.mega__desc { margin-top: 6px; padding: 0 4px; font-size: 13px; line-height: 1.4; color: var(--on-dark); }
.mega__k { position: absolute; right: 16px; bottom: 18px; width: 11px; height: 15px; fill: none; stroke: var(--green); stroke-width: 26; transform: scaleX(-1); transition: fill 0.3s, transform 0.4s var(--ease); }
.mega__card:hover .mega__k { fill: var(--green); transform: scaleX(-1) translateX(-4px); }
.mega__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 12px; padding: 12px 6px 2px;
  font-size: 14px; color: var(--on-dark);
}
.mega__foot a { display: inline-flex; align-items: center; gap: 10px; color: var(--green); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.mega__foot a .k-ico { transform: scaleX(-1); }

/* ---------- menú a pantalla completa ---------- */
.fm {
  position: fixed; inset: 0; z-index: 95;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: clamp(32px, 4vw, 72px);
  padding: 104px var(--m) 28px;
  background: var(--black); color: var(--white);
  clip-path: circle(0% at var(--fx, 95%) var(--fy, 40px));
  visibility: hidden;
  overflow-y: auto; overscroll-behavior: contain;
}
.fm.is-open { visibility: visible; }
.fm__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(24px, 3vw, 56px); align-content: center; }
.fm__links { counter-reset: fm; }
.fm__links li { overflow: hidden; }
.fm__link {
  position: relative; display: flex; align-items: baseline; gap: 18px;
  padding: 4px 0;
  font-family: var(--f-display); font-weight: 800; font-stretch: 75%; text-transform: uppercase;
  font-size: clamp(2.75rem, 6.4vw, 6.4rem); line-height: 1; letter-spacing: 0.01em;
  transition: color 0.3s, opacity 0.3s;
}
.fm__link small { flex: none; width: 2.2em; font-family: var(--f-mono); font-weight: 400; font-stretch: 100%; font-size: 11px; letter-spacing: 0.2em; color: var(--green); transform: translateY(-1.6em); }
.fm__link .ch { display: inline-block; text-align: center; overflow: visible; }
.fm__link .is-rune { font-family: var(--f-rune); font-weight: 400; font-stretch: 100%; color: var(--green); }
.fm__links:hover .fm__link:not(:hover) { opacity: 0.32; }
.fm__link:hover { color: var(--white); }
.fm__word { white-space: nowrap; }
.fm__link[aria-current="page"]::after { content: ""; flex: none; width: 10px; height: 10px; margin-left: 6px; align-self: center; background: var(--green); }

.fm__sub { align-self: center; }
.fm__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-dark-soft); }
.fm__subs { margin-top: 16px; border-top: 1px solid var(--line-dark); }
.fm__subs a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line-dark);
}
.fm__subs a > * { transition: transform 0.4s var(--ease); }
.fm__subs a:hover .r, .fm__subs a:hover b, .fm__subs a:focus-visible .r, .fm__subs a:focus-visible b { transform: translateX(8px); }
.fm__subs .r { font-family: var(--f-rune); font-size: 26px; line-height: 1; text-align: center; color: transparent; -webkit-text-stroke: 1px var(--green); transition: color 0.3s; }
.fm__subs a:hover .r { color: var(--green); }
.fm__subs b { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.15rem, 1.6vw, 1.5rem); letter-spacing: -0.02em; }
.fm__subs .k-ico { width: 10px; height: 14px; stroke: var(--green); transform: scaleX(-1); transition: fill 0.3s; }
.fm__subs a:hover .k-ico { fill: var(--green); }
.fm__subs a[aria-current="page"] b { color: var(--green); }

.fm__preview { position: relative; align-self: center; height: min(62svh, 560px); border-radius: 22px; overflow: hidden; background: var(--black-2); }
.fm__preview img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 55%; filter: brightness(0.55) saturate(0.7); }
.fm__bigrune {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; z-index: 1;
  font-family: var(--f-rune); font-size: min(34svh, 18vw); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--green);
}
.fm__preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,26,26,0) 50%, rgba(26,26,26,0.85) 100%); } /* taste-skill-ignore: velo bajo el rótulo */
.fm__cap { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.fm__cap b { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 2vw, 2rem); letter-spacing: -0.03em; }
.fm__cap span { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--green); }

.fm__foot {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px;
  margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line-dark);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-dark);
}
.fm__contacts { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.fm__contacts a { transition: color 0.3s; }
.fm__contacts a:hover { color: var(--green); }
.fm-open { overflow: hidden; }

@media (max-width: 1100px) {
  .nav__links { display: none !important; }
  .fm { grid-template-columns: 1fr; padding-top: 96px; }
  .fm__main { grid-template-columns: 1fr; align-content: start; }
  .fm__preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mega, .fm__preview img, .burger i { transition: none; }
}
