/* =========================================================
   HOTEL LIERA CAPITAL SOCIMI, S.A. — Información corporativa
   Material 3 structural system (type scale, shape, elevation,
   state layers, spacing rhythm) on a navy / blue / gold
   palette; the gold comes from the client logo.
   ========================================================= */

/* Self-hosted so the site makes no third-party requests.
   Open Sans is licensed under the SIL OFL (assets/fonts/OFL.txt). */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  src: url("assets/fonts/open-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ── Brand palette ── */
  --navy:        #072146;
  --blue:        #1464a5;
  --blue-light:  #e9f7f7;
  --ink:         #121212;
  --muted:       #5c5c5c;
  --line:        #d3d3d3;
  --surface:     #f4f5f6;
  --white:       #fff;
  --gold:        #c88d52;  /* logo gold: fills, borders, glow */
  --gold-light:  #e0b27f;  /* gold text on navy and blue */
  --gold-dark:   #8c5c2c;  /* gold text on white and light grey */
  --medium-blue: #004481;
  --footer-bg:   #061a38;
  --accent-orange: #db752f;
  --pending-bg:  #fff3cd;
  --pending-ink: #6b4400;
  --error-bg:    #fdecea;
  --error-ink:   #8a1c13;

  /* ── Type family (Apex system sans) ── */
  --md-font: "Open Sans", "Segoe UI", "Segoe UI Web (West European)",
             -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Arial, sans-serif;

  /* ── Shape scale (MD3 corner radii) ── */
  --md-shape-xs:   4px;
  --md-shape-sm:   8px;
  --md-shape-md:   12px;   /* cards */
  --md-shape-lg:   16px;   /* large surfaces */
  --md-shape-full: 999px;  /* chips, search, buttons */

  /* ── Elevation (MD3 levels — soft, low) ── */
  --md-elev-1: 0 1px 2px rgba(7,33,70,.06), 0 1px 3px rgba(7,33,70,.10);
  --md-elev-2: 0 1px 2px rgba(7,33,70,.06), 0 2px 6px rgba(7,33,70,.10);
  --md-elev-3: 0 2px 4px rgba(7,33,70,.07), 0 6px 12px rgba(7,33,70,.11);

  /* ── Type scale (MD3 roles) ── */
  --md-display-s:  700 40px/48px var(--md-font);
  --md-headline-l: 700 32px/40px var(--md-font);
  --md-headline-m: 700 28px/36px var(--md-font);
  --md-headline-s: 700 24px/32px var(--md-font);
  --md-title-l:    600 22px/28px var(--md-font);
  --md-title-m:    600 16px/24px var(--md-font);
  --md-body-l:     400 16px/24px var(--md-font);
  --md-body-m:     400 14px/20px var(--md-font);
  --md-body-s:     400 12px/16px var(--md-font);
  --md-label-l:    600 14px/20px var(--md-font);
  --md-label-m:    600 12px/16px var(--md-font);
  --md-label-s:    600 11px/16px var(--md-font);
  --md-tracking-label: .06em;

  /* ── Spacing rhythm (4dp grid) ── */
  --md-content-max: 1160px;
  --md-topbar-h:    74px;

  /* ── Motion ── */
  --md-ease-standard: cubic-bezier(.2, 0, 0, 1);
  --md-dur-short:  120ms;
  --md-dur-medium: 260ms;
}

/* =========================================================
   Base reset & element defaults
   ========================================================= */
* { box-sizing: border-box; }

/* Scrolling is animated in JavaScript (see main.js). Keeping this on
   'auto' prevents the browser's native smooth scroll from intercepting
   and fighting the scripted animation. */
html { scroll-behavior: auto; }

body {
  margin: 0;
  font-family: var(--md-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}

a { color: var(--blue); }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -.01em;
}
h2 { font: var(--md-headline-l); }
h3 { font: var(--md-title-l); }
p { margin: 0; }

:where(button, input, select, textarea) { font: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--md-shape-xs);
}

[hidden] { display: none !important; }

.container {
  width: min(var(--md-content-max), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding: 88px 0;
  scroll-margin-top: calc(var(--md-topbar-h) + 12px);
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px; left: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--blue);
  border-radius: var(--md-shape-sm);
  font: var(--md-label-l);
  transform: translateY(-160%);
  transition: transform var(--md-dur-medium) var(--md-ease-standard);
}
.skip-link:focus { transform: none; }

