/* ============================================================
   HERITAGE MOTORS  ·  LANDING PAGE
   Paleta: crema (#f5f2ec), negro suave (#1f1d1a), bronce (#8b6f3f)
   ============================================================ */

:root {
  --hm-cream:        #f5f2ec;
  --hm-cream-dark:   #ebe6d8;
  --hm-cream-darker: #e8e3d5;
  --hm-border:       #d8d4c8;
  --hm-ink:          #1f1d1a;
  --hm-ink-soft:     #3a3530;
  --hm-text-muted:   #5a5650;
  --hm-text-faded:   #8a8780;
  --hm-bronze:       #8b6f3f;
  --hm-bronze-soft:  #a8895a;
  --hm-dark-bg:      #1f1d1a;
  --hm-dark-text:    #f5f2ec;
  --hm-dark-muted:   #a8a294;
  --hm-dark-faded:   #5a5650;
  --hm-dark-border:  #3a3530;

  --hm-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --hm-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--hm-sans);
  font-weight: 400;
  color: var(--hm-ink);
  background: var(--hm-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================================
   CABECERA
   ============================================================ */

.hm-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 44px;
  border-bottom: 0.5px solid var(--hm-border);
  background: var(--hm-cream);
  position: relative;
  z-index: 10;
}

.hm-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hm-ink);
}

.hm-emblem-img {
  height: 210px;
  width: auto;
  max-width: 840px;
  display: block;
}

/* ============================================================
   HERO
   ============================================================ */

.hm-hero {
  position: relative;
  padding: 110px 44px 100px;
  overflow: hidden;
  min-height: 480px;
}

.hm-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../imagenes/landing-page/hero-garage.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: grayscale(1);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0) 100%);
}

.hm-hero-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
}

.hm-eyebrow {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--hm-bronze);
  text-transform: uppercase;
  margin-bottom: 18px;
}

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

.hm-hero-title {
  font-family: var(--hm-serif);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  margin: 0 0 22px;
  color: var(--hm-ink);
  letter-spacing: -1.5px;
}

.hm-hero-title em {
  color: var(--hm-bronze);
  font-style: italic;
}

.hm-hero-lead {
  font-size: 16px;
  color: var(--hm-ink-soft);
  line-height: 1.7;
  margin: 0;
  max-width: 440px;
}

.hm-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--hm-bronze);
  animation: hm-bounce 2.4s ease-in-out infinite;
}

.hm-scroll-hint span {
  font-size: 10px;
  letter-spacing: 3px;
}

@keyframes hm-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* ============================================================
   GALER&Iacute;A
   ============================================================ */

.hm-gallery {
  padding: 70px 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  border-top: 0.5px solid var(--hm-border);
}

.hm-card {
  display: flex;
  flex-direction: column;
}

.hm-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--hm-cream-darker);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* Fallback cuando la imagen no existe a&uacute;n */
.hm-card-img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hm-serif);
  font-size: 14px;
  color: var(--hm-text-faded);
  background: var(--hm-cream-darker);
  opacity: 0;
}

.hm-card-img:not([style*="background-image"]) .hm-card-img-fallback,
.hm-card-img[style*="undefined"] .hm-card-img-fallback {
  opacity: 1;
}

.hm-card-body {
  padding: 16px 0 0;
}

.hm-card-title {
  font-family: var(--hm-serif);
  font-size: 18px;
  font-weight: 400;
  margin: 0;
  color: var(--hm-ink);
}

/* ============================================================
   FOOTER
   ============================================================ */

.hm-footer {
  background: var(--hm-dark-bg);
  color: var(--hm-dark-text);
}

.hm-footer-top {
  padding: 80px 44px 60px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 60px;
  border-bottom: 0.5px solid var(--hm-dark-border);
}

.hm-footer-title {
  font-family: var(--hm-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 14px;
  color: var(--hm-dark-text);
  line-height: 1.3;
}

.hm-footer-text {
  font-size: 13px;
  color: var(--hm-dark-muted);
  line-height: 1.8;
  margin: 0;
}

.hm-footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #c8c2b4;
  line-height: 2;
}

.hm-footer-list a {
  color: inherit;
  transition: color 0.2s;
}

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

