/*
Theme Name: Llum Catalana Landing
Theme URI: https://www.llumcatalana.com/
Author: Llum Catalana
Description: Landing editorial i minimalista per a Llum Catalana, orientada a ajuntaments i municipis de Catalunya.
Version: 18.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: llum-catalana
*/

:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #20201d;
  --muted: #6d6d66;
  --line: #d8d8d2;
  --soft: #f2f2ee;
  --accent: #eee59b;
  --toggle-active: #20201d;
  --toggle-active-text: #ffffff;
  --max: 1600px;
  --edge: clamp(14px, 1.35vw, 22px);
  --page-gap: clamp(88px, 9vw, 150px);
  --ease: cubic-bezier(.22,.8,.22,1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1b1b17;
  --paper: #1b1b17;
  --ink: #eee59b;
  --muted: #c9c07c;
  --line: rgba(238,229,155,.22);
  --soft: #24241f;
  --toggle-active: #eee59b;
  --toggle-active-text: #1b1b17;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); transition: background-color .45s var(--ease); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .58; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus {
  left: 16px; top: 16px; z-index: 9999;
  background: var(--paper); color: var(--ink);
  padding: 10px 14px; outline: 2px solid currentColor;
}

.site-shell {
  width: calc(100% - 80px);
  max-width: var(--max);
  margin: clamp(44px, 8vw, 145px) auto;
  background: var(--paper);
  overflow: hidden;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}

/* Header */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 var(--edge);
  gap: 24px;
}
.brand {
  justify-self: start;
  font-size: clamp(24px, 2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: .9;
  white-space: nowrap;
}
.brand .custom-logo { width: auto; max-height: 42px; transition: filter .35s var(--ease); }
.brand .custom-logo-link { display: inline-flex; }
html[data-theme="dark"] .brand .custom-logo {
  filter: sepia(1) saturate(.7) hue-rotate(4deg) brightness(1.35);
}
.primary-nav { justify-self: center; }
.primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: clamp(18px, 2.1vw, 34px);
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 400;
  white-space: nowrap;
}
.primary-nav li:first-child a { font-weight: 700; }
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.3vw, 20px);
}
.header-contact {
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 600;
  white-space: nowrap;
}

/* Light / dark segmented toggle */
.theme-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: clamp(154px, 13vw, 190px);
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  isolation: isolate;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .25s var(--ease);
}
.theme-switch:hover { transform: translateY(-1px); }
.theme-switch-indicator {
  position: absolute;
  top: 3px;
  bottom: 3px;
  right: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--toggle-active);
  z-index: -1;
  transition: transform .42s var(--ease), background-color .4s var(--ease);
}
html[data-theme="dark"] .theme-switch-indicator { transform: translateX(calc(-100% - 0px)); }
.theme-choice {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--muted);
  transition: color .35s var(--ease), transform .22s var(--ease);
}
.theme-choice svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .38s var(--ease);
}
.theme-choice:hover svg { transform: rotate(18deg) scale(1.08); }
.theme-choice.is-active { color: var(--toggle-active-text); }
.theme-choice:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

