/* alfonsoaguilar.com, shared layout.
   Desktop reproduces the Wix desktop layout: a 980px stage centred in the window, full-bleed strips.
   Mobile (< 768px) reproduces the Wix mobile layout, which Wix designs at 320px and scales to the phone:
   every mobile size is written as calc(N * var(--u)), so 1 Wix mobile px = 1 --u. */

:root {
  --stage: 980px;
  --ink: #000;
  --gray: #717171;      /* Wix color_20: selected menu item */
  --gray-mid: #808080;  /* Wix color_39: footer first line */
  --paper: #fff;
  --header-h: 172px;
  --u: 1px;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-work: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Figtree", "Helvetica Neue", Arial, sans-serif;      /* stands in for Proxima Nova */
  --font-heavy: "Figtree", "Helvetica Neue", Arial, sans-serif;   /* stands in for Avenir 85 Heavy (weight 800) */
  --font-wide: "Lexend Zetta", "Helvetica Neue", Arial, sans-serif; /* stands in for Lulo Clean One Bold */
  --font-system: Helvetica, Arial, sans-serif;
}
@media (max-width: 767px) {
  :root { --u: calc(min(100vw, 480px) / 320); --header-h: calc(106 * var(--u)); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p, h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong, b { font-weight: 700; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  padding: 8px 14px; background: #fff; color: #000; font: 14px/1.2 var(--font-system);
  border: 1px solid #000; text-decoration: none;
}
.skip-link:focus { top: 8px; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Stage: the 980px Wix grid, centred. Sections are full width, their content sits on the stage. */
.stage { position: relative; width: min(var(--stage), 100% - 40px); margin-inline: auto; }
main { display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--paper);
  transition: top .3s ease;
}
.nav-desktop { position: absolute; top: 42px; left: 0; right: 0; height: 30px; }
.nav-desktop ul { display: flex; justify-content: center; height: 30px; }
.nav-desktop a {
  display: block; padding: 0 10px;
  font: 400 16px/30px var(--font-ui); letter-spacing: -0.012em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: color .4s ease;
}
.nav-desktop a:hover { color: var(--ink); }
.nav-desktop a[aria-current="page"] { color: var(--gray); }

/* EN | ES switch: the other language, at the right end of the menu row */
.lang-switch {
  position: absolute; top: 42px; right: max(20px, calc((100% - var(--stage)) / 2));
  font: 400 16px/30px var(--font-ui); letter-spacing: -0.012em;
  color: var(--ink); text-decoration: none; transition: color .4s ease;
}
.lang-switch:hover { color: var(--gray); }
.site-logo { position: absolute; top: 81px; left: 50%; width: 402px; height: 104px; margin-left: -201px; }
.site-logo img { width: 100%; height: 100%; }

.menu-toggle, .nav-mobile { display: none; }

@media (max-width: 767px) {
  .nav-desktop { display: none; }
  .site-logo {
    top: calc(13 * var(--u)); left: 50%;
    width: calc(280 * var(--u)); height: calc(40 * var(--u)); margin-left: calc(-140 * var(--u));
  }
  .lang-switch {
    top: calc(53 * var(--u)); right: calc(50% - 140 * var(--u));
    height: calc(40 * var(--u)); padding: 0 calc(4 * var(--u));
    font-size: calc(15 * var(--u)); line-height: calc(40 * var(--u));
  }
  .menu-toggle {
    display: grid; place-items: center;
    position: fixed; z-index: 60;
    top: calc(53 * var(--u)); left: calc(50% - 140 * var(--u));
    width: calc(40 * var(--u)); height: calc(40 * var(--u));
    padding: 0; background: #fff; color: #000;
    border: calc(1 * var(--u)) solid #000; border-radius: calc(3 * var(--u));
    cursor: pointer;
  }
  .menu-toggle svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); stroke: currentColor; stroke-width: 3.2; fill: none; stroke-linecap: butt; }
  .menu-toggle .icon-close { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block; }
  .nav-mobile:not([hidden]) {
    display: block; position: fixed; z-index: 59;
    top: calc(93 * var(--u)); left: calc(50% - 139 * var(--u)); width: calc(278 * var(--u));
    background: #fff; border: calc(1 * var(--u)) solid #000;
  }
  .nav-mobile li + li { border-top: calc(1 * var(--u)) solid #000; }
  .nav-mobile a {
    display: block; height: calc(48 * var(--u)); padding-left: calc(18 * var(--u));
    font: 400 calc(16 * var(--u)) / calc(48 * var(--u)) var(--font-system);
    color: #000; text-decoration: none; text-transform: uppercase;
  }
  .nav-mobile a[aria-current="page"] { background: #fff; }
  .nav-mobile:not([hidden]) ul { animation: menu-drop .3s ease-in; }
  .nav-mobile li { opacity: .95; }
  /* Wix slides the mobile header out while scrolling down; the menu button stays (it is fixed) */
  .site-header.is-hidden { top: calc(-106 * var(--u)); }
}
@keyframes menu-drop { from { transform: translateY(-105%); } to { transform: none; } }
.nav-mobile { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 30px 0 32px;   /* Wix footer: 104px, text at +30, two 21px lines */
  text-align: center;
  font: 400 14px/21px var(--font-body);
}
.site-footer .footer-copy { color: var(--gray-mid); }
.site-footer .footer-place { color: var(--ink); }
.footer-cookies { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.footer-cookies:hover { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 767px) {
  /* Wix mobile footer: 54.3 units = 9 top + two 17.16 lines + 11 bottom */
  .site-footer { padding: calc(9 * var(--u)) calc(10 * var(--u)) calc(11 * var(--u)); font-size: calc(12 * var(--u)); line-height: calc(17.16 * var(--u)); }
  .site-footer .footer-copy { color: var(--ink); }
}

/* ---------- Shared building blocks ---------- */
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center;
  background: #000; color: #fff; text-decoration: none;
  font: 400 15px/1 var(--font-ui);
  transition: background-color .4s ease, color .4s ease;
}
.btn-dark:hover { background: #fff; color: #000; }

/* Video facade: a poster with a play button that loads the real player on click (Vimeo / YouTube). */
.video-facade { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000 center / cover no-repeat; cursor: pointer; overflow: hidden; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-facade iframe, .video-facade video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Forms (shared bits; each page styles its own fields) ---------- */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 12px; font: 400 12px/1.5 var(--font-body); color: var(--gray); }
@media (max-width: 767px) { .form-note { margin-top: calc(10 * var(--u)); font-size: calc(11 * var(--u)); } }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; z-index: 80; left: 16px; right: 16px; bottom: 16px;
  max-width: 560px; margin-inline: auto;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 14px 16px; background: #fff; color: #000;
  border: 1px solid #000;
  font: 400 13px/1.45 var(--font-body);
}
.consent[hidden] { display: none; }
html:has(.consent:not([hidden])) { scroll-padding-bottom: 140px; }
.consent p { flex: 1 1 260px; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.consent-actions { display: flex; gap: 8px; }
.consent-btn { padding: 9px 16px; border: 1px solid #000; background: #fff; color: #000; font: 400 13px/1 var(--font-ui); cursor: pointer; }
.consent-accept { background: #000; color: #fff; }

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