/* ============================================================
   FABRIALAMBRE — "Un mundo de exhibidores" (galería de feria)
   Diseño desde cero basado en el logo (teal #21ADA3 + charcoal).
   Light entrance (muro cálido) / dark hall (sala de exposición).
   ============================================================ */

/* 1. Tokens */
:root {
  --teal: #21ADA3;
  --teal-bright: #3BC4BA;
  --teal-deep: #0F7A72;
  --teal-ink: #0B2624;
  --warn: #F2B878;

  --wall: #EFEBE2;
  --ink: #1C2122;
  --ink-soft: rgba(28, 33, 34, 0.7);
  --ink-faint: rgba(28, 33, 34, 0.66);
  --hairline-ink: rgba(28, 33, 34, 0.14);

  --hall: #101314;
  --hall-2: #151A1B;
  --hall-3: #1B2122;
  --light: #F4F1E9;
  --light-soft: rgba(244, 241, 233, 0.7);
  --light-faint: rgba(244, 241, 233, 0.62);
  --hairline-light: rgba(244, 241, 233, 0.14);

  --warm-glow: rgba(233, 180, 76, 0.1);

  --font-display: 'Syne', 'Archivo', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, sans-serif;

  --container-max: 1200px;
  --radius: 4px;
  --header-h: 74px;
  --ease-damp: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-lift: 0 26px 60px -28px rgba(0, 0, 0, 0.85);
}

/* 2. Reset y base */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  font-family: var(--font-body);
  background: var(--hall);
  color: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }
em { font-style: normal; }

.container {
  width: min(100% - 2.5rem, var(--container-max));
  margin-inline: auto;
}

::selection { background: var(--teal); color: var(--hall); }

*:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 3px; border-radius: 2px; }

/* Scrollbar */
html { scrollbar-color: var(--hall-3) var(--hall); scrollbar-width: thin; }
@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 12px; }
  ::-webkit-scrollbar-track { background: var(--hall); }
  ::-webkit-scrollbar-thumb { background: var(--hall-3); border: 3px solid var(--hall); border-radius: 8px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--teal); }
}
input, textarea { caret-color: var(--teal-bright); }

/* 3. Skip link y banner */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 3000;
  background: var(--teal);
  color: var(--teal-ink);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-banner {
  background: var(--hall);
  color: var(--teal-bright);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--hairline-light);
}

/* 4. Header — riel de galería sobre muro cálido */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(239, 235, 226, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline-ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}

.brand { line-height: 0; }
.brand-logo { height: 42px; width: auto; }

.nav { display: flex; gap: 1.8rem; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: color 0.25s var(--ease-damp);
}
.nav a:hover { color: var(--ink); }
.nav a:focus-visible { color: var(--ink); }

.nav-cta { padding: 0.55rem 1.2rem; font-size: 0.9rem; }

/* 5. Botones */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  border: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--ease-damp), transform 0.25s var(--ease-damp),
    box-shadow 0.25s var(--ease-damp);
}
.btn-primary { background: var(--teal); color: var(--teal-ink); }
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--teal-bright);
  color: var(--hall);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(33, 173, 163, 0.6);
}
.btn-lg { padding: 1rem 2.3rem; font-size: 1.08rem; }
.btn-block { display: block; width: 100%; }
.btn.is-loading { opacity: 0.7; cursor: wait; }

/* 6. Hero — muro cálido de entrada */
.hero {
  background:
    radial-gradient(90% 60% at 15% 8%, var(--warm-glow), transparent 60%),
    var(--wall);
  color: var(--ink);
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--hairline-ink);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(33, 173, 163, 0.55); }
  55% { box-shadow: 0 0 0 9px rgba(33, 173, 163, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.9rem, 9vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 1.8rem 0 1.4rem;
  max-width: 16ch;
}
.hero-title em { color: var(--teal-deep); }

.hero-sub {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  max-width: 65ch;
}

.hero-actions { margin-top: 2.4rem; }

.clients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 2rem;
  margin-top: 3.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hairline-ink);
  padding-left: 20px;
}
.clients li {
  position: relative;
  color: var(--ink-faint);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.clients li::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-50%);
}

/* 7. Secciones — sala oscura */
.products { background: var(--hall); }
.contacto {
  background:
    radial-gradient(80% 55% at 85% 110%, var(--warm-glow), transparent 60%),
    var(--hall-2);
}
.products,
.contacto { padding: clamp(4rem, 8vw, 6.5rem) 0; }

.section-head { text-align: center; margin: 0 auto clamp(2.6rem, 5vw, 3.6rem); max-width: 64ch; }
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--light);
}
.section-lead {
  color: var(--light-soft);
  margin: 1rem auto 0;
  max-width: 65ch;
}

/* 8. Colección — piezas colgadas en la sala */
.exhibit-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.8rem;
}
.exhibit { width: 100%; display: flex; flex-direction: column; }
@media (min-width: 640px) {
  .exhibit { width: calc((100% - 1.8rem) / 2); }
}
@media (min-width: 1024px) {
  .exhibit { width: calc((100% - 3.6rem) / 3); }
}