.hm-muted { color: var(--hm-dark-muted); }

/* Stats */

.hm-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
}

.hm-stat-num {
  display: block;
  font-family: var(--hm-serif);
  font-size: 28px;
  color: var(--hm-bronze);
  line-height: 1;
}

.hm-stat-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--hm-dark-faded);
  margin-top: 4px;
}

/* Pie del footer con copyright + corona */

.hm-footer-bottom {
  padding: 60px 44px 50px;
  text-align: center;
}

.hm-copyright {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--hm-dark-faded);
  margin: 0 0 22px;
}

.hm-laurel-btn {
  background: none;
  border: none;
  padding: 8px 24px;
  cursor: pointer;
  display: inline-block;
}

.hm-laurel-img {
  width: 110px;
  height: auto;
  display: block;
  opacity: 0.45;
  /* Tinta la imagen al color bronce sin importar el color original */
  filter: brightness(0) invert(46%) sepia(33%) saturate(550%) hue-rotate(5deg) brightness(95%) contrast(85%);
  transition: opacity 0.4s ease;
}

.hm-laurel-btn:hover .hm-laurel-img,
.hm-laurel-btn:focus-visible .hm-laurel-img {
  opacity: 0.85;
}

.hm-laurel-btn:focus-visible {
  outline: 0.5px solid var(--hm-bronze);
  outline-offset: 8px;
}

/* ============================================================
   MODAL DE LOGIN
   ============================================================ */

.hm-modal[hidden] { display: none; }

.hm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hm-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(31, 29, 26, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: hm-fade-in 0.3s ease;
}

.hm-modal-content {
  position: relative;
  background: var(--hm-cream);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  border: 0.5px solid var(--hm-border);
  animation: hm-modal-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hm-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--hm-text-muted);
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}

.hm-modal-close:hover { color: var(--hm-ink); }

.hm-modal-body {
  padding: 0;
}

@keyframes hm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes hm-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Bloquea el scroll del body cuando el modal est&aacute; abierto */
body.hm-modal-open {
  overflow: hidden;
}

/* ============================================================
   FORMULARIO DE LOGIN (dentro del modal)
   ============================================================ */

.hm-login {
  padding: 36px 32px 32px;
  font-family: var(--hm-sans);
  color: var(--hm-ink);
}

.hm-login-header {
  text-align: center;
  margin-bottom: 28px;
}

.hm-login-emblem-img {
  height: 56px;
  width: auto;
  max-width: 220px;
  margin: 0 auto 16px;
  display: block;
}

.hm-login-titulo {
  font-family: var(--hm-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 4px;
  color: var(--hm-ink);
  letter-spacing: 0.5px;
}

.hm-login-subt {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--hm-bronze);
  text-transform: uppercase;
  margin: 0;
}

.hm-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hm-login-campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hm-login-campo label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--hm-text-muted);
  font-weight: 500;
}

.hm-login-campo input {
  border: none;
  border-bottom: 0.5px solid #c8c4b8;
  padding: 8px 2px;
  font-size: 15px;
  font-family: inherit;
  color: var(--hm-ink);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}

.hm-login-campo input:focus {
  border-bottom-color: var(--hm-bronze);
  border-bottom-width: 1px;
}

.hm-login-btn {
  margin-top: 12px;
  background: var(--hm-ink);
  color: var(--hm-cream);
  border: none;
  padding: 14px 24px;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.hm-login-btn:hover { background: var(--hm-ink-soft); }
.hm-login-btn:active { background: #0a0a0a; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .hm-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .hm-footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 28px 40px;
  }
}

@media (max-width: 600px) {
  .hm-header { padding: 20px 20px; }
  .hm-hero {
    padding: 70px 20px 80px;
    min-height: 420px;
  }
  .hm-hero-title { font-size: 38px; letter-spacing: -1px; }
  .hm-gallery {
    grid-template-columns: 1fr;
    padding: 50px 20px;
    gap: 28px;
  }
  .hm-footer-top { padding: 50px 20px 32px; }
  .hm-footer-bottom { padding: 40px 20px; }
  .hm-stats { gap: 20px; }
  .hm-stat-num { font-size: 24px; }
  .hm-laurel-img { width: 90px; }
}
