@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Comfortaa:wght@400;600;700&display=swap');

:root {
  --granate: #111111;
  --granate-hover: #444444;
  --text-primary: #111111;
  --text-secondary: #666666;
  --background: #ffffff;
  --site-max-width: min(150ch, calc(100vw - 3rem));
}

body {
  font-family: 'Comfortaa', 'Segoe UI', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--background);
  font-size: 1.125rem;
  line-height: 1.7;
  padding-top: var(--site-header-height, 4.5rem);
}

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

body.header-top {
  padding-top: var(--site-header-height, 4.5rem);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--background);
  padding: 1rem 1rem;
  transition: transform 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-compact {
  padding: 0.75rem 1.5rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-nav {
  max-width: var(--site-max-width);
  margin: 0 auto;
  container-type: inline-size;
  width: 100%; display: flex; align-items: flex-end; flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.site-nav .nav-middle {
  display: flex;
  gap: max(0.55rem, min(6vw - 1.5rem, 2rem));
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  flex-wrap: nowrap;
  margin-left: max(0rem, 12vw - 6rem);
}

.site-nav .nav-middle a {
  white-space: nowrap;
  flex: 0 0 auto;
}

.site-nav .nav-lang {
  margin-left: auto;
  white-space: nowrap;
  flex: 0 0 auto;
  text-align: right;
}

@container (max-width: 31em) {
  .site-nav {
    row-gap: 0.35rem;
  }

  .site-nav .nav-middle {
    order: 3;
    flex: 1 1 100%;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-top: 0.15rem;
    scrollbar-width: none;
    margin-left: 0;
  }

  .site-nav .nav-middle::-webkit-scrollbar {
    display: none;
  }
}

.site-logo {
  width: auto;
  height: 2.5rem;
  vertical-align: bottom;
  transition: width 0.3s ease, height 0.3s ease;
}

.site-header.is-compact .site-logo {
  height: 1.875rem;
}

.site-header.is-hidden .site-logo {
  height: 1.875rem;
}

.floating-logo {
  position: fixed;
  top: 0.75rem;
  /* Align horizontally with <main>'s actual left edge, which sits 1.5rem
     to the left of the photo column (main has padding-left: 1.5rem).
     The JS sets --site-content-left from getBoundingClientRect().left so this
     stays accurate regardless of scrollbar width. */
  left: var(--site-content-left, 1.5rem);
  right: auto;
  z-index: 999;
  display: none;
  pointer-events: none;
  transform: translateY(-150%);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.floating-logo-img {
  display: block;
  width: auto;
  height: clamp(3rem, 1.5rem + 2.5vw, 4.5rem);
  filter: drop-shadow(0 0.15rem 0.4rem rgba(0, 0, 0, 0.18));
}

body.is-gallery-page .floating-logo {
  display: block;
}

body.is-gallery-page .floating-logo.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-footer p {
  color: var(--text-secondary);
}

main {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0rem 1.5rem 2rem 1.5rem;
}

.page-hero-img {
  display: block;
  width: 100%;
  max-height: clamp(14rem, 4rem + 30vw, 36rem);
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

@keyframes fullscreenZoomFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fullscreenZoomFadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes fadeInBackground {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.artwork-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.artwork-image:hover {
  transform: scale(1.02);
}

body.image-fullscreen {
  overflow: hidden;
}

body.image-fullscreen::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  cursor: pointer;
  animation: fadeInBackground 0.4s ease;
}

.artwork-image.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  width: 97.5vw;
  height: 97.5vh;
  object-fit: contain;
  border-radius: 0;
  max-width: 100%;
  max-height: 100%;
  cursor: pointer;
  animation: fullscreenZoomFadeIn 0.4s ease;
}

.artwork-image.fullscreen.exiting {
  animation: fullscreenZoomFadeOut 0.15s ease forwards;
}

.artwork-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.45rem;
  margin-top: 1.1rem;
}

.artwork-keyword {
  display: inline-block;
}

.artwork-date {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
}

.gallery-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 0.15rem;
  column-gap: 0.15rem;
}

/* On wide screens, expand the collage to 3 columns. The site already widens to
   --site-max-width, so no breakout is needed. */
@media (min-width: 75em) {
  .gallery-collage {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gallery-collage-link {
  display: block;
  position: relative;
  margin: 0;
  align-self: start;
  border-radius: 0.75rem;
  overflow: hidden;
}

.gallery-collage-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.gallery-collage-image:hover {
  transform: scale(1.02);
}

.gallery-collage-ref {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  padding: 0.12rem 0.35rem;
  font-size: 0.66rem;
  line-height: 1.1;
  font-weight: 600;
  color: #111111;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 0.35rem;
  opacity: 0;
  transform: translateY(-12%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.gallery-collage-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateY(18%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.gallery-collage-caption-es,
.gallery-collage-caption-eu {
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 700;
  color: #111111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.gallery-collage-caption-es {
  text-align: left;
}

.gallery-collage-caption-eu {
  text-align: left;
  font-style: italic;
}

.gallery-collage-link:hover .gallery-collage-caption,
.gallery-collage-link:focus-visible .gallery-collage-caption,
.gallery-collage-link:focus-within .gallery-collage-caption {
  opacity: 1;
  transform: translateY(0);
}

.gallery-collage-link:hover .gallery-collage-ref,
.gallery-collage-link:focus-visible .gallery-collage-ref,
.gallery-collage-link:focus-within .gallery-collage-ref {
  opacity: 1;
  transform: translateY(0);
}

.no-save-image {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media (max-width: 60rem) {
  .gallery-collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  .gallery-collage {
    grid-template-columns: 1fr;
  }
}

.contact-links {
  margin-top: 2rem;
}

.contact-link-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.9rem;
}

.contact-link-icon {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  flex: 0 0 2.25rem;
}

.contact-link-line a {
  color: var(--text-primary);
}

p {
  text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Comfortaa', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--granate);
  margin-top: 3rem;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.12rem; }
h6 { font-size: 1rem; }

.artwork-title {
  line-height: 1.12;
}

.artwork-title-subrow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.artwork-ref-label {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  font-size: 0.86rem;
  line-height: 1.1;
  color: #555555;
  white-space: nowrap;
}

.artwork-title-es,
.artwork-title-eu {
  display: block;
}

.artwork-title-eu {
  flex: 1 1 auto;
  min-width: 0;
  color: #4a4a4a;
  margin-top: 0.18rem;
}

.tag-page-title {
  margin-bottom: 1.1rem;
}

h2[id] {
  scroll-margin-top: 6rem;
}

a {
  color: var(--granate);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--granate-hover);
  text-decoration: underline;
}

hr {
  border: 0;
  border-top: 1px solid var(--granate);
  opacity: 0.3;
}

button,
.button {
  background: transparent;
  color: var(--granate);
  border: 1px solid var(--granate);
  padding: 0.5rem 1rem;
  font-family: 'Comfortaa', 'Segoe UI', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
}

button:hover,
button:focus,
.button:hover,
.button:focus {
  color: var(--granate-hover);
  border-color: var(--granate-hover);
}

.page-content p {
  line-height: 1.6;
  color: var(--text-secondary);
}

.page-content li {
  color: var(--text-secondary);
}

.page-content .hero-row {
  margin-bottom: 0;
}

.page-content .hero-row + p {
  margin-top: 0;
}

.intro-with-social {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: start;
}

.intro-copy {
  min-width: 0;
}

.intro-social {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  padding-top: 0.2rem;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-badge:hover,
.social-badge:focus {
  text-decoration: none;
  transform: translateY(-0.125rem);
  opacity: 0.82;
}

.social-badge:hover .social-badge-icon img,
.social-badge:focus .social-badge-icon img {
  filter: grayscale(0);
}

.social-badge-icon {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
}

.social-badge-icon svg {
  width: 100%;
  height: 100%;
}

.social-badge-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  transition: filter 0.2s ease;
}

.social-badge-baic .social-badge-icon {
  width: 3.7rem;
}

.social-badge-icon rect,
.social-badge-icon path,
.social-badge-icon circle {
  fill: currentColor;
}

.social-badge-baic {
  color: #111111;
}

.social-badge-linkedin {
  color: #0a66c2;
}

.social-badge-instagram {
  color: #c13584;
}

.row { display: flex; flex-wrap: wrap; gap: 0; }
.col { flex: 1 1 18.75rem; }
.hero-row { align-items: stretch; margin-bottom: 3.125rem; padding-top: 2.5rem; }
.hero-text {
  display: flex;
  align-items: top;
  margin-top: 1.25rem;
  text-align: center;
  margin-left: max(1.5rem, calc((100vw - 100ch) / 2 + 1.5rem));
  margin-right: max(1.5rem, calc((100vw - 100ch) / 2 + 1.5rem));
}

.hero-text h2 {
  font-size: min(2.1875rem, max(1.5625rem, 1.5vh + 1.5vw));
  color: #ffffff;
  text-shadow: 0.125rem 0.125rem 0.625rem rgba(0, 0, 0, 0.6);
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
}
.hero-image {
  margin-top: 0;
  margin-right: max(1.5rem, calc((100vw - 100ch) / 2 + 1.5rem));
  margin-bottom: 0;
  text-align: right;
  align-self: flex-end;
}

.hero-image-img {
  vertical-align: bottom;
  height: clamp(12rem, 42vh, 100vw);
  width: auto;
}
.hero-row.is-inline .hero-image {
  margin-top: 2.5rem;
}
.hero-row.is-inline .hero-text {
  margin-top: 4.375rem;
  margin-right: 0rem;
}

.key-areas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.feature-section {
  margin-top: 3.5rem;
  margin-bottom: 4rem;
}

.about-section {
  position: relative;
  padding: 1.5rem 1.4rem 1.6rem;
  background: linear-gradient(180deg, rgba(250, 248, 245, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 1.125rem;
  box-shadow: 0 1.125rem 2.5rem -2.125rem rgba(0, 0, 0, 0.35);
}

.about-section::before {
  content: "";
  position: absolute;
  left: 1.4rem;
  top: 1.6rem;
  bottom: 1.6rem;
  width: 0.125rem;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.55) 0%, rgba(17, 17, 17, 0.12) 100%);
}

.about-section h2 {
  margin-top: 0;
}

.about-section h2 {
  padding-left: 1rem;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 0.9fr);
  gap: 1.4rem;
  padding-left: 1rem;
}

.about-copy p:first-child {
  margin-top: 0.2rem;
}

.about-highlight {
  display: flex;
  align-items: center;
  align-self: stretch;
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 0.875rem;
  background: rgba(17, 17, 17, 0.03);
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.about-highlight p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.6;
  font-style: italic;
  text-align: center;
  text-wrap: balance;
}

.key-area-card {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
  border: 1px solid rgba(17, 17, 17, 0.2);
  border-radius: 0.625rem;
  padding: 1.1rem 1.1rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 248, 0.95) 100%);
  box-shadow: 0 0.5rem 1.5rem -1.25rem rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease;
}

.key-area-icon {
  width: 3rem;
  height: 3rem;
  flex: 0 0 3rem;
  object-fit: contain;
  margin-top: 0.1rem;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.key-area-card-content {
  flex: 1 1 auto;
  min-width: 0;
}

.key-area-card:hover .key-area-icon,
.key-area-card:focus-within .key-area-icon {
  opacity: 0.7;
}

.key-area-card:hover,
.key-area-card:focus-within {
  border-color: rgba(17, 17, 17, 0.52);
}

.key-area-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.125rem;
  line-height: 1.35;
}

.key-area-card p {
  margin: 0;
}

@media (max-width: 53.75em) {
  .intro-with-social {
    grid-template-columns: 1fr;
  }

  .intro-social {
    flex-direction: row;
    justify-content: flex-start;
  }

  .feature-section {
    margin-top: 3rem;
    margin-bottom: 3.3rem;
  }

  .about-layout,
  .key-areas-grid {
    grid-template-columns: 1fr;
  }

  .about-section {
    padding: 1.25rem 1rem 1.2rem;
  }

  .about-section::before {
    left: 1rem;
    top: 1.25rem;
    bottom: 1.25rem;
  }

  .about-layout {
    padding-left: 0.9rem;
  }

  .about-section h2 {
    padding-left: 0.9rem;
  }

  .key-area-card {
    gap: 0.85rem;
  }
}

@media print {
  body {
    padding-top: 0;
    font-size: 12pt;
    line-height: 1.45;
  }

  .site-header {
    display: none;
  }

  main,
  .site-footer {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .hero-row,
  .banner-row {
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    break-inside: avoid-page;
    page-break-inside: avoid;
  }

  .hero-row {
    min-height: 55mm;
    background-size: cover !important;
  }

  .banner-row {
    height: 70mm !important;
    background-size: cover !important;
  }

  .key-areas-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .feature-section,
  .about-section {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .about-section::before {
    display: none;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding-left: 0;
  }

  .about-highlight {
    background: #ffffff;
    box-shadow: none;
  }

  .key-area-card {
    break-inside: avoid-page;
    page-break-inside: avoid;
    box-shadow: none;
    background: #ffffff;
    border-color: rgba(17, 17, 17, 0.45);
  }

  .key-area-icon {
    opacity: 0.5;
  }

  h2,
  h3 {
    break-after: avoid-page;
    page-break-after: avoid;
  }
}