/* ==========================================================================
   CASALPAL, Lda · Folha de estilos principal
   Compra e venda de paletes · Casal do Marco, Seixal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Cores da marca */
  --red: #a5202a;
  --red-deep: #7d141c;
  --red-bright: #c0323d;
  --olive: #6f7a33;
  --olive-bright: #8a943c;
  --green: #2f7d4f;
  --green-deep: #1d5233;

  /* Neutros quentes (madeira) */
  --ink: #17140f;
  --charcoal: #221d16;
  --wood: #b98a52;
  --sand: #f6f2ea;
  --sand-2: #ece4d6;
  --cream: #fffdf8;
  --line: rgba(23, 20, 15, 0.12);
  --line-dark: rgba(255, 255, 255, 0.14);
  --muted: #6b6255;

  /* Tipografia */
  --font-display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Métrica */
  --container: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(23, 20, 15, 0.06), 0 6px 18px -12px rgba(23, 20, 15, 0.4);
  --shadow-md: 0 18px 44px -22px rgba(23, 20, 15, 0.5);
  --shadow-lg: 0 40px 80px -34px rgba(23, 20, 15, 0.55);
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img,
picture,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. Utilitários de layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4.5rem, 10vw, 8.5rem);
  position: relative;
}

.section--tight {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section--dark {
  background: var(--ink);
  color: var(--sand);
}

.section--sand2 {
  background: var(--sand-2);
}

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-block;
  margin-bottom: 1.1rem;
}

.section--dark .eyebrow {
  color: var(--olive-bright);
}

.section__title {
  font-size: clamp(2rem, 1.3rem + 3.4vw, 3.6rem);
  text-transform: uppercase;
}

.section__lead {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 55ch;
}

.section--dark .section__lead {
  color: rgba(246, 242, 234, 0.72);
}

.text-highlight {
  position: relative;
  display: inline-block;
  color: var(--red);
}

.section--dark .text-highlight {
  color: var(--olive-bright);
}

/* Marca de "palete" usada como separador */
.rungs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 30px;
}

.rungs span {
  height: 2px;
  background: currentColor;
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   4. Botões
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease), color 0.25s var(--ease);
  box-shadow: 0 12px 26px -14px rgba(165, 32, 42, 0.85);
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--red-bright);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--sand);
  border-color: var(--ink);
}

.btn--light {
  --btn-bg: var(--sand);
  --btn-fg: var(--ink);
  box-shadow: none;
}

.btn--light:hover {
  background: #fff;
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--sand);
  border: 1.5px solid var(--line-dark);
  box-shadow: none;
}

.btn--outline-light:hover {
  background: var(--sand);
  color: var(--ink);
  border-color: var(--sand);
}

.btn--block {
  width: 100%;
}