/* Hero */
.hero { padding: clamp(72px, 8vw, 132px) 8px 0; }
.hero-copy {
  display: grid;
  grid-template-columns: 38% 62%;
  align-items: end;
  padding: 0 8px clamp(14px, 1.45vw, 24px);
}
.hero-kicker {
  margin: 0;
  max-width: 280px;
  font-size: clamp(13px, 1.08vw, 18px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.hero-main { min-width: 0; }
.hero h1 {
  margin: 0;
  max-width: 1120px;
  font-size: clamp(52px, 5.75vw, 96px);
  font-weight: 500;
  line-height: .91;
  letter-spacing: -0.058em;
}
.hero-intro {
  margin: clamp(34px, 4.2vw, 64px) 0 0;
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(14px, 1.1vw, 18px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.018em;
}
.hero-media {
  width: 100%;
  aspect-ratio: 1.86 / 1;
  overflow: hidden;
  background: var(--soft);
  transition: background-color .45s var(--ease);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  padding: 32px; text-align: center; color: var(--muted); font-size: 14px;
}

/* Shared sections */
.projects-section,
.services-section,
.about-section {
  padding: var(--page-gap) clamp(22px, 3.5vw, 56px);
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
.services-section,
.about-section { border-top: 1px solid var(--line); }
.section-heading-row,
.about-grid {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.7fr);
  gap: clamp(40px, 8vw, 150px);
}
.section-label {
  margin: 0;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.section-heading-row h2,
.about-content > h2 {
  margin: 0;
  max-width: 1050px;
  font-size: clamp(42px, 5.4vw, 92px);
  font-weight: 500;
  line-height: .93;
  letter-spacing: -0.057em;
}

/* Project showcase */
.project-slider { margin-top: clamp(56px, 7vw, 105px); }
.project-viewport {
  overflow: hidden;
  outline: none;
  margin-inline: calc(clamp(22px, 3.5vw, 56px) * -1);
  padding-inline: clamp(22px, 3.5vw, 56px);
}
.project-track {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 16px);
  width: max-content;
  padding: clamp(18px, 2.2vw, 34px) 0;
}
.project-card {
  flex: 0 0 clamp(150px, 12vw, 205px);
  height: clamp(250px, 22vw, 350px);
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  min-width: 0;
  transition: flex-basis .5s var(--ease), height .5s var(--ease), transform .5s var(--ease);
}
.project-card:hover,
.project-card:focus-within {
  flex-basis: clamp(430px, 41vw, 650px);
  height: clamp(330px, 30vw, 465px);
}
.project-info {
  flex: 0 0 0;
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transform: translateX(18px);
  transition: flex-basis .5s var(--ease), opacity .3s ease .08s, transform .45s var(--ease), padding .45s var(--ease);
}
.project-card:hover .project-info,
.project-card:focus-within .project-info {
  flex-basis: clamp(160px, 16vw, 235px);
  opacity: 1;
  transform: translateX(0);
  padding: 6px clamp(18px, 2vw, 30px) 6px 2px;
}
.project-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
}
.project-category {
  margin: 17px 0 0;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .04em;
}
.project-info h3 {
  margin: 20px 0 0;
  font-size: clamp(25px, 2.6vw, 42px);
  line-height: .96;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.project-description {
  margin: auto 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.project-image-wrap {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--soft);
}
.project-image-wrap img,
.project-placeholder {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .65s var(--ease), filter .45s var(--ease), background-color .45s var(--ease);
}
.project-card:hover .project-image-wrap img,
.project-card:focus-within .project-image-wrap img { transform: scale(1.018); }
.project-placeholder {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(127,127,127,.18) 46% 54%, transparent 54% 100%),
    var(--soft);
}
.project-placeholder span {
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 500;
  letter-spacing: -0.05em;
}
.slider-controls { display: none; }

/* Services */
.services-section > .section-label { margin-bottom: clamp(54px, 7vw, 100px); }
.services-list { border-top: 1px solid var(--ink); }
.service-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: clamp(22px, 3vw, 44px);
  padding: clamp(24px, 3vw, 46px) 0;
  border-bottom: 1px solid var(--line);
}
.service-number {
  padding-top: .55em;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.service-item h2 {
  margin: 0;
  max-width: 1120px;
  font-size: clamp(32px, 4vw, 68px);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -0.052em;
}
.service-item p {
  margin: 18px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

/* About */
.about-content { max-width: 980px; }
.about-lead {
  margin: clamp(38px, 5vw, 76px) 0 0;
  max-width: 900px;
  font-size: clamp(22px, 2.25vw, 36px) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.032em;
}
.about-content p {
  margin: 28px 0 0;
  max-width: 820px;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.45;
}
.about-content h3 {
  margin: clamp(70px, 8vw, 120px) 0 0;
  max-width: 900px;
  font-size: clamp(34px, 4.4vw, 74px);
  font-weight: 500;
  line-height: .97;
  letter-spacing: -0.052em;
}

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--soft);
  color: var(--ink);
  border-top: 1px solid var(--line);
  transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease);
}
.footer-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 1.65fr) repeat(4, minmax(135px, .78fr));
  gap: clamp(28px, 4vw, 68px);
  padding: clamp(66px, 7vw, 108px) clamp(28px, 5vw, 76px) clamp(52px, 5vw, 78px);
}
.footer-brand {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.055em;
}
.footer-intro {
  margin: 18px 0 0;
  max-width: 360px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
.footer-mail { display: inline-block; margin-top: 26px; font-weight: 600; font-size: 14px; }
.footer-column {
  display: flex; flex-direction: column; align-items: flex-start; gap: 11px; font-size: 14px;
}
.footer-column h2 { margin: 0 0 13px; font-size: 14px; font-weight: 700; }
.footer-column a,
.footer-column span { color: var(--muted); }
.footer-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: 0 clamp(28px, 5vw, 76px);
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.footer-bottom p { margin: 0; }
.footer-art {
  position: relative;
  z-index: 1;
  height: clamp(270px, 34vw, 520px);
  margin-top: -1px;
  background:
    radial-gradient(62% 80% at 10% 94%, rgba(255, 21, 95, .85) 0 31%, transparent 61%),
    radial-gradient(46% 80% at 37% 82%, rgba(113, 80, 235, .68) 0 31%, transparent 63%),
    radial-gradient(55% 80% at 70% 72%, rgba(71, 103, 222, .62) 0 31%, transparent 63%),
    radial-gradient(45% 70% at 58% 100%, rgba(178, 48, 28, .85) 0 34%, transparent 67%),
    radial-gradient(54% 68% at 46% 88%, rgba(125, 143, 78, .72) 0 32%, transparent 64%),
    linear-gradient(180deg, #f2d5df 0%, #f2a7bd 26%, #a69be4 52%, #57313c 100%);
  transition: background .45s var(--ease);
}
html[data-theme="dark"] .footer-art {
  background:
    radial-gradient(62% 80% at 18% 96%, rgba(238,229,155,.24) 0 31%, transparent 61%),
    radial-gradient(48% 82% at 47% 84%, rgba(238,229,155,.14) 0 31%, transparent 64%),
    radial-gradient(52% 80% at 78% 76%, rgba(238,229,155,.11) 0 30%, transparent 62%),
    linear-gradient(180deg, #1b1b17 0%, #151511 100%);
}
.footer-art::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,.5) 0 1px, rgba(0,0,0,.32) 1px 2px, transparent 2px 4px);
  background-size: 7px 7px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Tablet */
@media (max-width: 1120px) {
  .site-header { grid-template-columns: minmax(150px,1fr) auto minmax(250px,1fr); gap: 14px; }
  .primary-nav ul { gap: 16px; }
  .theme-switch { width: 150px; }
  .header-actions { gap: 10px; }
}

@media (max-width: 980px) {
  .site-shell { width: calc(100% - 36px); margin: 36px auto; }
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 14px 20px;
    padding-top: 16px;
    padding-bottom: 14px;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: 3px;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .primary-nav ul { justify-content: flex-start; width: max-content; }
  .hero-copy { grid-template-columns: 34% 66%; }
  .section-heading-row,
  .about-grid { grid-template-columns: 170px minmax(0, 1fr); gap: 42px; }
  .footer-content { grid-template-columns: 1.6fr repeat(2, 1fr); }
  .footer-legal { grid-column: auto; }
}

/* Mobile */
@media (max-width: 760px) {
  :root { --page-gap: 78px; }
  body { background: var(--paper); }
  .site-shell { width: 100%; margin: 0; }
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 13px 14px;
    min-height: auto;
    padding: 14px 16px 12px;
  }
  .brand { font-size: 22px; }
  .header-actions { gap: 8px; }
  .header-contact { font-size: 13px; }
  .theme-switch { width: 132px; height: 38px; }
  .theme-choice { gap: 4px; padding-inline: 4px; font-size: 9px; letter-spacing: .06em; }
  .theme-choice svg { width: 15px; height: 15px; }
  .primary-nav { padding-top: 4px; }
  .primary-nav ul { gap: 21px; padding-right: 16px; }
  .primary-nav a { font-size: 13px; }

  .hero { padding: 62px 0 0; }
  .hero-copy { grid-template-columns: 1fr; gap: 34px; padding: 0 16px 18px; }
  .hero-kicker { max-width: none; order: 2; font-size: 12px; }
  .hero-main { order: 1; }
  .hero h1 { font-size: clamp(43px, 12vw, 67px); line-height: .94; }
  .hero-intro { margin-top: 28px; font-size: 15px; line-height: 1.22; }
  .hero-media { aspect-ratio: 1.2 / 1; }

  .projects-section,
  .services-section,
  .about-section { padding-left: 16px; padding-right: 16px; }
  .section-heading-row,
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .section-heading-row h2,
  .about-content > h2 { font-size: clamp(42px, 12vw, 66px); }

  .project-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: -16px;
    padding-inline: 16px;
  }
  .project-viewport::-webkit-scrollbar { display: none; }
  .project-track { gap: 12px; padding: 16px 0 6px; }
  .project-card,
  .project-card:hover,
  .project-card:focus-within {
    flex: 0 0 min(82vw, 360px);
    height: auto;
    flex-direction: column-reverse;
    scroll-snap-align: center;
    overflow: visible;
  }
  .project-card[aria-hidden="true"] { display: none; }
  .project-image-wrap { width: 100%; aspect-ratio: .84 / 1; height: auto; }
  .project-info,
  .project-card:hover .project-info,
  .project-card:focus-within .project-info {
    flex: none;
    width: 100%;
    opacity: 1;
    transform: none;
    padding: 15px 0 0;
    overflow: visible;
  }
  .project-category { margin-top: 10px; }
  .project-info h3 { margin-top: 12px; font-size: clamp(27px, 8vw, 38px); }
  .project-description { margin-top: 12px; font-size: 13px; }
  .slider-controls {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
  }
  .slider-controls button {
    width: 46px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
  }
  .slider-controls button:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }

  .service-item { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .service-item h2 { font-size: clamp(31px, 9vw, 48px); }
  .service-item p { font-size: 14px; }
  .about-content h3 { font-size: clamp(33px, 9.5vw, 50px); }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 46px 28px;
    padding: 62px 20px 44px;
  }
  .footer-brand-column { grid-column: 1 / -1; }
  .footer-intro { max-width: 520px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 20px;
    gap: 7px;
  }
  .footer-art { height: 320px; }
}