.exhibit-fig {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  background: var(--hall-3);
  margin: 0;
}
.exhibit-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-damp);
}
.exhibit-fig::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(33, 173, 163, 0.6), transparent 50%);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.45s var(--ease-damp), transform 0.6s var(--ease-damp);
}
.exhibit-fig:focus-visible { outline-offset: 3px; }

.exhibit-label {
  padding: 0.85rem 0.15rem 0;
}
.exhibit-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  color: var(--light);
  transition: color 0.25s var(--ease-damp);
}
.exhibit-line {
  color: var(--light-soft);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.exhibit:hover .exhibit-fig,
.exhibit:focus-within .exhibit-fig { box-shadow: var(--shadow-lift); }
.exhibit:hover .exhibit-fig img,
.exhibit:focus-within .exhibit-fig img { transform: scale(1.045); }
.exhibit:hover .exhibit-fig::after,
.exhibit:focus-within .exhibit-fig::after {
  opacity: 1;
  transform: translateY(0);
}
.exhibit:hover .exhibit-name,
.exhibit:focus-within .exhibit-name { color: var(--teal-bright); }

.teaser {
  text-align: center;
  color: var(--light-faint);
  margin-top: 3.4rem;
  font-size: 0.95rem;
}
.teaser::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  vertical-align: middle;
  margin-right: 0.7rem;
}

/* 9. Contacto */
.contacto-grid {
  display: grid;
  gap: 3.2rem;
  align-items: start;
}
@media (min-width: 900px) {
  .contacto-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.form-group { margin-bottom: 1.25rem; }
.form label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--light-soft);
}
.form .opt { color: var(--light-faint); text-transform: none; letter-spacing: 0; }
.form input,
.form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--hall-3);
  color: var(--light);
  border: 1px solid var(--hairline-light);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.25s var(--ease-damp), box-shadow 0.25s var(--ease-damp);
}
.form textarea { resize: vertical; min-height: 8rem; }
.form input::placeholder,
.form textarea::placeholder { color: var(--light-faint); }
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--teal-bright);
  box-shadow: 0 0 0 3px rgba(59, 196, 186, 0.18);
}
.form input[aria-invalid="true"],
.form textarea[aria-invalid="true"] { border-color: var(--warn); }
.form-error {
  color: var(--warn);
  font-size: 0.82rem;
  min-height: 1.3em;
  margin-top: 0.3rem;
}
.form-note { margin-top: 1rem; min-height: 1.5em; font-size: 0.92rem; }
.form-note.is-ok { color: var(--teal-bright); }

.contacto-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--light);
  margin-bottom: 1.2rem;
}
.contacto-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hairline-light);
  font-size: 0.95rem;
  color: var(--light-soft);
}
.ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  fill: none;
  stroke: var(--teal-bright);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contacto-list a {
  color: var(--light);
  text-decoration: none;
  transition: color 0.2s var(--ease-damp);
}
.contacto-list a:hover,
.contacto-list a:focus-visible { color: var(--teal-bright); }
.contacto-note {
  margin-top: 1.4rem;
  padding: 1rem 1.2rem;
  background: var(--hall-3);
  border-radius: var(--radius);
  color: var(--light-soft);
  font-size: 0.9rem;
}

/* 10. Footer */
.site-footer {
  background: var(--hall);
  border-top: 1px solid var(--hairline-light);
  padding: 3.2rem 0 2.6rem;
  text-align: center;
}
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--light);
}
.footer-wordmark span { color: var(--teal-bright); }
.footer-tag {
  color: var(--light-soft);
  font-style: normal;
  margin-top: 0.3rem;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 1.8rem;
  margin: 1.4rem 0;
  color: var(--light-soft);
  font-size: 0.88rem;
}
.footer-meta a { color: var(--light); text-decoration: none; }
.footer-meta a:hover { color: var(--teal-bright); }
.footer-copy { color: var(--light-faint); font-size: 0.8rem; }

/* 11. Responsive — header compacto en mobile */
@media (max-width: 640px) {
  .btn.nav-cta { display: none; }
  .brand-logo { height: 30px; }
  .nav { gap: 1rem; }
  .nav a { font-size: 0.82rem; }
  .hero-title { font-size: clamp(1.95rem, 9vw, 3.4rem); letter-spacing: -0.015em; }
  .footer-wordmark { font-size: 1.35rem; }
  .clients { padding-left: 2rem; }
}

/* 12. Reveal — entradas sutiles (el momento autorado es el spotlight) */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease-damp), transform 0.8s var(--ease-damp);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* 12. Accesibilidad — reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .badge-dot { animation: none; }
  .exhibit:hover .exhibit-fig img,
  .exhibit:focus-within .exhibit-fig img { transform: none; }
  .exhibit:hover .exhibit-fig::after,
  .exhibit:focus-within .exhibit-fig::after { opacity: 0; }
}