/* Eyebrow — small uppercase tag */
.eyebrow {
  margin-bottom: 12px;
  color: var(--gold-dark);
  font: var(--md-label-m);
  letter-spacing: var(--md-tracking-label);
  text-transform: uppercase;
}

/* Client content still to be supplied — deliberately conspicuous so it
   cannot reach production unnoticed. */
mark.pending {
  padding: 1px 6px;
  color: var(--pending-ink);
  background: var(--pending-bg);
  border: 1px dashed var(--accent-orange);
  border-radius: var(--md-shape-xs);
  font: var(--md-label-l);
}

/* =========================================================
   Top app bar (navy)
   ========================================================= */
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  color: var(--white);
  background: rgba(7, 33, 70, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  display: flex;
  min-height: var(--md-topbar-h);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--white);
  text-decoration: none;
}

/* Client logo: gold and white on a transparent background, exported at 3x for a 56px bar */
.brand-logo {
  display: block;
  width: auto;
  height: 56px;
}

nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
nav a {
  position: relative;
  display: inline-flex;
  padding: 8px 12px;
  align-items: center;
  gap: 7px;
  color: #d4edfc;
  font: var(--md-label-l);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--md-shape-full);
  transition: color var(--md-dur-short) var(--md-ease-standard),
              background var(--md-dur-short) var(--md-ease-standard);
}
nav a svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
nav a:hover,
nav a:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, .10);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  padding: 8px;
  background: none;
  border: 0;
  border-radius: var(--md-shape-full);
  color: var(--white);
  cursor: pointer;
}
.menu-toggle span:not(.sr-only) {
  display: block;
  width: 22px; height: 2px;
  margin: 5px;
  background: currentColor;
  border-radius: 2px;
}

/* =========================================================
   Hero — introduction and latest General Meeting
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: var(--medium-blue);
}
/* Darkest tones sit behind the text (left); the gold glow stays on
   the right, behind the featured card, to keep text contrast high. */
.hero::before {
  position: absolute;
  z-index: -1;
  inset: -48px;
  content: "";
  background-image:
    radial-gradient(circle at 85% 20%, rgba(200, 141, 82, .4), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(7, 33, 70, .55), transparent 45%),
    linear-gradient(125deg, var(--navy), var(--medium-blue) 50%, var(--blue));
  filter: blur(18px);
  transform: scale(1.08);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 72px;
  align-items: center;
}

.hero .eyebrow { color: var(--gold-light); }
.hero h1 {
  max-width: 24ch;
  text-wrap: balance;
  color: var(--white);
  font: var(--md-display-s);
}
.hero-copy > p:not(.eyebrow) {
  max-width: 56ch;
  margin-top: 20px;
  color: #e3edf7;
  font: var(--md-body-l);
}

.featured {
  padding: 32px;
  color: var(--white);
  background: rgba(7, 33, 70, .62);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--md-shape-lg);
  box-shadow: var(--md-elev-3);
  backdrop-filter: blur(8px);
}
.featured-label {
  display: inline-flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font: var(--md-label-m);
  letter-spacing: var(--md-tracking-label);
  text-transform: uppercase;
}
.featured-label svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.featured h2 {
  color: var(--white);
  font: var(--md-headline-s);
}
.featured-meta {
  margin-top: 10px;
  color: #c9d8e8;
  font: var(--md-body-m);
}
.featured-actions {
  display: flex;
  margin-top: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.featured-actions:empty { display: none; }

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 20px;
  align-items: center;
  justify-content: center;
  border-radius: var(--md-shape-full);
  font: var(--md-label-l);
  text-decoration: none;
  transition: background var(--md-dur-short) var(--md-ease-standard),
              color var(--md-dur-short) var(--md-ease-standard),
              border-color var(--md-dur-short) var(--md-ease-standard);
}
.button--primary {
  color: var(--navy);
  background: var(--gold);
  border: 1px solid var(--gold);
}
.button--primary:hover { background: var(--gold-light); }
.button--secondary {
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .6);
}
.button--secondary:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); }
.featured :focus-visible { outline-color: var(--gold-light); }

/* =========================================================
   Documents library
   ========================================================= */
.documents { background: var(--surface); }

.section-heading {
  display: flex;
  margin-bottom: 40px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}
.section-heading h2 { font: var(--md-headline-m); }
.section-heading > div > p:last-child {
  margin-top: 10px;
  color: var(--muted);
  font: var(--md-body-m);
}

