/* IESC: header, navigation, footer, buttons. Loaded on every page.
   Design: "Sky to mantle" transect. One family (Archivo, variable wdth 62–125). */

:root {
  --ink: #1E1B18;
  --ink-2: #4A4540;
  --paper: #F3F4F1;
  --sky: #DDEBF1;
  --rule: rgba(30, 27, 24, .24);
  --focus: #0B6378;
  --hdr: 3.75rem;
  --core: clamp(2.25rem, 1.75vw, 4.5rem);
  --gut: clamp(1.25rem, 4vw, 4rem);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
}

.sr, .sprite {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; font-family: var(--font);
}
.skip:focus { top: .6rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: .6rem 1.15rem;
  border: 1.5px solid var(--ink); border-radius: 2px;
  font-family: var(--font); font-stretch: 88%; font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #3A342E; }
.btn-line { background: var(--paper); color: var(--ink); }
.btn-line:hover { background: #E4E6E1; }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-paper:hover { background: #E4E6E1; }
.btn-lg { min-height: 3.25rem; padding: .8rem 1.5rem; font-size: 1.0625rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  height: var(--hdr);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 1.25rem;
  background: var(--paper); color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.55;
}
.site-head a:not(.btn) { color: inherit; }
.site-head :focus-visible, .site-foot :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; min-width: 0; }
.brand-logo { width: 2.75rem; height: 2.75rem; flex: none; display: block; }
.brand-name { font-stretch: 75%; font-weight: 500; font-size: .9rem; color: var(--ink-2); line-height: 1.15; white-space: nowrap; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; align-self: stretch; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 1.1rem; margin: 0; padding: 0; height: 100%; }
.nav-links > li > a, .nav-login, .more-btn {
  font-family: var(--font); font-stretch: 85%; font-weight: 550; font-size: .95rem; text-decoration: none; color: var(--ink);
  padding: .3rem 0; border: 0; border-bottom: 1.5px solid transparent; background: none; cursor: pointer;
}
.nav-links > li > a:hover, .nav-login:hover, .more-btn:hover, .more.is-open .more-btn { border-bottom-color: var(--ink); }
.more-btn::after { content: ""; display: inline-block; margin-left: .35rem; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.nav-cta { min-height: 2.4rem; padding: .45rem 1rem; }
.menu-btn { display: none; }

/* "More" mega menu: hover on desktop, click/tap toggles .is-open */
.more { position: static; height: 100%; display: flex; align-items: center; }
.mega {
  display: none;
  position: absolute; right: 1.25rem; top: 100%; z-index: 60;
  grid-template-columns: repeat(5, minmax(9.5rem, auto)); gap: 0 1.75rem;
  background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  padding: 1rem 1.25rem 1.1rem;
}
.more.is-open .mega { display: grid; }
@media (hover: hover) and (min-width: 1181px) { .more:hover .mega { display: grid; } }
.mega-h { margin: 0 0 .4rem; font-stretch: 80%; font-weight: 750; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega a { display: block; padding: .22rem 0; font-stretch: 88%; font-size: .93rem; text-decoration: none; white-space: nowrap; }
.mega a:hover { text-decoration: underline; }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  font-stretch: 80%; font-weight: 650; font-size: .9rem;
  padding: .3rem .5rem; border: 1.5px solid var(--rule); border-radius: 2px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; display: inline-block; margin-left: .4rem; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.lang[open] summary { border-color: var(--ink); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + .4rem); z-index: 60;
  list-style: none; margin: 0; background: var(--paper); border: 1.5px solid var(--ink);
  padding: .35rem 0; min-width: 10rem;
  display: grid; grid-template-columns: 1fr;
}
.lang li a { display: block; padding: .3rem .9rem; text-decoration: none; font-size: .95rem; }
.lang li a:hover, .lang li a[aria-current] { background: rgba(30, 27, 24, .08); }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: var(--paper); padding: 0 var(--gut) 2rem; font-family: var(--font); font-size: 1rem; line-height: 1.55; }
.site-foot a:not(.btn) { color: var(--paper); }
.site-foot p { margin: 0 0 .75rem; }
.site-foot :focus-visible { outline-color: #8ED8E6; }

/* newsletter band: on the homepage only, directly above the footer */
.foot-news { margin: 0; padding: 2.75rem var(--gut) 2.5rem; background: #2B2723; color: var(--paper); font-family: var(--font); line-height: 1.55; border-bottom: 1px solid rgba(243, 244, 241, .2); }
.foot-news :focus-visible { outline: 3px solid #8ED8E6; outline-offset: 3px; }
.foot-news h2 { color: var(--paper); margin: 0 0 .5rem; font-stretch: 110%; font-weight: 780; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; }
.foot-news p { max-width: 40em; opacity: .85; margin: 0 0 .75rem; }
.subscribe { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; max-width: 34rem; }
.subscribe input {
  flex: 1 1 15rem; min-height: 2.75rem; padding: .55rem .8rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink); border-radius: 2px;
}

.foot-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem 3rem;
  border-top: 1px solid rgba(243, 244, 241, .35); padding-top: 1.75rem;
}
.foot-logo img { display: block; width: 4.5rem; height: 4.5rem; margin-bottom: .75rem; }
.foot-name { font-weight: 700; font-stretch: 95%; font-size: 1.1rem; }
.foot-tag { opacity: .8; max-width: 26em; }
.foot-h { font-stretch: 80%; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; opacity: .75; margin-bottom: .6rem !important; }
.foot-h2 { margin-top: 1.4rem !important; }
.foot-partners { display: flex; flex-wrap: wrap; gap: 10px; }
.foot-partners img { width: 35px; height: 35px; object-fit: contain; border-radius: 2px; filter: grayscale(100%) brightness(1.3); opacity: .6; transition: filter .2s, opacity .2s; }
.foot-partners img:hover { filter: none; opacity: 1; }
.foot-links, .foot-contact, .foot-social, .foot-legal { list-style: none; margin: 0; padding: 0; }
.foot-links li, .foot-contact li { padding: .18rem 0; }
.foot-social { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: .5rem; }
.foot-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(243, 244, 241, .35);
}
.foot-bottom p { margin: 0; font-weight: 600; }
.foot-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .brand-name { display: none; }
  .menu-btn {
    display: inline-flex; margin-left: auto; align-items: center;
    font: inherit; font-stretch: 85%; font-weight: 650; background: none; color: var(--ink);
    border: 1.5px solid var(--ink); border-radius: 2px; padding: .4rem .9rem; min-height: 2.5rem; cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .25rem;
    background: var(--paper); border-bottom: 1.5px solid var(--ink);
    padding: .75rem 1.25rem 1.25rem;
    max-height: calc(100dvh - var(--hdr)); overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; height: auto; }
  .more { display: block; height: auto; }
  .nav-links > li > a, .nav-login { display: block; padding: .6rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--rule); }
  .more-btn { display: none; }
  /* the mobile panel mirrors every "More" link */
  .mega { display: grid; position: static; box-shadow: none; border: 0; padding: .75rem 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
  .mega a { white-space: normal; padding: .35rem 0; font-size: 1rem; }
  .lang { margin: .6rem 0; }
  .lang summary { display: inline-block; }
  .lang ul { position: static; margin-top: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-cta { margin-top: .6rem; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .mega { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
}

/* compact footer for login, account and confirmation pages (footer_basic.html) */
.site-foot--basic { padding-top: .25rem; padding-bottom: 1.25rem; margin-top: 3rem; }
.site-foot--basic .foot-bottom { margin-top: 0; border-top: 0; }
