/* ==========================================================================
   LUCENA — base compartida
   Tipografía, tokens, primitivas de layout y componentes comunes.
   ========================================================================== */

@font-face {
  font-family: "Cityboys";
  src: url("../../FONTS/cityboys-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cityboys";
  src: url("../../FONTS/cityboys-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../../FONTS/Montserrat(1)/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../../FONTS/Montserrat(1)/Montserrat-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-display: "Cityboys", "Montserrat", sans-serif;
  --font-body: "Montserrat", "Segoe UI", sans-serif;

  --cream: #f9f9f9;
  --anthracite: #1a1c21;
  --bronze: #9f7b52;
  --bronze-deep: #7a5b39;
  --bronze-soft: #c7b39a;
  --sand: #d8cdbf;
  --taupe: #938274;
  --greige: #b7b3aa;
  --stone: #55565a;
  --white: #ffffff;

  --bg: var(--cream);
  --surface: var(--white);
  --surface-alt: #f1ede7;
  --ink: var(--anthracite);
  --muted: var(--stone);
  --line: rgba(26, 28, 33, 0.16);
  --line-strong: rgba(26, 28, 33, 0.34);
  --accent: var(--bronze);
  --accent-ink: var(--bronze-deep);
  --accent-contrast: var(--cream);
  --focus: #9f7b52;
  --error: #a02a1f;
  --success: #1f6b46;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 9vw, 130px);
  --radius: 2px;
  --header-h: 78px;
  --shadow-soft: 0 24px 60px -40px rgba(26, 28, 33, 0.45);
  --shadow-card: 0 30px 70px -50px rgba(26, 28, 33, 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.9rem, 6.2vw, 5.6rem);
}

h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.7rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.15;
}

h4 {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.25;
}

::selection {
  background: var(--bronze);
  color: var(--cream);
}

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

:where(a, button, summary, input, select, textarea):focus:not(:focus-visible) {
  outline: none;
}

[hidden] {
  display: none !important;
}

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

.container--wide {
  width: min(100% - (var(--gutter) * 2), 1440px);
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-y);
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.section--tight {
  padding-block: clamp(42px, 6vw, 76px);
}

.section--dark {
  background: var(--anthracite);
  color: var(--cream);
  --ink: var(--cream);
  --muted: var(--greige);
  --line: rgba(249, 249, 249, 0.18);
  --line-strong: rgba(249, 249, 249, 0.34);
  --surface: #20232a;
  --focus: #d8cdbf;
  --accent-ink: #d8cdbf;
}

.section--sand {
  background: var(--surface-alt);
}

.section__head {
  display: grid;
  gap: clamp(18px, 2.4vw, 34px);
  max-width: 880px;
  margin-bottom: clamp(34px, 5vw, 64px);
}

.section__head--split {
  max-width: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow--plain::before {
  display: none;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  line-height: 1.7;
}

.body-copy {
  max-width: 66ch;
  color: var(--muted);
}

.small {
  font-size: 0.82rem;
  line-height: 1.55;
}

.micro {
  font-size: 0.72rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 0;
}

.strong {
  font-weight: 600;
  color: var(--ink);
}

.bronze {
  color: var(--accent-ink);
}

.serif-italic {
  font-family: var(--font-body);
  font-style: italic;
}

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --btn-border: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 14px 26px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 0.79rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background-color 0.28s var(--ease),
    color 0.28s var(--ease),
    border-color 0.28s var(--ease),
    transform 0.28s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  --btn-bg: var(--anthracite);
  --btn-fg: var(--cream);
  --btn-border: var(--anthracite);
}

.btn--primary:hover {
  --btn-bg: var(--bronze-deep);
  --btn-border: var(--bronze-deep);
}

.btn--bronze {
  --btn-bg: #a9855c;
  --btn-fg: var(--anthracite);
  --btn-border: #a9855c;
}

.btn--bronze:hover {
  --btn-bg: var(--sand);
  --btn-border: var(--sand);
}

.btn--light {
  --btn-bg: var(--cream);
  --btn-fg: var(--anthracite);
  --btn-border: var(--cream);
}

.btn--light:hover {
  --btn-bg: var(--sand);
  --btn-border: var(--sand);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
}

.btn--outline:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --btn-border: var(--ink);
}