@media (max-width: 430px) {
  .site-header { padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 19px; }
  .theme-switch { width: 122px; }
  .theme-choice span { font-size: 8px; }
  .header-contact { font-size: 12px; }
  .primary-nav ul { gap: 18px; }
  .hero-copy { padding-left: 16px; padding-right: 16px; }
  .footer-content { grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
  .footer-brand-column { grid-column: auto; }
  .footer-bottom { margin-left: 16px; margin-right: 16px; }
}

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

/* =========================================================
   V4.0 — Sticky glass header, separadors visuals, serveis hover,
   footer adaptatiu i controls editables al Personalitzador
   ========================================================= */

html { scroll-padding-top: 112px; }
.site-shell { overflow: visible; }

/* Sticky glass header inspired by iPhone frosted glass */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 1200;
  margin: 0 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 11%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    0 8px 28px rgba(0,0,0,.055);
  overflow: hidden;
  transition:
    background-color .45s var(--ease),
    border-color .45s var(--ease),
    box-shadow .35s var(--ease),
    transform .35s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255,255,255,.34), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.12), transparent 52%);
  opacity: .72;
}
.site-header > * { position: relative; z-index: 1; }
html[data-theme="dark"] .site-header {
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  border-color: color-mix(in srgb, var(--ink) 15%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(238,229,155,.10),
    0 10px 34px rgba(0,0,0,.24);
}

/* Full-width image separators: same visual measure as hero */
.section-separator {
  width: calc(100% - 16px);
  margin: 0 8px;
  padding: 0;
  aspect-ratio: 1.86 / 1;
  overflow: hidden;
  background: var(--soft);
}
.section-separator img,
.section-separator-placeholder {
  width: 100%;
  height: 100%;
}
.section-separator img { object-fit: cover; }
.section-separator-placeholder {
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

/* Remove unwanted divider lines around the new image separators */
.services-section,
.about-section { border-top: 0 !important; }
.services-list { border-top: 0; }
.service-item:last-child { border-bottom: 0; }

/* Service hover images */
.service-item {
  position: relative;
  isolation: isolate;
  outline: none;
  cursor: default;
}
.service-copy { position: relative; z-index: 2; }
.service-hover-media {
  position: absolute;
  z-index: 4;
  right: clamp(0px, 2vw, 34px);
  top: 50%;
  width: clamp(220px, 28vw, 430px);
  aspect-ratio: 1.35 / 1;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-46%) scale(.94) rotate(.2deg);
  transform-origin: center;
  pointer-events: none;
  background: var(--soft);
  transition:
    opacity .28s ease,
    visibility .28s ease,
    transform .5s var(--ease);
}
.service-hover-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-item:hover .service-hover-media,
.service-item:focus-visible .service-hover-media,
.service-item:focus-within .service-hover-media {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}
.service-item:hover h2,
.service-item:focus-visible h2 {
  letter-spacing: -0.058em;
}
.service-item:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--ink) 42%, transparent);
  outline-offset: 8px;
}

/* Footer: same surface as page, with image blended into LLUM/FOSC */
.site-footer {
  background: var(--paper);
  border-top: 0;
}
.footer-art {
  height: clamp(360px, 42vw, 650px);
  margin-top: -1px;
  background-color: var(--paper);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 58%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.22) 10%, #000 34%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.22) 10%, #000 34%, #000 100%);
  transition: background-color .45s var(--ease), filter .45s var(--ease);
}
html[data-theme="dark"] .footer-art {
  background-color: var(--paper);
  background-blend-mode: multiply;
  filter: saturate(.88) brightness(.72) contrast(1.08);
}
.footer-art::after { opacity: .11; }

/* Keep the footer content optically connected to the image */
.footer-content { padding-bottom: clamp(44px, 4vw, 64px); }
.footer-bottom { padding-bottom: 20px; }

@media (max-width: 980px) {
  .site-header { top: 8px; border-radius: 19px; }
  .service-hover-media { width: clamp(210px, 34vw, 340px); right: 0; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 132px; }
  .site-header {
    top: 6px;
    margin: 0 6px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--paper) 78%, transparent);
  }
  .section-separator {
    width: 100%;
    margin: 0;
    aspect-ratio: 1.2 / 1;
  }
  .service-hover-media { display: none; }
  .footer-art {
    height: 360px;
    background-position: center 60%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.28) 10%, #000 32%, #000 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.28) 10%, #000 32%, #000 100%);
  }
}

/* =========================================================
   V8 — Full-bleed layout, liquid-glass header and integrated footer
   ========================================================= */