/* --------------------------------------------------------------------------
   5. Topbar
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--ink);
  color: rgba(246, 242, 234, 0.78);
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 38px;
  flex-wrap: wrap;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.topbar__item .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4fbf7b;
  box-shadow: 0 0 0 3px rgba(79, 191, 123, 0.18);
}

.topbar__right {
  display: inline-flex;
  align-items: center;
  gap: 1.35rem;
}

.topbar__link {
  transition: color 0.2s var(--ease);
}

.topbar__link:hover {
  color: #fff;
}

.topbar__social {
  display: inline-flex;
}

.topbar__social svg {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   6. Header / navegação
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

.navbar {
  background: rgba(246, 242, 234, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.site-header.is-scrolled .navbar {
  background: rgba(255, 253, 248, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 30px -26px rgba(23, 20, 15, 0.7);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__mark {
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--red);
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(-6deg) scale(1.05);
}

.brand__text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.28rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand__text em {
  font-style: normal;
  color: var(--red);
}

.brand__text small {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 2rem);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1.2vw, 0.6rem);
  list-style: none;
  padding: 0;
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  border-radius: 8px;
  transition: color 0.2s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.35rem;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--red);
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 70;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: clamp(600px, 92svh, 900px);
  display: flex;
  align-items: flex-end;
  color: var(--sand);
  overflow: hidden;
  background: var(--ink);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 18s var(--ease) forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1);
  }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(23, 20, 15, 0.78) 0%,
      rgba(23, 20, 15, 0.32) 34%,
      rgba(23, 20, 15, 0.62) 66%,
      rgba(23, 20, 15, 0.96) 100%
    ),
    linear-gradient(90deg, rgba(23, 20, 15, 0.72) 0%, rgba(23, 20, 15, 0) 62%);
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 4vw, 2.5rem);
}

.hero__kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--olive-bright);
  display: inline-block;
  margin-bottom: 1.4rem;
}

.hero__title {
  font-size: clamp(2.6rem, 1.2rem + 7.4vw, 6.4rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.hero__title .hl {
  color: #e8b23f;
}

.hero__sub {
  margin-top: 1.6rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.28rem);
  color: rgba(246, 242, 234, 0.86);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.hero__stats {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line-dark);
  background: rgba(23, 20, 15, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero__stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero__stat {
  padding: 1.35rem 0.5rem 1.35rem 1.5rem;
  border-left: 1px solid var(--line-dark);
}

.hero__stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.hero__stat dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive-bright);
  margin-bottom: 0.35rem;
}

.hero__stat dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 0.85rem + 0.6vw, 1.2rem);
  line-height: 1.25;
}

.hero__stat a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   8. Marquee
   -------------------------------------------------------------------------- */
.marquee {
  background: var(--red);
  color: #fff;
  overflow: hidden;
  padding-block: 0.85rem;
  border-block: 1px solid rgba(255, 255, 255, 0.14);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
  flex: none;
}

.marquee__item {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  padding-inline: 1.6rem;
  display: inline-flex;
  align-items: center;
  gap: 1.6rem;
  white-space: nowrap;
}

.marquee__item::after {
  content: "◆";
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.6rem;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   9. Serviços
   -------------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service {
  background: var(--cream);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  transition: background 0.35s var(--ease);
}

.service::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

.service:hover {
  background: #fff;
}

.service:hover::before {
  transform: scaleY(1);
}

.service__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.service__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--sand-2);
  color: var(--red);
  flex: none;
}

.service__icon svg {
  width: 24px;
  height: 24px;
}

.service:hover .service__icon {
  background: var(--red);
  color: #fff;
}

.service__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.service h3 {
  font-size: 1.22rem;
  text-transform: none;
  letter-spacing: -0.01em;
}

.service p {
  color: var(--muted);
  font-size: 0.96rem;
  margin-top: -0.2rem;
}

/* Card de chamada à ação */
.service--cta {
  background: var(--ink);
  color: var(--sand);
}

.service--cta:hover {
  background: var(--charcoal);
}

.service--cta::before {
  background: var(--red-bright);
}

.service--cta .service__icon {
  background: var(--red);
  color: #fff;
}

.service--cta:hover .service__icon {
  background: var(--red-bright);
}

.service--cta .service__num {
  color: rgba(246, 242, 234, 0.5);
  font-size: 1.3rem;
}

.service--cta h3 {
  color: var(--sand);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}

.service--cta p {
  color: rgba(246, 242, 234, 0.72);
}

.service--cta .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   10. Quem somos
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about__media {
  position: relative;
}

.about__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about__badge {
  position: absolute;
  right: clamp(-0.5rem, -1vw, 0rem);
  bottom: -1.6rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: var(--shadow-md);
  max-width: 320px;
}

.about__badge img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: none;
  aspect-ratio: auto;
}

.about__badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.about__badge span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.about__body p + p {
  margin-top: 1rem;
}

.about__body p {
  color: var(--muted);
}

.about__sign {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
}

.about__founder dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.about__founder dd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   11. Faixa de reciclagem
   -------------------------------------------------------------------------- */
