:root {
  --bg: #f6f1e8;
  --bgAlt: #efe7da;
  --surface: #ffffff;
  --primary: #c65a3a;
  --primaryHover: #a9472e;
  --secondary: #8a5a3b;
  --text: #1f1a16;
  --muted: #6b5e55;
  --border: #e6d9cc;
  --accent: #7a8f7a;
  --dark: #2c2622;
  --ivory: #f6f1e8;

  --sidebarW: min(28vw, 440px);
  --headerH: 64px;

  --radius: 20px;
  --shadow: 0 10px 30px rgba(31, 26, 22, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --fontHead:
    "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --fontBody:
    "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
}

/* ===== BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fontBody);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--ivory);
  font-family: var(--fontHead);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}

.layout {
  min-height: 100vh;
}

/* ===== SIDEBAR (desktop) ===== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: var(--sidebarW);
  padding: 32px 26px;

  background: var(--primary);
  color: var(--text);

  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.brand {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--text);
  text-decoration: none;
  transition:
    opacity 0.3s var(--ease),
    transform 0.4s var(--ease);
}

.brand-audio {
  font-family: var(--fontHead);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 25px;
  line-height: 1;
}

.brand-flat-slot {
  height: min(420px, 58vh);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: min(58vh, 380px);
  max-width: none;
  height: auto;
  transform: rotate(90deg);
}

/* Menu button: always visible, morphs to X */
.menu-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-top: 6px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s ease;
}
.menu-btn:hover {
  background: rgba(31, 26, 22, 0.08);
}
.menu-btn:focus-visible {
  outline-color: var(--text);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 34px;
  height: 2px;
  background: currentColor;
  transition:
    transform 0.35s var(--ease),
    opacity 0.2s ease;
}
.menu-icon {
  position: relative;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-icon::before {
  top: -8px;
}
.menu-icon::after {
  top: 8px;
}

.menu-btn:hover .menu-icon {
  transform: rotate(90deg);
}

.sidebar.menu-open .menu-icon {
  background: transparent;
  transform: none;
}
.sidebar.menu-open .menu-icon::before {
  transform: translateY(8px) rotate(45deg);
}
.sidebar.menu-open .menu-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* Nav replaces brand when open */
.nav {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 36px;
}
.sidebar.menu-open .brand {
  display: none;
}
.sidebar.menu-open .nav {
  display: flex;
  animation: navIn 0.45s var(--ease) both;
}

@keyframes navIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.nav-link {
  display: inline-block;
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 30px);
  padding: 6px 0;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px
    no-repeat;
  transition: background-size 0.35s var(--ease);
}
.nav-link:hover,
.nav-link.is-active {
  background-size: 100% 2px;
}

.lang-switch {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(31, 26, 22, 0.1);
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 12px;
}
.lang-switch > span {
  display: none;
}
.lang-btn {
  min-width: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  letter-spacing: 0.08em;
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn {
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
}
.lang-btn[aria-pressed="true"],
.lang-btn[aria-current="true"] {
  background: var(--text);
  color: var(--ivory);
}

/* ===== CONTENT ===== */
.content {
  margin-left: var(--sidebarW);
}

.section {
  padding: clamp(64px, 10vh, 120px) 0;
}
.container {
  width: min(980px, calc(100% - 56px));
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.section-index {
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  letter-spacing: 0.08em;
}
.section-title {
  margin: 0;
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: clamp(14px, 1.2vw, 16px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.section-lead {
  margin: -8px 0 36px;
  max-width: 56ch;
  color: var(--muted);
  font-size: 18px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--dark);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(31, 26, 22, 0.7) 0%, rgba(31, 26, 22, 0) 55%),
    linear-gradient(90deg, rgba(31, 26, 22, 0.45), rgba(31, 26, 22, 0.05));
}

.hero-inner {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 56px 56px 96px;
  color: #fff;
}

.nowrap {
  white-space: nowrap;
}
.hero-kicker {
  margin: 0;
  font-family: var(--fontHead);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}
.hero-title {
  font-family: var(--fontHead);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.05;
  font-size: clamp(34px, 5vw, 76px);
  margin: 0;
}
.hero-subtitle {
  font-size: clamp(17px, 1.4vw, 20px);
  max-width: 48ch;
  margin: 0;
  opacity: 0.92;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hero > * {
  animation: heroIn 1s var(--ease) both;
}
.hero-inner > * {
  animation: heroIn 0.9s var(--ease) both;
}
.hero-inner > :nth-child(2) {
  animation-delay: 0.1s;
}
.hero-inner > :nth-child(3) {
  animation-delay: 0.2s;
}
.hero-inner > :nth-child(4) {
  animation-delay: 0.3s;
}
@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.hero-video,
.hero-overlay {
  animation: none;
}

.hero-scroll {
  position: absolute;
  right: 56px;
  bottom: 40px;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
}
.hero-scroll span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  text-decoration: none;
  width: fit-content;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primaryHover);
}
.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}
.btn-light {
  background: var(--ivory);
  color: var(--text);
}
.btn-light:hover {
  background: #fff;
}