/* Remove the old page frame: the theme surface now fills the viewport. */
html,
body,
.site-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--paper);
}
.site-shell { overflow: visible; }

/* Full-width iPhone-inspired liquid glass bar: no capsule, border or shadow. */
.site-header {
  --glass-x: 50%;
  --glass-y: 0%;
  position: sticky;
  top: 0;
  z-index: 1200;
  width: 100vw;
  margin: 0;
  min-height: 76px;
  padding-left: max(var(--edge), calc((100vw - var(--max)) / 2 + var(--edge)));
  padding-right: max(var(--edge), calc((100vw - var(--max)) / 2 + var(--edge)));
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
  background: rgba(255,255,255,.10);
  -webkit-backdrop-filter: blur(28px) saturate(175%) brightness(1.035);
  backdrop-filter: blur(28px) saturate(175%) brightness(1.035);
  transition: opacity .25s ease, transform .36s var(--ease), background-color .35s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  background:
    radial-gradient(110% 170% at var(--glass-x) -55%, rgba(255,255,255,.44) 0%, rgba(255,255,255,.16) 34%, rgba(255,255,255,0) 62%),
    linear-gradient(180deg, rgba(255,255,255,.25) 0%, rgba(255,255,255,.075) 48%, rgba(255,255,255,.025) 100%);
  mix-blend-mode: screen;
}
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background: linear-gradient(100deg, transparent 0 24%, rgba(255,255,255,.16) 42%, rgba(255,255,255,.04) 56%, transparent 76%);
  transform: translateX(calc((var(--glass-x) - 50%) * .16));
}
.site-header > * { position: relative; z-index: 1; }

/* Dark glass stays neutral: no coloured/dirty gradient. */
html[data-theme="dark"] .site-header {
  background: rgba(27,27,23,.56);
  -webkit-backdrop-filter: blur(30px) saturate(145%) brightness(.96);
  backdrop-filter: blur(30px) saturate(145%) brightness(.96);
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="dark"] .site-header::before {
  opacity: .10;
  background: radial-gradient(120% 180% at var(--glass-x) -70%, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 58%);
  mix-blend-mode: screen;
}
html[data-theme="dark"] .site-header::after { opacity: 0; }

/* When the footer arrives, the floating/sticky header leaves the viewport. */
body.footer-in-view .site-header {
  opacity: 0;
  transform: translateY(-102%);
  pointer-events: none;
}

/* Keep editorial copy aligned while all photographic bands are full bleed. */
.hero-copy {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-left: clamp(24px, 4vw, 72px);
  padding-right: clamp(24px, 4vw, 72px);
}
.hero-media,
.section-separator {
  width: 100vw;
  max-width: none;
  margin: 0;
  border: 0;
}
.hero-media { aspect-ratio: 1.86 / 1; }
.section-separator { aspect-ratio: 1.86 / 1; }
.hero-media img,
.section-separator img { width: 100%; height: 100%; object-fit: cover; }

/* Project/services/about content keeps a readable editorial measure. */
.projects-section,
.services-section,
.about-section {
  width: 100%;
  max-width: none;
}
.projects-section > .section-heading-row,
.services-section > .section-label,
.services-section > .services-list,
.about-section > .about-grid,
.project-slider {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

/* Footer image is the footer background itself, not a separate block below it. */
.site-footer {
  --footer-active-image: var(--footer-image-light);
  position: relative;
  width: 100vw;
  min-height: clamp(760px, 66.666vw, 1080px);
  margin: 0;
  border: 0 !important;
  background-color: var(--paper);
  background-image: var(--footer-active-image);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  color: var(--ink);
  overflow: hidden;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
html[data-theme="dark"] .site-footer {
  --footer-active-image: var(--footer-image-dark);
  background-color: var(--paper);
}
.footer-content,
.footer-bottom {
  width: min(calc(100% - 48px), var(--max));
  margin-left: auto;
  margin-right: auto;
}
.footer-content {
  padding-left: 0;
  padding-right: 0;
  padding-top: clamp(62px, 6.5vw, 104px);
  padding-bottom: clamp(54px, 5vw, 82px);
}
.footer-bottom {
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 20px;
}
.footer-art { display: none !important; }

/* Eliminate any old contrasting frame in both themes. */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .site-shell {
  background: var(--paper) !important;
}

@media (max-width: 980px) {
  .site-header {
    top: 0;
    border-radius: 0 !important;
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-footer {
    min-height: max(860px, 80vw);
    background-size: cover;
    background-position: center top;
  }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 126px; }
  .site-header {
    top: 0;
    margin: 0;
    border-radius: 0 !important;
    padding: 13px 16px 11px;
    background: rgba(255,255,255,.16);
  }
  html[data-theme="dark"] .site-header { background: rgba(27,27,23,.62); }
  .hero-media,
  .section-separator { width: 100vw; aspect-ratio: 1.2 / 1; }
  .site-footer {
    min-height: 1180px;
    background-size: cover;
    background-position: center top;
  }
  .footer-content,
  .footer-bottom { width: calc(100% - 32px); }
}


/* =========================================================
   V9 — Brand orbes, header spacing and footer alignment
   ========================================================= */
.brand-lockup,
.footer-brand-lockup {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* The glowing four-orb symbol sits at the same optical height as the wordmark. */
.brand-orbes,
.footer-brand-orbes {
  display: block;
  width: auto;
  height: .86em;
  flex: 0 0 auto;
  margin-left: .34em;
  object-fit: contain;
  pointer-events: none;
}

/* If a Custom Logo is used, keep the symbol proportional to that lockup too. */
.brand-lockup .custom-logo-link {
  display: inline-flex;
  align-items: center;
}
.brand-lockup .custom-logo + .brand-orbes,
.brand-lockup .custom-logo-link + .brand-orbes {
  height: 34px;
  margin-left: 12px;
}

/* Give Contacte a deliberate breathing space from the right edge. */
.header-contact {
  margin-right: clamp(14px, 1.6vw, 30px);
}

/* Footer: the four column headings share the optical centre of the brand lockup.
   The first content line of every column then starts on exactly the same row. */
.footer-brand-column,
.footer-column {
  display: grid;
  grid-template-rows: 42px auto;
  align-content: start;
}
.footer-brand-lockup,
.footer-column h2 {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin: 0;
}
.footer-brand {
  margin: 0;
  line-height: .95;
}
.footer-column h2 {
  font-weight: 700;
  line-height: 1;
}
.footer-brand-body,
.footer-column-links {
  margin-top: 18px;
}
.footer-column-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}
.footer-intro {
  margin: 0;
}

/* No separator rule above the copyright row. */
.footer-bottom {
  border-top: 0 !important;
}

@media (max-width: 760px) {
  .brand-orbes { height: .80em; margin-left: .30em; }
  .footer-brand-orbes { height: .82em; margin-left: .32em; }
  .header-contact { margin-right: 8px; }
}

/* =========================================================
   V10 — mobile glass navigation, scroll reveal, active anchors
   ========================================================= */

/* Navigation hover and scroll-aware current section share the same state. */
.primary-nav a {
  position: relative;
  opacity: 1;
  transition: opacity .22s ease, font-weight .22s ease, letter-spacing .22s ease;
}
.primary-nav a:hover,
.primary-nav a.is-current {
  opacity: 1;
  font-weight: 700;
  letter-spacing: -.018em;
}
.primary-nav li:first-child a:not(.is-current) { font-weight: 400; }

/* Animated hero word. The server-rendered word remains “nadalenca”. */
.hero-rotating-word {
  display: inline-block;
  min-width: 8.35ch;
  transform: translateY(0);
  opacity: 1;
  filter: blur(0);
  transition: opacity .26s ease, transform .38s var(--ease), filter .30s ease;
}
.hero-rotating-word.is-leaving {
  opacity: 0;
  transform: translateY(-.16em);
  filter: blur(4px);
}
.hero-rotating-word.is-entering {
  opacity: 0;
  transform: translateY(.16em);
  filter: blur(4px);
}

/* No animation on the first screen. Reveals begin after the hero image. */
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .js .reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition:
      opacity .72s cubic-bezier(.2,.72,.18,1) var(--reveal-delay, 0ms),
      transform .86s cubic-bezier(.16,1,.3,1) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  .js .reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translate3d(0,0,0);
    will-change: auto;
  }
}