.recycle {
  background: linear-gradient(120deg, var(--green-deep), var(--green));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.recycle::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: repeating-linear-gradient(
    -45deg,
    #fff 0 2px,
    transparent 2px 14px
  );
  pointer-events: none;
}

.recycle__text {
  position: relative;
  z-index: 1;
  max-width: 58ch;
}

.recycle__text h3 {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.3rem);
  text-transform: uppercase;
}

.recycle__text p {
  margin-top: 0.9rem;
  color: rgba(255, 255, 255, 0.86);
}

.recycle__mark {
  position: relative;
  z-index: 1;
  width: clamp(110px, 16vw, 170px);
  flex: none;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.3));
}

.recycle__mark img {
  width: 100%;
  border-radius: 14px;
}

/* --------------------------------------------------------------------------
   12. Galeria
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.6rem, 1.4vw, 1rem);
}

.gallery__item {
  position: relative;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--charcoal);
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.gallery__item--wide {
  grid-column: span 4;
}

.gallery__item--tall {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 3 / 5;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
}

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(23, 20, 15, 0.88));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.06);
}

.gallery__item:hover::after {
  opacity: 1;
}

.gallery__cap {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.9rem;
  z-index: 2;
  color: #fff;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.gallery__item:hover .gallery__cap,
.gallery__item:focus-visible .gallery__cap {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 10, 8, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__figure {
  max-width: min(1100px, 94vw);
  text-align: center;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease);
}

.lightbox.is-open .lightbox__figure {
  transform: scale(1);
}

.lightbox__figure img {
  max-height: 78vh;
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox__figure figcaption {
  margin-top: 1rem;
  color: rgba(246, 242, 234, 0.8);
  font-size: 0.95rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.lightbox__btn {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.06);
  color: var(--sand);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.06);
}

.lightbox__btn svg {
  width: 22px;
  height: 22px;
}

.lightbox__close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
}

.lightbox__prev {
  left: clamp(0.6rem, 3vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: clamp(0.6rem, 3vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__prev:hover,
.lightbox__next:hover {
  transform: translateY(-50%) scale(1.06);
}

/* --------------------------------------------------------------------------
   13. Eventos
   -------------------------------------------------------------------------- */
.events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
  align-items: start;
}

.event {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--charcoal);
  position: relative;
  aspect-ratio: 3 / 2;
}

.event img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
  opacity: 0.85;
}

.event:hover img {
  transform: scale(1.05);
  opacity: 1;
}

.event--poster {
  aspect-ratio: 6 / 7;
  background: #0f1b2e;
}

.event--poster img {
  object-fit: contain;
  opacity: 1;
}

.event--portrait {
  aspect-ratio: 3 / 4;
}

.events__meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--olive-bright);
}

.events__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.events__meta svg {
  width: 15px;
  height: 15px;
}

/* --------------------------------------------------------------------------
   14. Contactos
   -------------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact__list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  margin-top: 2rem;
}

.contact__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}

.contact__icon svg {
  width: 21px;
  height: 21px;
}

.contact__item dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact__item dd {
  font-weight: 600;
  margin-top: 0.15rem;
  line-height: 1.45;
}

.contact__item dd a:hover {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact__hours {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream);
}

.contact__hours h4 {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.9rem 1.2rem;
  background: var(--sand-2);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.contact__hours dl {
  display: grid;
}

.contact__hours div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.2rem;
  font-size: 0.92rem;
  border-top: 1px solid var(--line);
}

.contact__hours div:first-child {
  border-top: 0;
}

.contact__hours dt {
  color: var(--muted);
}

.contact__hours dd {
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

/* Formulário */
.form {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.6rem);
  box-shadow: var(--shadow-md);
}

.form__title {
  font-size: 1.5rem;
  text-transform: none;
  margin-bottom: 0.4rem;
}

