/* ==========================================================================
   Hernández & asociados — hoja de estilos
   Grilla de diseño: 1280 px (según PDF de diseño)
   ========================================================================== */

/* ---------- Tipografía ---------- */
@font-face {
  font-family: "Lora";
  src: url("../fonts/Lora-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/Lora-Italic-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --gold: #9a875a;
  --gold-soft: #9b875b;
  --ink: #000000;
  --ink-soft: #1e1e1e;
  --muted: #706d6d;
  --dark: #352f2f;
  --bg: #ffffff;

  --shell: 1280px;
  --header-h: 74px;

  --fs-hero: 62px;
  --lh-hero: 80px;
  --fs-lead: 32px;
  --lh-lead: 41px;
  --fs-intro: 24px;
  --lh-intro: 31px;
  --fs-h2: 24px;
  --fs-card-title: 22px;
  --fs-page-title: 22px;
  --fs-accordion: 16px;
  --fs-body: 14px;
  --lh-body: 18px;
  --fs-nav: 12px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Lora", "Segoe UI", "Helvetica Neue", Arial, serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--dark);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
}
.skip-link:focus { left: 8px; top: 8px; }

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--gold);
}

.site-header .shell {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px 0 26px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 52px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: var(--fs-nav);
}

.nav a { padding: 4px 2px; }
.nav a:hover { color: var(--gold); }

.nav .divider {
  width: 2px;
  height: 24px;
  background: var(--ink);
  display: block;
}

.btn-ingresar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 26px;
  padding: 0 14px;
  background: var(--dark);
  color: #fff;
  border-radius: 4px;
  font-size: var(--fs-nav);
  transition: background-color .2s ease;
}
.btn-ingresar:hover { background: #4a4242; color: #fff; }

/* Botón hamburguesa (sólo móvil) */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-7px); }
.nav-toggle span::after { transform: translateY(5.5px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-1.5px) rotate(-45deg); }

/* ==========================================================================
   Hero (portada)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 646px;
  padding: 17px 0 24px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: 64px 0 0 60px;
}

.hero h1 {
  margin: 0;
  font-size: var(--fs-hero);
  line-height: var(--lh-hero);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.hero h1 .accent { color: var(--gold); }

.hero-lead {
  margin: 10px 0 0;
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  font-style: italic;
  color: var(--muted);
}

.hero-text {
  margin: 10px 0 0;
  font-size: var(--fs-intro);
  line-height: var(--lh-intro);
  font-style: italic;
  color: var(--muted);
}

.hero-media {
  position: absolute;
  top: 25px;
  right: 8px;
  width: 878px;
  max-width: 68.6%;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Productos y Servicios
   ========================================================================== */
.products { padding: 50px 48px 48px 50px; }

.products h2 {
  margin: 0 0 29px;
  font-size: var(--fs-h2);
  line-height: 31px;
  font-weight: 400;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 152px;
  padding: 14px 24px 12px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: var(--bg);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  box-shadow: 0 6px 20px rgba(154, 135, 90, .18);
  transform: translateY(-1px);
}

.card h3 {
  margin: 0;
  font-size: var(--fs-card-title);
  line-height: 30px;
  font-weight: 400;
}

.card p {
  margin: 8px 0 0;
  max-width: 500px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.card .btn-card {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 24px;
  background: var(--gold);
  color: #fff;
  border-radius: 4px;
  font-size: var(--fs-body);
  transition: background-color .2s ease;
}
.card .btn-card:hover { background: #86754c; color: #fff; }

/* ==========================================================================
   Páginas internas
   ========================================================================== */
.page { padding: 40px 50px; }

.page h1 {
  margin: 0;
  font-size: var(--fs-page-title);
  line-height: 28px;
  font-weight: 700;
}

.page-intro { margin: 6px 0 0; max-width: 1180px; }
.page-intro p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); }

.accordion { margin-top: 31px; padding-left: 50px; }

.ac-item + .ac-item { margin-top: 21px; }

.ac-item h2 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.ac-trigger {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 0;
  cursor: pointer;
  font-size: var(--fs-accordion);
  line-height: 21px;
  font-weight: 700;
  text-align: left;
}
.ac-trigger:hover { color: var(--gold); }

.ac-trigger .chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 8px;
  color: var(--gold);
  transition: transform .25s ease;
}
.ac-trigger[aria-expanded="false"] .chevron { transform: rotate(180deg); }

.ac-panel {
  padding-left: 20px;
  overflow: hidden;
}
.ac-panel[hidden] { display: none; }

.ac-panel > .ac-panel-inner { padding-top: 10px; }

.ac-panel p {
  margin: 0 0 18px;
  max-width: 1110px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.ac-panel p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
  margin-top: 31px;
}

/* min-width:0 evita que el ancho mínimo del <select> (definido por su opción más
   larga) estire la columna de la grilla y desborde el viewport en pantallas chicas */
.contact-grid > * { min-width: 0; }

.contact-form .field { margin-bottom: 16px; }

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-body);
  font-weight: 700;
}

.contact-form .req { color: var(--gold); }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: 20px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid rgba(154, 135, 90, .45);
  border-radius: 4px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-form textarea { min-height: 132px; resize: vertical; }