/* MD3 search field — pill */
.search {
  display: flex;
  width: min(340px, 100%);
  height: 48px;
  padding: 0 18px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--md-shape-full);
  transition: border-color var(--md-dur-short) var(--md-ease-standard),
              box-shadow var(--md-dur-short) var(--md-ease-standard);
}
.search:focus-within {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(200, 141, 82, .25);
}
.search svg {
  width: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}
.search input {
  width: 100%;
  color: var(--ink);
  background: none;
  border: 0;
  outline: 0;
  font: var(--md-body-m);
}
.search input::placeholder { color: var(--muted); }

.document-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* MD3 outlined card */
.document-card {
  position: relative;
  padding: 32px;
  scroll-margin-top: calc(var(--md-topbar-h) + 24px);
  background: var(--white);
  border: 1px solid transparent;
  border-radius: var(--md-shape-md);
  transition: box-shadow var(--md-dur-medium) var(--md-ease-standard),
              border-color var(--md-dur-short) var(--md-ease-standard);
}
.document-card:hover {
  border-color: var(--gold);
  box-shadow: var(--md-elev-2);
}

.card-top {
  display: flex;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
}

.category-icon {
  display: grid;
  width: 44px; height: 44px;
  place-items: center;
  color: var(--navy);
  background: var(--gold);
  border-radius: var(--md-shape-md);
}
.category-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Small label pill (file type) */
.file-type {
  display: inline-flex;
  padding: 4px 10px;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--md-shape-full);
  font: var(--md-label-s);
  letter-spacing: var(--md-tracking-label);
  text-transform: uppercase;
}
.file-type svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.document-card > h3 { font: var(--md-title-l); }
.document-card > p {
  max-width: 70ch;
  margin-top: 8px;
  color: var(--muted);
  font: var(--md-body-m);
}

.document-groups {
  display: grid;
  margin-top: 24px;
  gap: 12px;
}

.state-message {
  padding: 18px 20px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--md-shape-md);
  font: var(--md-body-m);
}
.state-message--error {
  color: var(--error-ink);
  background: var(--error-bg);
  border-color: #f3c1bb;
}

