/* ============================================================
   KANTHO BAKERY — components.css
   Componentes reutilizables: nav, botones, links, misceláneos
   ============================================================ */

/* ---------- Barra de navegación ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--pad-inline);
  transition: background 0.5s var(--ease-expo-out), padding 0.5s var(--ease-expo-out),
              backdrop-filter 0.5s;
}
.nav.is-scrolled {
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 0.8rem; }
.nav-brand img { height: 46px; width: auto !important; aspect-ratio: 1 / 1; }
.nav-brand .brand-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}
.nav-links { display: flex; gap: 2.4rem; list-style: none; }
.nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Link con underline animado (eszterbial style) ---------- */
.link-underline { position: relative; }
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s var(--ease-expo-out);
}
.link-underline:hover::after,
.link-underline.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.link-underline:hover { color: var(--text); }

/* ---------- Botón magnético ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--primary);
  color: #14100a;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.1rem 2.2rem;
  border-radius: 999px;
  transition: background 0.4s var(--ease-expo-out), transform 0.2s ease-out;
  will-change: transform;
}
.btn:hover { background: var(--secondary); }
.btn .btn-arrow { transition: transform 0.4s var(--ease-expo-out); }
.btn:hover .btn-arrow { transform: translateX(5px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--primary); background: rgba(255,191,0,0.06); }

/* ---------- Menú hamburguesa ---------- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px; height: 40px;
  position: relative;
  z-index: 1000;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 1.5px;
  background: var(--text);
  margin: 6px auto;
  transition: transform 0.45s var(--ease-expo-out), opacity 0.3s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Tag / chip ---------- */
.chip {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid var(--secondary);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

/* ---------- Focus visible (accesibilidad) ---------- */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: none; }