/* ===== CHI SIAMO ===== */
.letter-kicker {
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.1;
  margin: 0 0 20px;
}
.lead {
  margin: 0 0 18px;
  max-width: 64ch;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}
.lead strong {
  color: var(--text);
  font-weight: 600;
}

.pillars {
  list-style: none;
  margin: 48px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pillar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 24px 20px;
  border-left: 1px solid var(--border);
}
.pillar:first-child {
  border-left: 0;
  padding-left: 0;
}
.pillar-num {
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: 44px;
  line-height: 1;
  color: var(--primary);
}
.pillar-title {
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 18px;
}
.pillar-label {
  color: var(--muted);
  font-size: 15px;
}

.tagline {
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: clamp(19px, 1.6vw, 22px);
  line-height: 1.35;
  color: var(--secondary);
  margin: 0;
  max-width: 40ch;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 56px;
  align-items: center;
}
.about-media {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bgAlt);
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.signature {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 0;
}
.signature::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--primary);
}
.signature-name {
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: 18px;
}
.signature-role {
  color: var(--muted);
  font-size: 15px;
}

/* ===== PROJECTS ===== */
.section-projects {
  background: var(--bgAlt);
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.project--feature {
  grid-column: 1 / -1;
}

.project {
  position: relative;
  min-height: clamp(420px, 62vh, 520px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark);
  isolation: isolate;
}

.project-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 1.2s var(--ease);
}
.project:hover .project-media {
  transform: scale(1.03);
}

.project-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(31, 26, 22, 0) 0%,
    rgba(31, 26, 22, 0.35) 50%,
    rgba(31, 26, 22, 0.88) 100%
  );
  transition: opacity 0.4s ease;
}
.project::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(31, 26, 22, 0.55);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.project.is-open::after {
  opacity: 1;
}

/* summary and detail share one grid cell → no layout jump */
.project-content {
  width: 100%;
  padding: clamp(20px, 3vw, 36px);
  color: #fff;
  display: grid;
}
.project-summary,
.project-detail {
  grid-area: 1 / 1;
  align-self: end;
  transition:
    opacity 0.35s ease,
    transform 0.45s var(--ease),
    visibility 0.35s;
}

.project-tag {
  margin: 0 0 8px;
  font-family: var(--fontHead);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.project-title {
  margin: 0 0 6px;
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
}
.project-text {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.85);
}

.project-detail {
  max-width: 62ch;
  padding: 22px;
  border-radius: 16px;
  background: rgba(31, 26, 22, 0.45);
  border: 1px solid rgba(246, 241, 232, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);

  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}
