@font-face {
  font-family: "AzconaHead";
  src: url("../fonts/Oswald-Light.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "AzconaBody";
  src: url("../fonts/AlegreyaSans-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #f4efe7;
  --bg-soft: #efe5d7;
  --surface: rgba(255, 251, 245, 0.92);
  --surface-strong: #fffaf3;
  --ink: #2d241d;
  --muted: #6f6256;
  --line: rgba(70, 48, 28, 0.12);
  --brand: #8a5a2a;
  --brand-dark: #5b3716;
  --accent: #d3b089;
  --shadow: 0 22px 60px rgba(58, 35, 15, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --container: min(1120px, calc(100% - 2rem));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "AzconaBody", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(211, 176, 137, 0.28), transparent 34%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--brand-dark);
  color: #fff;
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(251, 247, 240, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-mark {
  width: 3.2rem;
  height: 3.2rem;
  object-fit: contain;
}

.brand-type {
  width: min(220px, 42vw);
  object-fit: contain;
}

.site-nav {
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: calc(100% + 0.5rem);
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 243, 0.98);
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  font-size: 1.05rem;
}

.nav-toggle {
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0.7rem 1rem;
  border-radius: 999px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 14px;
  padding: 0.72rem 1.08rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(52, 34, 20, 0.08);
}

.button-primary {
  background: var(--brand-dark);
  color: #fff;
  border: 1px solid rgba(91, 55, 22, 0.9);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-dark);
  border: 1px solid rgba(91, 55, 22, 0.25);
}

.button-whatsapp {
  background: #2b8a57;
  color: #fff;
  border: 1px solid #2b8a57;
}

.nav-cta {
  padding-inline: 1rem;
}

.hero,
.page-hero {
  position: relative;
  overflow: clip;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(138, 90, 42, 0.08), transparent 50%),
    url("../img/madera.jpg") center/cover;
  opacity: 0.08;
  pointer-events: none;
}

.hero-grid,
.page-hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  padding: 4rem 0 3rem;
}

.hero-copy,
.hero-media,
.section-heading,
.card,
.service-card,
.feature-list article,
.contact-card,
.cta-panel,
.gallery-grid img,
.map-shell {
  animation: fade-up 460ms ease both;
}

.hero-media,
.cta-panel,
.contact-card:nth-child(2),
.card:nth-child(2),
.service-card:nth-child(2n),
.gallery-grid img:nth-child(3n) {
  animation-delay: 60ms;
}

.card:nth-child(3),
.service-card:nth-child(3n),
.feature-list article:nth-child(2),
.gallery-grid img:nth-child(3n + 1) {
  animation-delay: 110ms;
}

.hero-copy h1,
.page-hero h1,
.section-heading h2,
.cta-panel h2,
.site-footer h2,
.service-card h2,
.card h3,
.feature-list h3,
.contact-card h2 {
  font-family: "AzconaHead", "Franklin Gothic Medium", sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.7rem, 8vw, 5rem);
}

.lead {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--muted);
}

.hero-note {
  margin: 1.1rem 0 0;
  color: var(--brand-dark);
  font-size: 1.06rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
}

.hero-actions,
.cta-actions,
.gallery-nav,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-highlights {
  display: grid;
  gap: 0.65rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-highlights li {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.hero-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(211, 176, 137, 0.08), rgba(255, 255, 255, 0));
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 1.75rem;
}

.section-heading h2,
.cta-panel h2,
.contact-card h2,
.service-card h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.card-grid,
.service-grid,
.gallery-grid,
.feature-list {
  display: grid;
  gap: 1.1rem;
}

.card,
.service-card,
.contact-card,
.cta-panel,
.map-shell,
.feature-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card,
.service-card,
.contact-card,
.feature-list article {
  padding: 1.25rem;
}

.card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: calc(var(--radius) - 8px);
  margin-bottom: 1rem;
}

.card h3,
.feature-list h3 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
}

.split-section {
  display: grid;
  gap: 1.25rem;
}

.cta-panel {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px rgba(52, 34, 20, 0.16);
  transition: transform 180ms ease;
}

.gallery-grid img:hover {
  transform: translateY(-2px);
}

.page-hero {
  padding: 4rem 0 2.5rem;
}

.page-hero-services::before {
  background:
    linear-gradient(135deg, rgba(91, 55, 22, 0.2), transparent 55%),
    url("../img/galeria/portada/disenos.jpg") center/cover;
  opacity: 0.12;
}

.page-hero-contact::before {
  background:
    linear-gradient(135deg, rgba(91, 55, 22, 0.22), transparent 55%),
    url("../img/galeria/portada/trabajos-realizados-por-AzconaHnos-4.jpg") center/cover;
  opacity: 0.1;
}

.service-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.service-card {
  min-height: 100%;
}

.contact-layout {
  display: grid;
  gap: 1.25rem;
}

.contact-quick-actions {
  margin-top: 1.2rem;
}

.floating-whatsapp {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 0.95rem 0.72rem 0.72rem;
  border-radius: 999px;
  background: rgba(43, 138, 87, 0.96);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 34px rgba(14, 96, 51, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  animation: whatsapp-float 3.2s ease-in-out infinite;
}

.floating-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(14, 96, 51, 0.28);
}

.floating-whatsapp__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.floating-whatsapp__icon img {
  width: 1rem;
  height: 1rem;
}

.floating-whatsapp__text {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.field-grid {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(91, 55, 22, 0.18);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus,
.nav-toggle:focus,
.button:focus {
  outline: 3px solid rgba(138, 90, 42, 0.25);
  outline-offset: 2px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status-message {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
}

.status-message.is-success {
  background: rgba(69, 138, 79, 0.12);
  border-color: rgba(69, 138, 79, 0.24);
  color: #24512b;
}

.status-message.is-error {
  background: rgba(173, 71, 55, 0.12);
  border-color: rgba(173, 71, 55, 0.24);
  color: #7a2b1d;
}

.map-shell {
  overflow: hidden;
  min-height: 360px;
}

.map-shell iframe {
  width: 100%;
  min-height: 360px;
  border: 0;
}

.site-footer {
  padding: 3rem 0 1rem;
  color: #f8f1e8;
  background:
    linear-gradient(180deg, rgba(43, 25, 12, 0.86), rgba(34, 20, 10, 0.96)),
    url("../img/madera.jpg") center/cover;
}

.footer-grid {
  display: grid;
  gap: 1.2rem;
}

.site-footer a {
  color: #fff4e4;
}

.footer-bottom {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 243, 225, 0.16);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes whatsapp-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@media (min-width: 700px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-grid,
  .footer-grid,
  .contact-layout,
  .split-section,
  .cta-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    align-items: center;
    padding: 5.5rem 0 4rem;
  }

  .contact-layout {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .split-section {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 0.8fr;
  }
}

@media (max-width: 699px) {
  .floating-whatsapp {
    right: 0.85rem;
    bottom: 0.85rem;
    padding: 0.72rem;
  }

  .floating-whatsapp__text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