.section--dark .btn--outline {
  --btn-fg: var(--cream);
  --btn-border: rgba(249, 249, 249, 0.4);
}

.section--dark .btn--outline:hover {
  --btn-bg: var(--cream);
  --btn-fg: var(--anthracite);
  --btn-border: var(--cream);
}

.btn--whatsapp {
  --btn-bg: #25d366;
  --btn-fg: #0b141a;
  --btn-border: #25d366;
  font-size: 0.82rem;
}

.btn--whatsapp:hover {
  --btn-bg: #1ebe5a;
  --btn-border: #1ebe5a;
}

.btn--block {
  width: 100%;
}

.btn--lg {
  min-height: 58px;
  padding: 18px 32px;
  font-size: 0.82rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

.text-link {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-underline-offset: 0.25em;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

/* ---------- Tags, chips, badges ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag--bronze {
  border-color: color-mix(in srgb, var(--bronze) 65%, transparent);
  color: var(--accent-ink);
}

.tag--solid {
  background: var(--anthracite);
  border-color: var(--anthracite);
  color: var(--cream);
}

.section--dark .tag {
  background: rgba(249, 249, 249, 0.06);
  color: var(--greige);
}

.section--dark .tag--bronze {
  color: var(--sand);
}

/* ---------- Media ---------- */

.media {
  position: relative;
  overflow: hidden;
  background: var(--surface-alt);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--portrait {
  aspect-ratio: 4 / 5;
}

.media--square {
  aspect-ratio: 1 / 1;
}

.media--landscape {
  aspect-ratio: 4 / 3;
}

.media__tag {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(26, 28, 33, 0.82);
  color: var(--cream);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.media__tag--light {
  background: rgba(249, 249, 249, 0.9);
  color: var(--anthracite);
}

/* ---------- Skip link, visually hidden, noscript ---------- */

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

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 12px 18px;
  background: var(--cream);
  color: var(--anthracite);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.skip-link:focus {
  transform: translateY(0);
}

.noscript {
  padding: 14px 18px;
  background: #fff4d6;
  color: #3a2a00;
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Dialogs ---------- */

dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  max-width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 860px);
}

dialog::backdrop {
  background: rgba(17, 19, 23, 0.72);
  backdrop-filter: blur(3px);
}

.dialog__panel {
  position: relative;
  padding: clamp(24px, 4vw, 42px);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  max-height: inherit;
}

.dialog__panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 14px;
  padding-right: 34px;
}

.dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

.dialog__close:hover {
  background: var(--ink);
  color: var(--cream);
}

.dialog__close svg {
  width: 15px;
  height: 15px;
}

.dialog__body {
  color: var(--muted);
  font-size: 0.92rem;
}

.dialog__body h3 {
  margin: 20px 0 8px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.dialog__body ul {
  padding-left: 1.15em;
  margin: 0 0 1em;
}

.dialog__body li {
  margin-bottom: 0.4em;
}

/* ---------- Shared responsive ---------- */

@media (max-width: 860px) {
  .section__head--split {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
  }

  .btn {
    width: 100%;
    padding-inline: 18px;
  }

  .btn--inline {
    width: auto;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .site-footer,
  .btn,
  dialog,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

.menu-dialog__cta {
  width: 100%;
  margin-top: 20px;
}

.menu-dialog__login {
  width: 100%;
  margin-top: 16px;
  border-color: rgba(249, 249, 249, 0.34);
  color: var(--cream);
}

.menu-dialog__login:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--anthracite);
}
