/* ================================
   Avenor — Minimal Architecture
   ================================ */

/*
  Paleta de variables. Se mantienen los tonos monocromos pero se ajustan
  ligeramente para obtener mayor contraste y definir jerarquías visuales
  más precisas. Puedes ajustar estos valores para refinar la estética
  general del sitio. Todas las secciones utilizan estas variables para
  preservar consistencia.
*/
:root {
  --bg: #0b0b0b;
  --fg: #f5f5f5;
  --muted: #9a9a9a;
  --border: #1f1f1f;
  --card: #111111;
  --radius: 16px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Contenedor genérico con ancho máximo y centrado */
.container {
  width: min(var(--max-width), 92vw);
  margin-inline: auto;
}

/* Flex utilidades */
.center {
  display: flex;
  justify-content: center;
}
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(20px, 4vw, 48px);
}
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* Cabecera fija */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg), black 30%);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo__img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}
.nav {
  display: flex;
  gap: 22px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.nav a:hover {
  color: var(--fg);
  border-color: var(--border);
  background: #121212;
}

/* Botones */
.btn {
  appearance: none;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: transform 0.08s ease, opacity 0.2s ease, background 0.2s ease;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn--ghost:hover {
  border-color: var(--fg);
  background: #161616;
}

/* Hero */
.hero {
  padding: 120px 0 60px;
}
.hero__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 8vw, 80px);
}
@media (max-width: 960px) {
  .hero__layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__graphic {
    margin-top: 40px;
  }
}
.hero__content {
  max-width: 540px;
}
.h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  margin: 0 0 20px;
  font-weight: 800;
}
.h2 {
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 700;
}
.lead {
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  margin-bottom: 24px;
}
/*
  Destaca palabras clave en el hero mediante un subrayado sobrio.
  El subrayado grueso respeta la estética minimalista y aporta
  jerarquía sin saturar el diseño. No se invierte el color del texto.
*/
.highlight {
  text-decoration-line: underline;
  text-decoration-thickness: 0.14em;
  text-decoration-color: var(--fg);
  text-underline-offset: 0.25em;
  font-weight: inherit;
}
.hero__graphic {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.hero__graphic svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  stroke: var(--muted);
}

/* Secciones genéricas */
.section {
  padding: 80px 0;
}
.section--tight {
  padding: 60px 0;
}
.section__head {
  margin-bottom: 32px;
}
.muted {
  color: var(--muted);
}

/* Servicios */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .services {
    grid-template-columns: 1fr;
  }
}
.service {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.service:hover {
  background: #151515;
  border-color: #333;
}
.service__icon {
  margin-bottom: 16px;
}
.service__icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--fg);
}
.service__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}
.service__desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

/* Masonry Gallery */
.masonry {
  column-count: 3;
  column-gap: 14px;
}
@media (max-width: 1024px) {
  .masonry {
    column-count: 2;
  }
}
@media (max-width: 640px) {
  .masonry {
    column-count: 1;
  }
}
.item {
  display: block;
  position: relative;
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d0d0d;
  transition: transform 0.3s ease, border-color 0.2s ease;
}
.item:hover {
  transform: translateY(-2px);
  border-color: #333;
}
.item img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%) contrast(105%);
  transition: transform 0.35s ease, filter 0.35s ease, opacity 0.2s ease;
}
.item:hover img {
  transform: scale(1.03);
  filter: grayscale(0%) contrast(100%);
}
.item__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 13px;
  color: #eaeaea;
}

/* Filtros */
.filterbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 20px;
}
.chip {
  background: #0f0f0f;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.chip:hover {
  color: var(--fg);
  border-color: #2a2a2a;
}
.chip.is-active {
  color: #000;
  background: #fff;
  border-color: #fff;
}

/* Loader */
.loader {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #2a2a2a;
  border-top-color: #fff;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Contacto */
.contact {
  display: grid;
  gap: 12px;
  justify-items: start;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  background: #090909;
}
.footer__inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Lista utilitaria */
.list {
  margin: 0;
  padding-left: 18px;
}
.list li {
  margin-bottom: 6px;
  color: var(--muted);
}