/* Mobile menu is absent on desktop. */
.mobile-menu-toggle,
.mobile-menu { display: none; }
.footer-mobile-nav,
.footer-mobile-art { display: none; }

@media (max-width: 760px) {
  html { scroll-padding-top: 74px; }
  body.mobile-menu-open { overflow: hidden; }

  /* Compact sticky header: logo + compact toggle + hamburger. */
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    min-height: 62px;
    padding: 10px 12px 9px;
    gap: 8px;
    overflow: visible;
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    font-size: clamp(16px, 4.7vw, 20px);
  }
  .brand-lockup { max-width: 100%; }
  .brand-orbes { height: .72em; margin-left: .28em; }
  .brand-lockup .custom-logo + .brand-orbes,
  .brand-lockup .custom-logo-link + .brand-orbes {
    height: 22px;
    margin-left: 7px;
  }
  .brand .custom-logo { max-height: 29px; max-width: min(46vw, 185px); }

  .primary-nav,
  .header-contact { display: none !important; }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 7px;
  }
  .theme-switch {
    width: 104px;
    height: 34px;
    padding: 2px;
    border-color: color-mix(in srgb, var(--ink) 18%, transparent);
  }
  .theme-switch-indicator {
    top: 2px;
    bottom: 2px;
    right: 2px;
    width: calc(50% - 2px);
  }
  .theme-choice {
    gap: 3px;
    padding: 0 3px;
    font-size: 7.8px;
    letter-spacing: .05em;
  }
  .theme-choice svg { width: 13px; height: 13px; }

  .mobile-menu-toggle {
    position: relative;
    z-index: 1403;
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    position: absolute;
    width: 19px;
    height: 1.5px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .38s var(--ease), top .38s var(--ease), opacity .22s ease;
  }
  .mobile-menu-toggle span:first-child { top: 14px; }
  .mobile-menu-toggle span:last-child { top: 21px; }
  .mobile-menu-toggle.is-open span:first-child { top: 17.5px; transform: rotate(45deg); }
  .mobile-menu-toggle.is-open span:last-child { top: 17.5px; transform: rotate(-45deg); }

  /* Full-screen iPhone-like glass overlay. */
  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    color: var(--ink);
    background: color-mix(in srgb, var(--paper) 42%, transparent);
    -webkit-backdrop-filter: blur(34px) saturate(190%) brightness(1.03);
    backdrop-filter: blur(34px) saturate(190%) brightness(1.03);
    transition: opacity .34s ease, visibility .34s step-end;
  }
  .mobile-menu::before,
  .mobile-menu::after,
  .mobile-menu-glass {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .mobile-menu-glass {
    background:
      radial-gradient(100% 58% at 16% 2%, rgba(255,255,255,.52), transparent 62%),
      radial-gradient(90% 62% at 94% 26%, rgba(255,255,255,.25), transparent 68%),
      linear-gradient(155deg, rgba(255,255,255,.20), transparent 38%, rgba(255,255,255,.08) 68%, transparent);
    mix-blend-mode: screen;
    opacity: .82;
  }
  .mobile-menu::before {
    background: linear-gradient(118deg, transparent 0 30%, rgba(255,255,255,.18) 43%, rgba(255,255,255,.04) 55%, transparent 70%);
    opacity: .58;
  }
  .mobile-menu::after {
    background: radial-gradient(75% 45% at 50% 100%, color-mix(in srgb, var(--ink) 8%, transparent), transparent 74%);
  }
  html[data-theme="dark"] .mobile-menu {
    background: rgba(27,27,23,.66);
    -webkit-backdrop-filter: blur(36px) saturate(150%);
    backdrop-filter: blur(36px) saturate(150%);
  }
  html[data-theme="dark"] .mobile-menu-glass {
    background: radial-gradient(100% 65% at 12% -6%, rgba(238,229,155,.07), transparent 65%);
    opacity: .68;
    mix-blend-mode: normal;
  }
  html[data-theme="dark"] .mobile-menu::before { opacity: .08; }
  .mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity .34s ease, visibility 0s;
  }
  .mobile-menu-nav {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    padding: 92px 24px 54px;
  }
  .mobile-menu-nav a {
    font-size: clamp(42px, 12.8vw, 64px);
    line-height: .96;
    font-weight: 700;
    letter-spacing: -.055em;
    opacity: 1;
    transform: translateY(16px);
    transition: transform .5s var(--ease), opacity .35s ease;
  }
  .mobile-menu.is-open .mobile-menu-nav a { transform: translateY(0); }
  .mobile-menu-nav a:nth-child(2) { transition-delay: 35ms; }
  .mobile-menu-nav a:nth-child(3) { transition-delay: 70ms; }
  .mobile-menu-nav a:nth-child(4) { transition-delay: 105ms; }
  .mobile-menu-nav a.is-current { opacity: .52; }

  /* Footer: concise mobile layout, four category tabs, no separator line. */
  .site-footer {
    min-height: 0 !important;
    background-image: none !important;
    background-color: var(--paper) !important;
    overflow: hidden;
  }
  .footer-content {
    width: 100%;
    display: block;
    padding: 46px 16px 22px;
  }
  .footer-brand-column {
    display: grid;
    grid-template-rows: auto auto;
    margin: 0;
  }
  .footer-brand-lockup { min-height: 0; }
  .footer-brand { font-size: 25px; }
  .footer-brand-orbes { height: .78em; }
  .footer-brand-body { margin-top: 20px; }
  .footer-intro { max-width: 390px; font-size: 13px; }
  .footer-mail { margin-top: 18px; }
  .footer-content > .footer-column { display: none !important; }

  .footer-mobile-nav {
    display: block;
    width: 100%;
    padding: 14px 16px 20px;
  }
  .footer-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 0;
    width: 100%;
  }
  .footer-mobile-tabs button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--ink);
    padding: 12px 3px;
    font-size: clamp(9px, 2.7vw, 11px);
    line-height: 1;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    opacity: .66;
    transition: opacity .2s ease, background-color .25s ease;
  }
  .footer-mobile-tabs button.is-active {
    opacity: 1;
    background: color-mix(in srgb, var(--ink) 7%, transparent);
  }
  .footer-mobile-panels { width: 100%; }
  .footer-mobile-panel {
    padding: 18px 4px 6px;
    columns: 2;
    column-gap: 24px;
  }
  .footer-mobile-panel[hidden] { display: none; }
  .footer-mobile-panel a,
  .footer-mobile-panel span {
    display: block;
    break-inside: avoid;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
  }

  .footer-bottom {
    width: auto;
    margin: 0 16px;
    padding: 18px 0 22px;
    border-top: 0 !important;
    gap: 5px;
    font-size: 10.5px;
  }

  /* On mobile the landscape is a short, full-width closing image. */
  .footer-mobile-art {
    display: block;
    width: 100vw;
    height: clamp(150px, 47vw, 220px);
    margin: 0;
    background-color: var(--paper);
    background-image: var(--footer-active-image);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center 69%;
  }
  html[data-theme="dark"] .footer-mobile-art { background-position: center 72%; }
}