.project.is-open .project-summary {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
}
.project.is-open .project-detail {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.project-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.project-detail-actions .btn {
  margin: 0;
}

.project-detail-title {
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: 20px;
  margin: 0 0 10px;
}
.project-detail-text {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
}

/* ===== BRANDS MARQUEE ===== */
.section-brands .section-lead {
  margin-bottom: 40px;
}

.marquee {
  position: relative;
  overflow: hidden;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee var(--marqueeDur, 45s) linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.brands {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
}
.brands li {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 120px;
  padding: 0 44px;
}
.brands img {
  max-width: 170px;
  max-height: 40px;
  width: auto;
  height: auto;
  filter: brightness(0);
  opacity: 0.45;
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease);
}
.brands img.is-wide {
  max-width: 230px;
  max-height: 18px;
}
.brands img.is-tall {
  max-height: 60px;
}
.brands img.is-thin {
  max-height: 24px;
}
.brand-word {
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.45;
  transition: opacity 0.3s ease;
}
.brands li:hover .brand-word {
  opacity: 1;
}
.brands li:hover img {
  opacity: 1;
  transform: scale(1.06);
}

/* ===== METHOD ===== */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.step {
  position: relative;
  padding: 28px 0 0;
  border-top: 2px solid var(--border);
}
.step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.6s var(--ease);
}
.step:hover::before {
  width: 100%;
}
.step-num {
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--primary);
}
.step-title {
  margin: 10px 0 8px;
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: 20px;
}
.step-text {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.js .steps .step:nth-child(2) {
  transition-delay: 0.08s;
}
.js .steps .step:nth-child(3) {
  transition-delay: 0.16s;
}
.js .steps .step:nth-child(4) {
  transition-delay: 0.24s;
}

/* ===== CONTACT ===== */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.contact-title {
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.05;
  margin: 0 0 14px;
}
.contact-lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  max-width: 44ch;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 14px;
}
.contact-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: baseline;
}
.contact-label {
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
}
.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease;
}
.contact-list a:hover {
  border-color: var(--primary);
}

