/* Ceferino Cortinas — landing */

:root {
  --navy: #1F2A38;
  --bronze: #BFA46F;
  --sand: #F4F0EA;
  --off-white: #FAF7F2;
  --gray: #4A4A4A;
  --white: #ffffff;
  --header-h: 4.25rem;
  --radius: 0.5rem;
  --shadow: 0 8px 28px rgba(31, 42, 56, 0.12);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", system-ui, sans-serif;
  --max: 68rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--bronze);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.35rem); }
h3 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

p { margin: 0 0 1rem; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
  color: var(--white);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(31, 42, 56, 0.08);
}

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

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-full {
  height: 2.75rem;
  width: auto;
  object-fit: contain;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.4rem;
  border: 1px solid rgba(31, 42, 56, 0.15);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 1px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-principal {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--off-white);
  border-bottom: 1px solid rgba(31, 42, 56, 0.08);
  padding: 1rem 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.nav-principal.is-open {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-list a {
  display: block;
  padding: 0.65rem 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--navy);
  text-decoration: none;
  border-radius: var(--radius);
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: var(--sand);
  color: var(--navy);
}

.header-cta {
  margin-top: 0.75rem;
  width: 100%;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
}

.btn-whatsapp {
  background: var(--bronze);
  color: var(--navy);
  border-color: var(--bronze);
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background: #a88d55;
  border-color: #a88d55;
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: var(--white);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border-color: rgba(31, 42, 56, 0.35);
}

.btn-outline-dark:hover,
.btn-outline-dark:focus-visible {
  border-color: var(--navy);
  background: var(--sand);
  color: var(--navy);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 42rem);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(31, 42, 56, 0.35) 0%,
    rgba(31, 42, 56, 0.55) 45%,
    rgba(31, 42, 56, 0.82) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3.25rem;
  max-width: 40rem;
  margin-left: max(1rem, calc((100% - var(--max)) / 2));
  margin-right: 1rem;
  width: min(100% - 2rem, 40rem);
}

.hero-eyebrow,
.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
  color: var(--bronze);
}

.hero-eyebrow {
  color: var(--bronze);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0.85rem;
}

.hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.section-lead {
  color: var(--gray);
  margin: 0;
}

.servicios {
  background: var(--off-white);
}

.servicios-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.servicio-card {
  background: var(--white);
  border: 1px solid rgba(31, 42, 56, 0.06);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 2px 12px rgba(31, 42, 56, 0.04);
  border-top: 3px solid var(--bronze);
}

.servicio-card p:last-child {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Por qué */
.por-que {
  background: var(--sand);
}

.porque-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.porque-item {
  background: var(--off-white);
  padding: 1.5rem 1.35rem;
  border-radius: calc(var(--radius) + 2px);
}

.porque-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--bronze);
  margin-bottom: 0.5rem;
}

.porque-item p:last-child {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Galería */
.galeria {
  background: var(--off-white);
}

.galeria-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.galeria-item figure {
  margin: 0;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  background: var(--sand);
  box-shadow: var(--shadow);
}

.galeria-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.galeria-item:hover img {
  transform: scale(1.03);
}

.galeria-item figcaption {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
}

/* CTA final */
.cta-final {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.cta-final .section-eyebrow {
  color: var(--bronze);
}

.cta-final h2 {
  color: var(--white);
}

.cta-text {
  max-width: 32rem;
  margin: 0 auto 1.75rem;
  font-weight: 300;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cta-final .btn-outline-dark {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.cta-final .btn-outline-dark:hover,
.cta-final .btn-outline-dark:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

/* Footer */
.site-footer {
  background: #17202a;
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-icon {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  /* logos must not be recolored */
  background: var(--off-white);
  border-radius: 0.35rem;
  padding: 0.2rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--white);
  margin: 0 0 0.15rem;
}

.footer-tag {
  margin: 0;
  font-size: 0.8rem;
  color: var(--bronze);
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-contacts a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-contacts a:hover {
  color: var(--bronze);
}

.footer-copy {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Desktop */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-principal {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    align-items: center;
    gap: 1.25rem;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
  }

  .nav-list a {
    padding: 0.4rem 0.7rem;
  }

  .header-cta {
    margin-top: 0;
    width: auto;
  }

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

  .servicios-grid .servicio-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
    width: 100%;
  }

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

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

  .footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .logo-full {
    height: 3.1rem;
  }

  .servicios-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .servicios-grid .servicio-card {
    grid-column: span 2;
    max-width: none;
    justify-self: stretch;
    width: auto;
  }

  /* Centrar las dos últimas tarjetas en la segunda fila */
  .servicios-grid .servicio-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .servicios-grid .servicio-card:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .porque-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }

  .galeria-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .section {
    padding: 5rem 0;
  }

  .hero {
    min-height: min(90vh, 48rem);
    align-items: center;
  }

  .hero-content {
    padding: 5rem 0;
  }

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

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .galeria-item img { transition: none; }
  .btn { transition: none; }
}