@media (max-width: 390px) {
  .brand { font-size: 15.5px; }
  .theme-switch { width: 96px; }
  .theme-choice { font-size: 7.1px; }
  .theme-choice svg { width: 12px; height: 12px; }
  .mobile-menu-toggle { width: 32px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-rotating-word { min-width: 0; }
  .mobile-menu-nav a { transform: none !important; }
}

/* =========================================================
   V11 — Service 08 CTA and tighter footer
   ========================================================= */

/* CTA below service 08. LLUM = pastel yellow; FOSC = white. */
.service-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: clamp(24px, 2.4vw, 38px);
  padding: 14px 24px 13px;
  border: 0;
  border-radius: 999px;
  background: #EEE59B;
  color: #1B1B17 !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  opacity: 1 !important;
  transition: transform .28s var(--ease), background-color .35s var(--ease), color .35s var(--ease);
}
.service-cta:hover,
.service-cta:focus-visible {
  opacity: 1 !important;
  transform: translateY(-2px);
}
.service-cta:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
html[data-theme="dark"] .service-cta {
  background: #FFFFFF;
  color: #1B1B17 !important;
}

/* Bring the footer a little closer to the previous section. */
.about-section {
  padding-bottom: clamp(64px, 7vw, 112px);
}
.footer-content {
  padding-top: clamp(44px, 4.8vw, 76px);
}

/* Long company line in the lower footer remains editorial and readable. */
.footer-company-data {
  max-width: 860px;
  text-align: right;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .service-cta {
    margin-top: 22px;
    padding: 13px 20px 12px;
    font-size: 13px;
  }
  .about-section { padding-bottom: 54px; }
  .footer-content { padding-top: 34px; }
  .footer-company-data {
    max-width: none;
    text-align: left;
    font-size: 10px;
    line-height: 1.35;
  }
}



/* =========================================================
   V12 — compact optical brand symbol
   ========================================================= */
/*
 * The four glowing orbs are a mark, not a second logo block.
 * Keep them on the same baseline as the wordmark and deliberately
 * much smaller than their source bitmap.
 */
.brand-lockup,
.footer-brand-lockup {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
}

.brand-orbes,
.footer-brand-orbes {
  display: block !important;
  flex: 0 0 auto !important;
  width: 88px !important;
  height: 24px !important;
  max-width: 88px !important;
  max-height: 24px !important;
  margin: 0 0 0 10px !important;
  object-fit: fill !important;
  object-position: center !important;
  pointer-events: none;
}

/* Keep a Custom Logo and the orb mark in the same compact row too. */
.brand-lockup .custom-logo-link {
  display: inline-flex !important;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}
.brand-lockup .custom-logo {
  flex: 0 1 auto;
  width: auto;
}

/* Footer wordmark is a touch smaller, so scale the mark with it. */
.footer-brand-orbes {
  width: 78px !important;
  height: 21px !important;
  max-width: 78px !important;
  max-height: 21px !important;
  margin-left: 9px !important;
}

@media (max-width: 1100px) {
  .brand-orbes {
    width: 72px !important;
    height: 20px !important;
    max-width: 72px !important;
    max-height: 20px !important;
    margin-left: 8px !important;
  }
}

@media (max-width: 760px) {
  .brand-lockup { min-width: 0; }
  .brand-orbes {
    width: 46px !important;
    height: 13px !important;
    max-width: 46px !important;
    max-height: 13px !important;
    margin-left: 6px !important;
  }
  .footer-brand-orbes {
    width: 58px !important;
    height: 16px !important;
    max-width: 58px !important;
    max-height: 16px !important;
    margin-left: 7px !important;
  }
}


/* =========================================================
   V14 — footer list rhythm + centred service CTA
   ========================================================= */
