/* eternamente.pt
   Paleta tirada das próprias obras: volumes brancos, basalto e madeira. */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --ink: #26282a;
  --muted: #696c70;
  --line: #dcd9d3;
  --stone: #3a3d40;
  --accent: #8a4a2e;
  --font: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

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

h1, h2, h3 { font-weight: 300; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 2rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

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

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem;
}
.skip:focus { left: 0; }

/* ---------- cabeçalho ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.25rem;
}

.wordmark {
  font-size: 1.7rem; font-weight: 300; letter-spacing: 0.04em;
  text-decoration: none; line-height: 1; margin: 0; white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.35rem; }
.site-nav a {
  display: block; padding: 0.35rem 0; font-size: 0.875rem; text-decoration: none;
  color: var(--muted); border-bottom: 1px solid transparent; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle { display: none; }

@media (max-width: 68rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; margin-right: -0.5rem;
    background: none; border: 0; color: inherit; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 1.5rem; height: 1px; background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -0.45rem; }
  .nav-toggle-bars::after { top: 0.45rem; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(0.45rem) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-0.45rem) rotate(-45deg); }

  .header-inner { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; padding-bottom: 1rem; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { font-size: 1.05rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current] { border-bottom-color: var(--line); color: var(--accent); }
}

/* ---------- página inicial ---------- */

.hero { position: relative; background: var(--stone); overflow: hidden; }
.hero-img { width: 100%; height: min(78vh, 46rem); min-height: 22rem; object-fit: cover; object-position: center 60%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 21, 22, 0.72) 0%, rgba(20, 21, 22, 0.12) 55%, rgba(20, 21, 22, 0.05) 100%);
}
.hero-text { position: absolute; z-index: 1; left: 0; right: 0; bottom: clamp(2rem, 7vh, 4.5rem); color: #fff; }
.hero-wordmark {
  font-size: clamp(3.2rem, 13vw, 9rem); font-weight: 200; letter-spacing: 0.02em;
  line-height: 0.95; margin: 0 0 0.25em -0.04em;
}
.hero-tagline { margin: 0; font-size: clamp(1rem, 2.4vw, 1.5rem); font-weight: 300; letter-spacing: 0.03em; }

.intro { padding-block: clamp(3rem, 8vw, 6rem) clamp(1rem, 3vw, 2rem); }
.lead { font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 300; line-height: 1.45; max-width: 26em; margin: 0 0 1.25rem; text-wrap: pretty; }

.more { font-size: 0.95rem; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 0.15rem; }
.more::after { content: " →"; }

.home-section { padding-block: clamp(2rem, 5vw, 3.5rem); }
.home-section:last-child { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }

/* ---------- cartões de galeria ---------- */

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }
.card { display: block; text-decoration: none; }
.card-media { display: block; aspect-ratio: 280 / 195; overflow: hidden; background: var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-empty {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: var(--stone); color: rgba(255, 255, 255, 0.5); font-size: 4rem; font-weight: 200;
}
.card-title { display: block; margin-top: 0.8rem; font-size: 1.05rem; line-height: 1.35; }

/* ---------- páginas ---------- */

.page { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.narrow { max-width: 46rem; }

.crumb { margin: 0 0 1.25rem; font-size: 0.9rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

.eyebrow { margin: 0 0 0.5rem; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.prose { max-width: 42rem; }
.prose p { margin: 0 0 1.15em; text-wrap: pretty; }
.prose h3 { font-size: 1.35rem; margin: 2.2em 0 0.7em; }
.prose h3:first-child { margin-top: 0; }
.prose a { color: var(--accent); }

.law h3 { font-size: 1.12rem; font-weight: 500; margin: 2.4em 0 0.5em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.law h3:first-child { font-size: 0.8rem; letter-spacing: 0.14em; color: var(--muted); border: 0; padding: 0; margin-bottom: 0; }
.law p { margin-bottom: 0.4em; }
.law em { color: var(--muted); }

.team { display: grid; gap: 1.75rem 2.5rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.team p { margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.team strong { display: block; margin-bottom: 0.3rem; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* ---------- galeria ---------- */

.gallery-page .prose { margin-top: 0.5rem; }
.photos { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.photos a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); cursor: zoom-in; }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.photos a:hover img { transform: scale(1.04); }
.photos-soon { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); max-width: 42rem; color: var(--muted); font-size: 0.95rem; }

.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(18, 19, 20, 0.96); color: #fff;
}
.lightbox::backdrop { background: rgba(18, 19, 20, 0.96); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 6rem); object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font: 200 2.25rem/1 var(--font); width: 3.5rem; height: 3.5rem; opacity: 0.8;
}
.lightbox button:hover { opacity: 1; }
.lightbox .lb-close { top: 0.5rem; right: 0.5rem; }
.lightbox .lb-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; font-size: 0.85rem; opacity: 0.7; }

/* ---------- vídeos ---------- */

.video { margin: 0 0 2.5rem; max-width: 56rem; }
.video-frame { aspect-ratio: 16 / 9; background: var(--stone); }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video figcaption { margin-top: 0.7rem; font-size: 1.05rem; }
.videos { display: grid; gap: 2.5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }
.videos .video { margin: 0; }

/* ---------- contactos ---------- */

.page-banner { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.page-banner img { width: 100%; }
.page-banner + .page { padding-top: clamp(2rem, 5vw, 3.5rem); }

.contact { display: grid; gap: 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.contact-details { font-style: normal; margin-bottom: 1.25rem; }
.contact-details strong { font-weight: 500; }
.contact-links a { color: var(--accent); }

.form p { margin: 0 0 1.1rem; }
.form label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; }
.optional { color: var(--muted); }
.form input, .form textarea {
  width: 100%; padding: 0.7rem 0.8rem; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form textarea { resize: vertical; }
.hp { position: absolute; left: -999rem; }

.button {
  font: inherit; font-size: 0.95rem; letter-spacing: 0.04em; cursor: pointer;
  padding: 0.75rem 2rem; background: var(--ink); color: #fff; border: 1px solid var(--ink);
}
.button:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- rodapé ---------- */

.site-footer { background: var(--ink); color: #c9cbcd; font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; padding-block: 2.5rem; }
.site-footer .wordmark-small { font-size: 1.5rem; color: #fff; }
.footer-tagline { margin: 0.4rem 0 0; }
.site-footer address { font-style: normal; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration-thickness: 2px; }
.copyright { margin: 0; align-self: flex-end; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.team strong + br { display: none; }