.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 8'%3E%3Cpath d='M1 1l7 6 7-6' fill='none' stroke='%239a875a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 7px;
  padding-right: 36px;
}

.contact-form :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(154, 135, 90, .16);
}

.contact-form :is(input, select, textarea):user-invalid {
  border-color: #a33a2c;
}

.contact-form .field-error {
  display: none;
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: #a33a2c;
}
.contact-form :is(input, select, textarea):user-invalid ~ .field-error { display: block; }

.contact-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 20px;
}
.contact-form .consent input { margin-top: 3px; accent-color: var(--gold); flex: 0 0 auto; }
.contact-form .consent label { font-weight: 400; margin: 0; line-height: 18px; }

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

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  height: 40px;
  padding: 0 24px;
  background: var(--dark);
  color: #fff;
  border-radius: 4px;
  font-size: var(--fs-body);
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}
.btn-submit:hover { background: #4a4242; }
.btn-submit[disabled] { opacity: .6; cursor: progress; }

.form-status {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid var(--gold);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.form-status[hidden] { display: none; }
.form-status.is-ok { border-color: #4d7a4a; background: #f2f7f1; }
.form-status.is-error { border-color: #a33a2c; background: #fbf2f0; }

.contact-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.contact-card {
  display: block;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  transition: box-shadow .2s ease, transform .2s ease;
}
a.contact-card:hover {
  box-shadow: 0 6px 20px rgba(154, 135, 90, .18);
  transform: translateY(-1px);
}

.contact-card .label {
  display: block;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact-card .value {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  line-height: 24px;
  /* el email es una cadena sin espacios: sin esto desborda en pantallas chicas */
  overflow-wrap: anywhere;
}

.contact-card .note {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg);
  padding: 40px 50px 56px;
}

.f-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 40px;
  border: 1px solid var(--gold);
  border-radius: 16px;
}

.f-mark {
  flex: 0 0 auto;
  width: 210px;
  height: auto;
}

.f-content {
  flex: 1 1 auto;
  max-width: 860px;
  text-align: center;
}

.f-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 12px;
  row-gap: 10px;
  font-size: var(--fs-body);
  line-height: 21px;
}
.f-links a { color: var(--ink-soft); }
.f-links a:hover { color: var(--gold); }
.f-links a:not(:last-child)::after {
  content: "|";
  margin-left: 12px;
  color: var(--gold);
}

.f-contact {
  margin: 18px 0 0;
  font-size: var(--fs-body);
  line-height: 21px;
}
.f-contact a { color: var(--ink-soft); }
.f-contact a:hover { color: var(--gold); }
.f-contact .sep { margin: 0 8px; color: var(--gold); }

.f-tagline {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 17px;
  color: var(--muted);
}
.f-tagline .sep { margin: 0 6px; color: var(--gold); }

.f-copy {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 16px;
  color: var(--muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1279px) {
  .hero { min-height: 0; padding-bottom: 48px; }
  .hero-media { top: 2vw; }
}

@media (max-width: 1100px) {
  :root {
    --fs-hero: 48px;
    --lh-hero: 62px;
    --fs-lead: 26px;
    --lh-lead: 34px;
    --fs-intro: 19px;
    --lh-intro: 26px;
  }
  .hero-copy { padding: 40px 0 0 40px; }
  .hero { padding-bottom: 60px; }
  .products { padding: 40px 40px; }
  .page { padding: 32px 40px; }
  .accordion { padding-left: 24px; }
  .site-header .shell { padding: 0 24px; }
  .f-inner { padding: 24px; gap: 20px; }
  .f-mark { width: 150px; }
}

@media (max-width: 880px) {
  :root { --fs-hero: 40px; --lh-hero: 52px; }

  .site-header .shell { position: relative; }

  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--gold);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 18px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 0; font-size: 15px; }
  .nav .divider { display: none; }
  .btn-ingresar { margin-top: 8px; height: 34px; font-size: 14px; }

  .hero { padding: 28px 0 40px; }
  .hero-copy { padding: 0 24px; }
  .hero-media {
    position: static;
    width: auto;
    max-width: none;
    margin-top: 28px;
    padding-left: 24px;
  }
  .hero h1 br,
  .hero-lead br,
  .hero-text br { display: none; }

  .products { padding: 36px 24px 40px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { min-height: 0; padding: 18px 20px 18px; }
  .card p { margin-bottom: 16px; }

  .page { padding: 28px 24px 36px; }
  .accordion { margin-top: 24px; padding-left: 0; }
  .ac-panel { padding-left: 14px; }

  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 24px; }
  .btn-submit { width: 100%; }

  .site-footer { padding: 28px 20px 36px; }
  .f-inner {
    flex-direction: column;
    gap: 16px;
    padding: 24px 20px;
  }
  .f-mark { width: 120px; }
  .f-links { column-gap: 8px; }
}

@media (max-width: 480px) {
  :root { --fs-hero: 32px; --lh-hero: 42px; --fs-lead: 21px; --lh-lead: 28px; --fs-intro: 16px; --lh-intro: 23px; }
  .card h3 { font-size: 19px; line-height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header { position: static; }
  .nav-toggle { display: none; }
  .ac-panel[hidden] { display: block !important; }
}
