/* Grupo Monarq — corporativo marfil / negro / oro */
:root {
  --bg: #f3f1ec;
  --bg-soft: #ebe7df;
  --surface: #fffcf7;
  --ink: #141210;
  --ink-soft: #2c2924;
  --muted: #6a645c;
  --line: #ddd6cb;
  --line-strong: #c7beaf;
  --gold: #d4a84b;
  --gold-deep: #a8842c;
  --white: #ffffff;
  --danger: #b42318;
  --ok: #067647;
  --dark: #151311;

  --font: "Manrope", system-ui, sans-serif;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 3px;
  --shadow: 0 18px 40px rgba(20, 18, 16, 0.08);
  --container: min(1120px, calc(100% - 2.5rem));
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --read: 38rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-soft);
  background:
    radial-gradient(800px 380px at 90% -5%, rgba(212, 168, 75, 0.1), transparent 55%),
    linear-gradient(180deg, #f7f5f0 0%, var(--bg) 42%, #ebe8e1 100%);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--ink);
}

h1 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); font-weight: 650; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
h3 { font-size: 1.12rem; font-family: var(--font); font-weight: 700; letter-spacing: -0.01em; }

p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.02rem;
}

strong { color: var(--ink); font-weight: 700; }

.container { width: var(--container); margin-inline: auto; }

.section { padding: clamp(3.25rem, 6.5vw, 5.25rem) 0; }

.section-alt {
  background: rgba(255, 252, 247, 0.7);
  border-block: 1px solid var(--line);
}

.section-dark {
  background:
    radial-gradient(640px 300px at 12% 0%, rgba(212, 168, 75, 0.16), transparent 55%),
    var(--dark);
  color: #d8d2c8;
  border-block: 1px solid #2a2621;
}

.section-dark h2 { color: var(--white); }
.section-dark p { color: #b7aea2; max-width: var(--read); }
.section-dark .section-kicker { color: var(--gold); }

.capital-block { max-width: 40rem; }
.capital-block h2 { margin-bottom: 0.85rem; }
.capital-block p { margin: 0; }

.section-kicker {
  display: inline-block;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.section-head {
  max-width: var(--read);
  margin-bottom: 2rem;
}

.section-head p { margin-bottom: 0; }

.section-head-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.section-head-row .section-head { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
}

.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(243, 241, 236, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 252, 247, 0.96);
}

.header-inner {
  width: var(--container);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px;
}

.brand-logo-slot {
  display: flex;
  align-items: center;
  height: 44px;
}

.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  object-position: left center;
}

.footer-brand .brand-logo {
  height: 40px;
  max-width: 190px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.9rem;
  transition: color 0.2s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 1.05rem;
  border-radius: var(--radius);
  background: var(--ink) !important;
  color: var(--white) !important;
  font-weight: 700 !important;
  font-size: 0.86rem !important;
}

.btn-nav:hover { background: #000 !important; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--ink);
  transition: 0.2s var(--ease);
}