.contact-social {
  display: flex;
  gap: 12px;
}
.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.contact-social svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-social svg .fill {
  fill: currentColor;
  stroke: none;
}
.contact-social a:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* Form panel */
.contact-form {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 34px 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form .field span {
  display: block;
  font-size: 13px;
  color: rgba(246, 241, 232, 0.72);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 2px solid rgba(246, 241, 232, 0.35);
  border-radius: 0;
  padding: 10px 0;
  color: var(--ivory);
  font-size: 17px;
  font-family: var(--fontBody);
  outline: none;
  transition: border-color 0.2s ease;
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-bottom-color: var(--ivory);
}
.contact-form .is-invalid {
  border-bottom-color: #e8846a !important;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: rgba(246, 241, 232, 0.72);
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}
.consent a {
  color: var(--ivory);
}
.consent.is-invalid {
  color: #e8846a;
}

.contact-submit {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form-status {
  margin: 0;
  min-height: 1.4em;
  font-size: 15px;
  color: var(--ivory);
}
.form-status.is-error {
  color: #e8846a;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text);
  color: rgba(246, 241, 232, 0.7);
  padding: 40px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-audio {
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 13px;
  color: var(--ivory);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.footer-brand img {
  height: 30px;
  width: auto;
  filter: invert(1) sepia(0.15);
}
.footer-legal {
  margin: 0;
}
.footer-legal a {
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-legal a:hover {
  color: var(--primary);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--primary);
}

/* ===== REVEAL ON SCROLL ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.9s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ===== TABLET / MOBILE ===== */
@media (max-width: 900px) {
  .sidebar {
    inset: 0 0 auto 0;
    width: 100%;
    height: var(--headerH);
    padding: 0 8px 0 16px;
    flex-direction: row;
    justify-content: space-between;
    overflow: visible;
    transition: height 0s;
  }

  .brand {
    flex: none;
    flex-direction: row;
    gap: 6px;
  }
  .brand-audio {
    font-size: 11px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
  .brand-flat-slot {
    height: auto;
    width: auto;
  }
  .brand-logo {
    width: auto;
    height: 34px;
    transform: none;
  }

  .lang-switch {
    order: 1;
    position: static;
    transform: none;
    margin-left: auto;
    margin-right: 4px;
  }
  .menu-btn {
    order: 2;
    margin: 0;
    width: 52px;
    height: 52px;
  }
  .menu-btn:hover .menu-icon {
    transform: none;
  }

  /* mobile: brand stays visible, menu becomes a full-screen panel */
  .sidebar.menu-open .brand {
    display: flex;
  }
  .nav {
    position: fixed;
    inset: var(--headerH) 0 0 0;
    padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
    background: var(--primary);
    justify-content: space-between;
    align-items: flex-start;
    overflow-y: auto;
  }
  .nav-list {
    gap: 4px;
  }
  .nav-link {
    font-size: clamp(30px, 9vw, 44px);
    font-weight: 900;
  }

  .content {
    margin-left: 0;
  }
  .section {
    scroll-margin-top: var(--headerH);
  }

  .hero-inner {
    padding: calc(var(--headerH) + 28px) 20px 72px;
  }
  .hero-scroll {
    right: 20px;
    bottom: 24px;
  }

  .container {
    width: calc(100% - 40px);
  }

  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pillar,
  .pillar:first-child {
    padding: 20px 0;
    border-left: 0;
  }
  .pillar:nth-child(even) {
    padding-left: 20px;
    border-left: 1px solid var(--border);
  }
  .pillar:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .contact-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-media {
    aspect-ratio: 16 / 10;
  }
  .projects {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 20px;
  }
  .brands li {
    min-width: 120px;
    height: 100px;
    padding: 0 28px;
  }
  .brands img {
    max-width: 130px;
    max-height: 32px;
  }
  .brands img.is-tall {
    max-height: 48px;
  }
  .contact-form {
    padding: 26px 20px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ===== WHATSAPP ===== */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-family: var(--fontHead);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 28px rgba(31, 26, 22, 0.28);

  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition:
    opacity 0.35s ease,
    transform 0.45s var(--ease),
    visibility 0.35s,
    background 0.2s ease;
}
.wa-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.wa-float:hover {
  background: var(--primaryHover);
}
.wa-float svg {
  flex: none;
  width: 26px;
  height: 26px;
}
/* label slides out on hover (desktop); icon-only by default */
.wa-label {
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  white-space: nowrap;
  transition:
    max-width 0.45s var(--ease),
    margin-left 0.45s var(--ease);
}
.wa-float:hover .wa-label,
.wa-float:focus-visible .wa-label {
  max-width: 220px;
  margin-left: 10px;
}
.menu-locked .wa-float {
  opacity: 0;
  visibility: hidden;
}
@media (max-width: 900px) {
  .wa-float {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 56px;
    padding: 0;
    justify-content: center;
  }
  .wa-float:hover .wa-label,
  .wa-float:focus-visible .wa-label {
    max-width: 0;
    margin-left: 0;
  }
}

/* lock page scroll while mobile menu is open */
html.menu-locked,
html.menu-locked body {
  overflow: hidden;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee-track {
    width: auto;
    animation: none;
  }
  .brands {
    flex-wrap: wrap;
    justify-content: center;
  }
  .brands[aria-hidden="true"] {
    display: none;
  }
}

/* =====================================================
   WORDPRESS
   ===================================================== */

/* Admin bar (logged-in users only) must not cover the fixed sidebar */
.admin-bar .sidebar {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .sidebar {
    top: 46px;
  }
  .admin-bar .nav {
    top: calc(var(--headerH) + 46px);
  }
}
@media (max-width: 600px) {
  /* the admin bar scrolls away on phones: keep the header at the top */
  .admin-bar .sidebar {
    top: 0;
  }
  .admin-bar .nav {
    top: var(--headerH);
  }
}

/* Plain pages: Privacy policy, Cookie policy… */
.page-section {
  min-height: 70vh;
}
.page-container {
  max-width: 760px;
}
.page-title {
  margin: 0 0 32px;
  font-family: var(--fontHead);
  font-weight: 900;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.1;
}
.entry {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.entry h2,
.entry h3,
.entry h4 {
  margin: 1.8em 0 0.6em;
  font-family: var(--fontHead);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
.entry h2 {
  font-size: 24px;
}
.entry h3 {
  font-size: 19px;
}
.entry a {
  color: var(--primaryHover);
  text-underline-offset: 3px;
}
.entry ul,
.entry ol {
  padding-left: 1.3em;
}
.entry table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.entry th,
.entry td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.entry img {
  height: auto;
}
@media (max-width: 900px) {
  .page-section {
    padding-top: calc(var(--headerH) + 40px);
  }
}