@media (min-width: 761px) {
  .footer-column-links {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 11px !important;
    width: 100%;
  }
  .footer-column-links > a,
  .footer-column-links > span {
    display: block !important;
    width: auto;
    margin: 0 !important;
    line-height: 1.25;
    white-space: nowrap;
  }
}

/* Service 08 CTA spans the service grid and sits on the visual centre line. */
.service-item:last-child > .service-cta {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: clamp(28px, 3vw, 44px);
}

@media (max-width: 760px) {
  .service-item:last-child > .service-cta {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 24px;
  }
}


/* =========================================================
   V16 — Mobile alignment for section labels
   All small editorial labels share the same left axis as
   “La llum que transforma municipis.”
   ========================================================= */
@media (max-width: 760px) {
  :root {
    --mobile-editorial-gutter: clamp(24px, 4vw, 32px);
  }

  /* Keep the hero kicker on the reference editorial axis. */
  .hero-copy {
    padding-left: var(--mobile-editorial-gutter) !important;
    padding-right: var(--mobile-editorial-gutter) !important;
  }

  /* Projectes / Serveis / Qui Som: same exact left axis. */
  .projects-section .section-label,
  .services-section > .section-label,
  .about-section .section-label {
    margin-left: calc(var(--mobile-editorial-gutter) - 16px) !important;
  }
}

/* =========================================================
   V17 — responsive polish, integrated footer, legal pages
   ========================================================= */

/* Keep large desktop/iMac layouts editorial instead of scaling endlessly. */
@media (min-width: 1800px) {
  :root {
    --max: 1480px;
    --page-gap: 118px;
  }
  body { font-size: 16px; }
  .brand { font-size: 30px; }
  .primary-nav a,
  .header-contact { font-size: 15px; }
  .hero { padding-top: 112px; }
  .hero h1 { font-size: 78px; max-width: 940px; }
  .hero-kicker { font-size: 15px; }
  .hero-intro { font-size: 16px; max-width: 700px; margin-top: 46px; }
  .section-heading-row h2,
  .about-content > h2 { font-size: 70px; max-width: 900px; }
  .service-item h2 { font-size: 54px; max-width: 1000px; }
  .about-lead { font-size: 29px !important; }
  .about-content p { font-size: 17px; }
  .about-content h3 { font-size: 58px; }
  .project-card { flex-basis: 190px; height: 330px; }
  .project-card:hover,
  .project-card:focus-within { flex-basis: 610px; height: 440px; }
  .footer-brand { font-size: 32px; }
}

/* Footer landscape is one integrated background in both themes. */
.site-footer {
  background-color: var(--paper) !important;
  background-image:
    linear-gradient(180deg,
      var(--paper) 0%,
      color-mix(in srgb, var(--paper) 96%, transparent) 12%,
      color-mix(in srgb, var(--paper) 74%, transparent) 27%,
      transparent 52%),
    var(--footer-active-image) !important;
  background-repeat: no-repeat, no-repeat !important;
  background-size: 100% 100%, 100% auto !important;
  background-position: center top, center -4vw !important;
  border: 0 !important;
}
html[data-theme="dark"] .site-footer {
  background-color: #1B1B17 !important;
  background-image:
    linear-gradient(180deg,
      #1B1B17 0%,
      rgba(27,27,23,.98) 13%,
      rgba(27,27,23,.82) 29%,
      rgba(27,27,23,.24) 52%,
      transparent 67%),
    var(--footer-active-image) !important;
}
.footer-mobile-art { display: none !important; }

/* Legal and standard pages keep the same editorial system. */
.standard-page {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto;
  padding: clamp(110px, 10vw, 170px) 0 clamp(100px, 10vw, 160px);
}
.standard-page-article > h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: .94;
  font-weight: 500;
  letter-spacing: -.055em;
}
.standard-page-kicker {
  margin: 0 0 26px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.standard-page-content {
  max-width: 840px;
  margin-top: clamp(56px, 6vw, 86px);
}
.standard-page-content h2 {
  margin: 64px 0 18px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -.035em;
}
.standard-page-content p,
.standard-page-content li {
  font-size: 16px;
  line-height: 1.55;
}
.standard-page-content p { margin: 0 0 18px; }
.standard-page-content ul { padding-left: 1.2em; margin: 0 0 24px; }
.standard-page-content a { text-decoration: underline; text-underline-offset: 3px; }
.standard-page-content code {
  padding: .12em .36em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: .9em;
}
.legal-updated { color: var(--muted); }
.legal-missing {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #EEE59B;
  color: #1B1B17;
  font-weight: 700;
}

/* Avoid the awkward two-row navigation state: use the burger sooner. */
@media (min-width: 761px) and (max-width: 1080px) {
  html { scroll-padding-top: 72px; }
  body.mobile-menu-open { overflow: hidden; }

  .site-header {
    z-index: 1500 !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-rows: 1fr !important;
    min-height: 68px;
    padding: 10px 20px !important;
    gap: 10px;
    overflow: visible !important;
  }
  .brand { grid-column: 1; grid-row: 1; font-size: 24px; }
  .primary-nav,
  .header-contact { display: none !important; }
  .header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 8px;
  }
  .theme-switch { width: 112px; height: 36px; padding: 2px; }
  .theme-switch-indicator { top: 2px; bottom: 2px; right: 2px; width: calc(50% - 2px); }
  .theme-choice { gap: 3px; padding: 0 4px; font-size: 8px; }
  .theme-choice svg { width: 13px; height: 13px; }

  .mobile-menu-toggle {
    position: relative;
    z-index: 1602;
    display: inline-grid !important;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    position: absolute;
    width: 20px;
    height: 1.5px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .38s var(--ease), top .38s var(--ease), opacity .22s ease;
  }
  .mobile-menu-toggle span:first-child { top: 15px; }
  .mobile-menu-toggle span:last-child { top: 22px; }
  .mobile-menu-toggle.is-open span:first-child { top: 18.5px; transform: rotate(45deg); }
  .mobile-menu-toggle.is-open span:last-child { top: 18.5px; transform: rotate(-45deg); }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: block !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    color: var(--ink);
    background: color-mix(in srgb, var(--paper) 42%, transparent);
    -webkit-backdrop-filter: blur(34px) saturate(190%) brightness(1.03);
    backdrop-filter: blur(34px) saturate(190%) brightness(1.03);
    transition: opacity .34s ease, visibility .34s step-end;
  }
  .mobile-menu::before,
  .mobile-menu::after,
  .mobile-menu-glass {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .mobile-menu-glass {
    background:
      radial-gradient(100% 58% at 16% 2%, rgba(255,255,255,.52), transparent 62%),
      radial-gradient(90% 62% at 94% 26%, rgba(255,255,255,.25), transparent 68%),
      linear-gradient(155deg, rgba(255,255,255,.20), transparent 38%, rgba(255,255,255,.08) 68%, transparent);
    mix-blend-mode: screen;
    opacity: .82;
  }
  .mobile-menu::before {
    background: linear-gradient(118deg, transparent 0 30%, rgba(255,255,255,.18) 43%, rgba(255,255,255,.04) 55%, transparent 70%);
    opacity: .58;
  }
  .mobile-menu::after {
    background: radial-gradient(75% 45% at 50% 100%, color-mix(in srgb, var(--ink) 8%, transparent), transparent 74%);
  }
  html[data-theme="dark"] .mobile-menu {
    background: rgba(27,27,23,.70);
    -webkit-backdrop-filter: blur(36px) saturate(150%);
    backdrop-filter: blur(36px) saturate(150%);
  }
  html[data-theme="dark"] .mobile-menu-glass {
    background: radial-gradient(100% 65% at 12% -6%, rgba(238,229,155,.07), transparent 65%);
    opacity: .68;
    mix-blend-mode: normal;
  }
  html[data-theme="dark"] .mobile-menu::before { opacity: .08; }
  .mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity .34s ease, visibility 0s;
  }
  .mobile-menu-nav {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    padding: 96px 32px 54px;
  }
  .mobile-menu-nav a {
    font-size: clamp(46px, 7vw, 68px);
    line-height: .96;
    font-weight: 400;
    letter-spacing: -.055em;
    opacity: 1;
    transition: font-weight .2s ease, opacity .2s ease;
  }
  .mobile-menu-nav a:hover,
  .mobile-menu-nav a:focus-visible,
  .mobile-menu-nav a.is-current { font-weight: 700; opacity: 1; }
}