.form__hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.field label .req {
  color: var(--red);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--sand);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(165, 32, 42, 0.14);
  background: #fff;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red);
}

.field__error {
  font-size: 0.78rem;
  color: var(--red);
  font-weight: 600;
  display: none;
}

.field.has-error .field__error {
  display: block;
}

.checkbox {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.checkbox input {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.15rem;
  accent-color: var(--red);
}

.form__status {
  margin-top: 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  display: none;
}

.form__status.is-visible {
  display: block;
}

.form__status.is-success {
  color: var(--green);
}

.form__status.is-error {
  color: var(--red);
}

/* Mapa */
.map {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  line-height: 0;
}

.map iframe {
  width: 100%;
  height: clamp(280px, 42vw, 420px);
  border: 0;
  filter: grayscale(0.25) contrast(1.03);
}

.map__hint {
  margin: 0;
  padding: 0.75rem 1.1rem;
  background: var(--cream);
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  line-height: 1.5;
}

.map__hint a {
  font-weight: 600;
  color: var(--red);
}

.map__hint a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: rgba(246, 242, 234, 0.72);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-dark);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.footer__brand .brand__mark {
  color: var(--red-bright);
}

.footer__brand strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--sand);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.footer__about {
  max-width: 40ch;
  font-size: 0.92rem;
}

.footer h4 {
  color: var(--sand);
  font-size: 0.78rem;
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.footer__links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.footer__links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer__social {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.footer__social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
  display: grid;
  place-items: center;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.footer__social a:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.footer__social svg {
  width: 18px;
  height: 18px;
}

.footer__bottom {
  padding-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: rgba(246, 242, 234, 0.5);
}

.footer__bottom a:hover {
  color: var(--sand);
}

/* --------------------------------------------------------------------------
   16. Elementos flutuantes
   -------------------------------------------------------------------------- */
.floaty {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}

.floaty__btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease),
    visibility 0.25s;
}

.floaty__btn svg {
  width: 24px;
  height: 24px;
}

.floaty__btn:hover {
  transform: translateY(-3px) scale(1.04);
}

.floaty__wa {
  background: #25d366;
  color: #04381c;
}

.floaty__top {
  background: var(--ink);
  color: var(--sand);
  opacity: 0;
  visibility: hidden;
}

.floaty__top.is-visible {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   17. Animações de entrada
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   18. Acessibilidade
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--sand);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  transition: top 0.25s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

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

/* --------------------------------------------------------------------------
   19. Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .about__media {
    order: -1;
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brandcol {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 66px;
  }

  .topbar__right .topbar__link:not(.topbar__social) {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: 0;
    top: 0;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    background: var(--sand);
    padding: calc(var(--header-h) + 3rem) var(--gutter) 3rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .nav__list li {
    border-bottom: 1px solid var(--line);
  }

  .nav__link {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1.1rem 0;
    width: 100%;
  }

  .nav__link::after {
    display: none;
  }

  .nav__cta {
    margin-top: 2rem;
  }

  .nav__cta .btn {
    width: 100%;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery__item,
  .gallery__item--wide,
  .gallery__item--tall {
    grid-column: span 1;
    grid-row: auto;
    aspect-ratio: 4 / 3;
  }

  .hero__stats-inner {
    grid-template-columns: 1fr;
  }

  .hero__stat {
    border-left: 0;
    border-top: 1px solid var(--line-dark);
    padding: 1rem 0;
  }

  .hero__stat:first-child {
    border-top: 0;
  }

  .recycle {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .form__row {
    grid-template-columns: 1fr;
  }

  .footer__top {
    grid-template-columns: 1fr;
  }

  .about__badge {
    position: static;
    margin-top: 1rem;
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   20. Movimento reduzido & impressão
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__media img {
    animation: none;
  }
}

@media print {
  .site-header,
  .floaty,
  .marquee,
  .map {
    display: none;
  }

  body {
    background: #fff;
  }
}