.menu-toggle span:nth-child(1) { top: 15px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 27px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: 0.2s var(--ease);
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-primary:hover { background: #000; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.btn-ghost {
  background: var(--bg-soft);
  border-color: var(--line);
  color: var(--ink);
}

/* Hero */
.hero {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2.25rem, 4vw, 3.25rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: end;
}

.brand-line {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.hero-copy h1 {
  max-width: 14ch;
  margin-bottom: 1rem;
}

.hero-lead {
  max-width: 34rem;
  font-size: 1.08rem;
  color: #5f584f;
  margin-bottom: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.65rem;
}

.hero-aside {
  padding: 1.45rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
}

.aside-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.aside-title {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
}

.aside-text {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

/* Facts */
.facts { padding: 0 0 clamp(1.75rem, 3.5vw, 2.75rem); }

.facts-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.fact {
  padding: 1.3rem 1.15rem;
  background: var(--surface);
}

.fact strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}

.fact span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

/* Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.pillar {
  padding: 1.5rem 1.3rem;
  background: var(--surface);
}

.pillar-num {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 0.06em;
}

.pillar h3 { margin-bottom: 0.4rem; }
.pillar p { margin: 0; font-size: 0.98rem; }

/* Areas */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.area-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.3rem 1.2rem;
  background: var(--surface);
  text-decoration: none;
  min-height: 100%;
  transition: background 0.2s var(--ease);
}

.area-card:hover,
.area-card:focus-visible { background: #fff8eb; }

.area-card span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.area-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.area-card p { margin: 0; font-size: 0.9rem; flex: 1; }

.area-card .area-cta {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

/* Presence */
.presence-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: start;
}

.region-stack { border-top: 1px solid var(--line); }

.region {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.region h3 { margin-bottom: 0.25rem; }
.region p { margin: 0; }

.countries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.countries span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.presence-note {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

/* CEO */
.ceo-feature {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: clamp(1.4rem, 3vw, 2.5rem);
  align-items: center;
}

.ceo-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.ceo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.ceo-role {
  margin: 0 0 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.ceo-copy h3 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.ceo-quote {
  margin: 1.1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: 1.12rem;
  line-height: 1.4;
  color: var(--ink);
  font-weight: 550;
}

/* Hub */
.hub-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.hub-band h3 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hub-band p:last-of-type {
  margin: 0;
  max-width: 38rem;
}

/* Catalog */
.page-hero { padding: 2.4rem 0 1rem; }

.page-hero h1 { max-width: 16ch; }

.catalog-toolbar {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.search-field { position: relative; }

.search-field input {
  width: 100%;
  min-height: 50px;
  padding: 0.8rem 1rem 0.8rem 2.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.search-field svg {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-btn {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.catalog-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.company-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 168px;
  padding: 1.35rem 1.25rem;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.company-card:hover,
.company-card:focus-visible {
  background: #fff8eb;
  box-shadow: inset 0 0 0 1px rgba(168, 132, 44, 0.35);
}

.company-card .tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.company-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

.company-card p {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  border: 1px dashed var(--line);
  background: var(--surface);
}

/* Company profile */
.detail-hero { padding: 2.25rem 0 1rem; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--gold-deep);
  text-decoration: none;
  font-weight: 650;
}

.company-profile {
  max-width: 42rem;
  padding: 0.25rem 0 2.75rem;
}

.company-profile h1 {
  margin-bottom: 0.9rem;
  max-width: 18ch;
}

.profile-lead {
  font-size: 1.08rem;
  margin-bottom: 1.6rem;
  color: var(--ink-soft);
}

.company-profile h2 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.65rem;
}

.company-profile h2 + p {
  margin-bottom: 0;
  padding-bottom: 0.25rem;
}

.profile-back {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.profile-back a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.profile-back a:hover { text-decoration: underline; }

/* Contact */
.contact-directory {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.contact-phone,
.dept-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.35rem 1.3rem;
  background: var(--surface);
  text-decoration: none;
  transition: background 0.2s var(--ease);
}

.contact-phone:hover,
.dept-card:hover,
.contact-phone:focus-visible,
.dept-card:focus-visible { background: #fff8eb; }

.contact-phone strong,
.dept-card strong {
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.contact-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.search-field input:focus,
.filter-btn:focus-visible,
.btn:focus-visible,
.nav a:focus-visible,
.menu-toggle:focus-visible,
.area-card:focus-visible,
.company-card:focus-visible,
.contact-phone:focus-visible,
.dept-card:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #aea59a;
  padding: 3rem 0 1.3rem;
}

.site-footer a {
  color: #f0e6d4;
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.35rem;
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-brand p {
  color: #8f867b;
  font-size: 0.9rem;
  margin: 0;
}

.footer-col h4 {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-col li { font-size: 0.9rem; }

.footer-bottom {
  border-top: 1px solid rgba(212, 168, 75, 0.18);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.84rem;
  color: #7d7469;
}

.legal-page { padding: 2.75rem 0 3.5rem; }

.legal-page article {
  max-width: 42rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

/* Motion — visible by default; JS only hides while awaiting reveal */
[data-reveal] {
  opacity: 1;
  transform: none;
}

html.js-reveal [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

html.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { gap: 0.75rem; }
  .nav a { font-size: 0.82rem; }
}

@media (max-width: 920px) {
  .menu-toggle { display: inline-block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem;
    background: rgba(255, 252, 247, 0.98);
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - var(--header-h));
    overflow: auto;
  }

  .nav.is-open { display: flex; }
  .nav a { padding: 0.85rem 0.8rem; }
  .nav a:hover { background: var(--bg-soft); }
  .nav .btn-nav { margin: 0.4rem; text-align: center; }

  .hero-grid,
  .facts-row,
  .pillar-grid,
  .presence-layout,
  .ceo-feature,
  .hub-band,
  .dept-grid {
    grid-template-columns: 1fr;
  }

  .company-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-copy h1 { max-width: none; }
}

@media (max-width: 640px) {
  :root {
    --container: min(1120px, calc(100% - 1.35rem));
    --header-h: 68px;
  }

  .brand-logo {
    height: 34px;
    max-width: 160px;
  }

  .facts-row { grid-template-columns: 1fr 1fr; }
  .footer-grid,
  .areas-grid { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js-reveal [data-reveal]:not(.is-visible),
  [data-reveal] { opacity: 1; transform: none; }
}