/* Collapsible group (one General Meeting, one year, ...) */
.document-group {
  scroll-margin-top: calc(var(--md-topbar-h) + 24px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--md-shape-md);
}
.document-group[open] { border-color: #b9d6ea; }

.document-group summary {
  display: flex;
  padding: 14px 18px;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  border-radius: var(--md-shape-md);
  transition: background var(--md-dur-short) var(--md-ease-standard);
}
.document-group summary::-webkit-details-marker { display: none; }
.document-group summary::before {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  content: "";
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
  transition: transform var(--md-dur-short) var(--md-ease-standard);
}
.document-group[open] summary::before { transform: rotate(45deg); }
.document-group summary:hover { background: rgba(20, 100, 165, .05); }

.group-title {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  font: var(--md-title-m);
}
.group-count {
  flex: 0 0 auto;
  padding: 2px 10px;
  color: var(--blue);
  background: var(--blue-light);
  border-radius: var(--md-shape-full);
  font: var(--md-label-s);
  letter-spacing: var(--md-tracking-label);
  text-transform: uppercase;
}

/* File lists — hairline-separated rows */
.file-list {
  margin: 0;
  padding: 0 18px 6px;
  list-style: none;
}
.file-list li { border-top: 1px solid var(--line); }

.file-list a {
  display: flex;
  padding: 14px 8px;
  margin: 0 -8px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: var(--md-shape-sm);
  text-decoration: none;
  transition: background var(--md-dur-short) var(--md-ease-standard);
}
.file-list a:hover,
.file-list a:focus-visible {
  background: rgba(20, 100, 165, .06);
  text-decoration: none;
}
.file-details { display: grid; min-width: 0; }
.file-list strong { color: var(--ink); font: var(--md-label-l); overflow-wrap: anywhere; }
.file-list small { margin-top: 2px; color: var(--muted); font: var(--md-body-m); }
.file-description {
  max-width: 80ch;
  margin: -6px 0 14px;
  color: var(--muted);
  font: var(--md-body-m);
}

.view-file {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font: var(--md-label-l);
}
.view-file::before {
  width: 16px;
  height: 16px;
  content: "";
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M6 2h8l4 4v16H6zM14 2v5h5M8.5 17c2.5-4 3.3-8 2.5-9 0 3 2 7 5 8-2-1-6-.4-7.5 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.view-file::after { content: "→"; }
.file-list a:hover .view-file { text-decoration: underline; }

.no-results {
  padding: 48px;
  color: var(--muted);
  text-align: center;
  font: var(--md-body-l);
}

/* =========================================================
   Contact — navy block
   ========================================================= */
.contact-card {
  display: grid;
  padding: 56px;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--md-shape-lg);
  box-shadow: var(--md-elev-2);
}
.contact-card .eyebrow { color: var(--gold-light); }
.contact-card h2 { color: var(--white); font: var(--md-headline-m); }
.contact-card > div > p:last-child {
  max-width: 46ch;
  margin-top: 16px;
  color: #aebdd0;
  font: var(--md-body-l);
}

.contact-details {
  display: grid;
  gap: 24px;
  margin: 0;
  justify-items: end;
  text-align: right;
  font-style: normal;
}
.contact-details div { display: grid; gap: 6px; }
.contact-details span {
  color: #8fa3bb;
  font: var(--md-label-s);
  letter-spacing: var(--md-tracking-label);
  text-transform: uppercase;
}
.contact-details p,
.contact-details a {
  color: var(--white);
  font: var(--md-title-m);
  text-decoration: none;
}
.contact-details a:hover,
.contact-details a:focus-visible { color: var(--gold-light); text-decoration: underline; }

/* =========================================================
   Footer
   ========================================================= */
footer {
  padding: 28px 0;
  color: #b8c9dc;
  background: var(--footer-bg);
  font: var(--md-body-m);
}
.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}
.footer-wrap p {
  display: flex;
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.footer-wrap .website-link,
.footer-wrap .website-link:visited {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-orange);
  padding: 0 4px;
  border-radius: var(--md-shape-xs);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--md-dur-short) var(--md-ease-standard),
              background var(--md-dur-short) var(--md-ease-standard);
}
.footer-wrap .website-link img {
  width: 25px;
  height: 19px;
  flex: 0 0 auto;
}
.footer-wrap .website-link:hover,
.footer-wrap .website-link:focus-visible {
  color: var(--navy);
  background: var(--accent-orange);
}

.back-to-top {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  min-height: 48px;
  padding: 12px 18px;
  align-items: center;
  gap: 8px;
  color: var(--white);
  background: var(--blue);
  border: 0;
  border-radius: var(--md-shape-full);
  box-shadow: var(--md-elev-3);
  font: var(--md-label-l);
  cursor: pointer;
  transition: background var(--md-dur-short) var(--md-ease-standard),
              transform var(--md-dur-short) var(--md-ease-standard);
}
.back-to-top:hover { background: var(--medium-blue); transform: translateY(-2px); }
.back-to-top span:first-child { font-size: 1.2rem; line-height: 1; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .menu-toggle { display: block; }

  nav {
    position: absolute;
    top: var(--md-topbar-h);
    right: 0; left: 0;
    display: none;
    padding: 8px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: var(--md-elev-2);
  }
  nav.open { display: flex; }
  nav a {
    padding: 14px calc((100vw - min(var(--md-content-max), calc(100vw - 48px))) / 2);
    border-radius: 0;
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font: var(--md-headline-l); }
}

@media (max-width: 820px) {
  .section { padding: 64px 0; }

  .section-heading { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }

  .contact-card {
    padding: 40px;
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-details { justify-items: start; text-align: left; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 32px, var(--md-content-max)); }
  .brand-logo { height: 46px; }
  .featured { padding: 24px; }
  .featured-actions .button { width: 100%; }
  .document-card { padding: 24px 18px; }
  /* Count moves under the title so long meeting names keep the full width. */
  .document-group summary {
    display: grid;
    padding: 12px 14px;
    grid-template-columns: 10px 1fr;
    column-gap: 12px;
    row-gap: 6px;
  }
  .group-count { grid-column: 2; justify-self: start; }
  .file-list { padding: 0 14px 4px; }
  .file-list a { flex-direction: column; align-items: flex-start; gap: 6px; }
  .contact-card { padding: 32px 24px; }
  .footer-wrap { flex-direction: column; align-items: flex-start; }
  .back-to-top { min-width: 48px; padding: 12px; justify-content: center; }
  .back-to-top span:last-child { display: none; }
}

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