@media (max-width: 760px) {
  /* All small left-hand editorial labels use the same axis as the hero kicker. */
  :root { --mobile-editorial-gutter: 24px; }
  .hero-copy {
    padding-left: var(--mobile-editorial-gutter) !important;
    padding-right: var(--mobile-editorial-gutter) !important;
  }
  .projects-section .section-label,
  .services-section > .section-label,
  .about-section .section-label {
    margin-left: calc(var(--mobile-editorial-gutter) - 16px) !important;
  }
  .service-number { margin-left: calc(var(--mobile-editorial-gutter) - 16px); }

  /* Keep the close X above the full-screen glass overlay. */
  .site-header { z-index: 1500 !important; overflow: visible !important; }
  .mobile-menu { z-index: 1400 !important; }
  .mobile-menu-toggle { z-index: 1602 !important; }

  /* Mobile menu type is regular by default; hover/focus/current is bold. */
  .mobile-menu-nav a {
    font-weight: 400 !important;
    opacity: 1;
  }
  .mobile-menu-nav a:hover,
  .mobile-menu-nav a:focus-visible,
  .mobile-menu-nav a.is-current { font-weight: 700 !important; opacity: 1; }

  /* Footer landscape stays proportional and integrated behind the footer. */
  .site-footer {
    min-height: calc(100vw * .6667) !important;
    background-color: var(--paper) !important;
    background-image:
      linear-gradient(180deg,
        var(--paper) 0%,
        color-mix(in srgb, var(--paper) 96%, transparent) 18%,
        color-mix(in srgb, var(--paper) 62%, transparent) 38%,
        transparent 62%),
      var(--footer-active-image) !important;
    background-size: 100% 100%, 100% auto !important;
    background-position: center top, center -2.5vw !important;
    background-repeat: no-repeat, no-repeat !important;
  }
  html[data-theme="dark"] .site-footer {
    background-color: #1B1B17 !important;
    background-image:
      linear-gradient(180deg,
        #1B1B17 0%,
        rgba(27,27,23,.99) 18%,
        rgba(27,27,23,.84) 38%,
        rgba(27,27,23,.30) 62%,
        transparent 76%),
      var(--footer-active-image) !important;
  }
  .footer-mobile-art { display: none !important; }

  .footer-content { padding-bottom: 14px; }
  .footer-mobile-nav { padding-bottom: 14px; }
  .footer-bottom { padding-bottom: 20px; }

  .standard-page {
    width: calc(100% - 48px);
    padding: 96px 0 84px;
  }
  .standard-page-article > h1 { font-size: clamp(44px, 13vw, 64px); }
  .standard-page-content { margin-top: 48px; }
  .standard-page-content h2 { margin-top: 50px; }
  .standard-page-content p,
  .standard-page-content li { font-size: 15px; }
}

/* =========================================================
   V18 — restored services, footer blend/position and mobile spacing
   ========================================================= */

/* Give the LLUM label a little more breathing room inside the compact toggle. */
@media (max-width: 1080px) {
  .theme-choice--light {
    padding-right: 10px !important;
  }
}

/* Keep the footer flush with the end of the document: no trailing strip. */
html,
body,
.site-shell {
  padding-bottom: 0 !important;
}
.site-footer {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Desktop: landscape remains integrated, covers the whole footer and is raised ~8%. */
@media (min-width: 761px) {
  .site-footer {
    background-size: 100% 100%, cover !important;
    background-position: center top, center 42% !important;
    background-repeat: no-repeat, no-repeat !important;
  }
  html[data-theme="dark"] .site-footer {
    background-size: 100% 100%, cover !important;
    background-position: center top, center 42% !important;
  }
}

/* Mobile: keep the footer artwork at its natural aspect ratio, full width and behind the footer. */
@media (max-width: 760px) {
  .site-footer {
    min-height: 0 !important;
    background-size: 100% 100%, 100% auto !important;
    background-position: center top, center bottom !important;
    background-repeat: no-repeat, no-repeat !important;
  }
  html[data-theme="dark"] .site-footer {
    background-size: 100% 100%, 100% auto !important;
    background-position: center top, center bottom !important;
  }
  .footer-bottom {
    margin-bottom: 0 !important;
    padding-bottom: 16px !important;
  }
}
