/* Site público: escuro, fotografia em primeiro plano */
:root {
  --bg: #000;
  --surface: #0e0e0e;
  --text: #fff;
  --muted: #a3a3a3;
  --line: rgba(255,255,255,.14);
  --placeholder: #161616;
  --heart: #ff4d6a;
  --danger: #ff6b5e;
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --sans: 'Open Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --row-h: 280px;
  --gut: 48px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0 0 .4em; font-weight: 900; }
.wrap { max-width: 1500px; margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.caps { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }

/* Cabeçalho */
.site-header { position: sticky; top: 0; z-index: 20; background: #000; }
.site-header.over { position: absolute; left: 0; right: 0; background: linear-gradient(rgba(0,0,0,.45), transparent); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 84px; padding: 0 var(--gut); gap: 20px; }
.logo { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 36px; font-weight: 600; font-size: .95rem; text-transform: uppercase; letter-spacing: .02em; }
.nav a { text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.on { border-bottom-color: #fff; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

/* Botões e formulários */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid #fff; background: #fff; color: #000; padding: 12px 34px; font: 700 .8rem var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; text-decoration: none; min-height: 46px; transition: background .2s, color .2s; }
.btn:hover { background: transparent; color: #fff; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn.ghost:hover { background: #fff; color: #000; border-color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { flex: none; }
input, textarea { font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 2px solid var(--line); padding: 12px 2px; width: 100%; border-radius: 0; }
input:focus, textarea:focus { outline: none; border-bottom-color: #fff; }
label.lbl { display: block; font-size: .75rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.error { color: var(--danger); font-size: .9rem; min-height: 1.4em; }

/* Página inicial: fotografia em ecrã inteiro */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #111 center/cover no-repeat; padding: 120px 20px 90px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.25), rgba(0,0,0,.6)); }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(2.6rem, 10.5vw, 10rem); letter-spacing: -.03em; text-transform: uppercase; margin: 0; line-height: .95; text-shadow: 0 4px 40px rgba(0,0,0,.3); overflow-wrap: anywhere; }
.hero .tag { margin: 28px 0 4px; font-size: clamp(.8rem, 1.4vw, 1.05rem); }
.hero .line { font-style: italic; font-weight: 600; margin: 0 0 36px; font-size: clamp(.9rem, 1.3vw, 1.05rem); }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 34px; font-size: .72rem; letter-spacing: .4em; text-transform: uppercase; font-weight: 700; padding: 0 16px; }
.fade-in { animation: fade 1.2s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Grelha de eventos: de ponta a ponta, título por cima */
.events-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px var(--gut) 26px; flex-wrap: wrap; }
.events-head h1 { font-size: clamp(1.8rem, 4vw, 3rem); text-transform: uppercase; letter-spacing: -.02em; margin: 0; }
.search { display: flex; align-items: center; gap: 10px; min-width: min(380px, 100%); border-bottom: 2px solid var(--line); }
.search:focus-within { border-bottom-color: #fff; }
.search input { border: 0; padding: 10px 0; }
.events { display: grid; grid-template-columns: repeat(5, 1fr); }
.event { position: relative; aspect-ratio: 4/5; overflow: hidden; display: block; text-decoration: none; background: var(--placeholder); }
.event img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease, opacity .4s; opacity: 0; }
.event img.loaded { opacity: 1; }
.event::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.42); transition: background .4s; }
.event:hover::after { background: rgba(0,0,0,.12); }
.event:hover img { transform: scale(1.05); }
.event .t { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.event .t b { font-size: .9rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.event .t span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 8px; opacity: 0; transform: translateY(6px); transition: .3s; }
.event:hover .t span { opacity: .9; transform: none; }
.event .ev-lock { position: absolute; z-index: 1; top: 14px; right: 14px; opacity: .85; }
.empty { padding: 80px 20px; text-align: center; color: var(--muted); }
@media (max-width: 1500px) { .events { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .events { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .events { grid-template-columns: repeat(2, 1fr); } .event .t b { font-size: .72rem; letter-spacing: .1em; } .event .t span { opacity: .85; transform: none; } }

/* Sobre e contacto */
.page { padding: 60px 0 100px; }
.about { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.about-img { aspect-ratio: 4/5; background: var(--placeholder) center/cover; }
.about h1 { font-size: clamp(2.4rem, 6vw, 5rem); text-transform: uppercase; letter-spacing: -.03em; }
.about-text { font-size: 1.1rem; white-space: pre-line; color: #e5e5e5; }
.contacts { list-style: none; padding: 0; margin: 40px 0 0; }
.contacts li { padding: 18px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.contacts span { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contacts a { text-decoration: none; font-weight: 600; }
.contacts a:hover { text-decoration: underline; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 32px; } }

footer.site-foot { padding: 40px var(--gut); font-size: .72rem; letter-spacing: .4em; text-transform: uppercase; font-weight: 700; text-align: center; color: var(--muted); }

/* Galeria */
.g-hero { position: relative; height: 72vh; min-height: 360px; background: #111 center/cover no-repeat; display: flex; align-items: flex-end; justify-content: center; text-align: center; }
.g-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.1) 30%, rgba(0,0,0,.75)); }
.g-hero > div { position: relative; padding: 0 20px 60px; }
.g-title { font-size: clamp(2rem, 6vw, 5rem); text-transform: uppercase; letter-spacing: -.03em; margin: 0 0 14px; overflow-wrap: anywhere; }
.g-meta { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 700; }
.g-head { padding: 56px 20px 10px; text-align: center; }
.g-desc { max-width: 680px; margin: 24px auto 0; white-space: pre-line; color: #d4d4d4; text-align: center; padding: 0 20px; }
.toolbar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; padding: 30px 20px 40px; }
.grid-wrap { padding: 0 8px 80px; }
.grid { display: flex; flex-wrap: wrap; gap: 8px; }
.grid::after { content: ''; flex-grow: 999999; }
.tile { position: relative; display: block; overflow: hidden; background: var(--placeholder); cursor: zoom-in; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .5s, transform .6s; }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.02); }
.tile .fav { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.tile:hover .fav, .tile .fav.on { opacity: 1; }
.tile .fav.on { color: var(--heart); background: #fff; }
@media (hover: none) { .tile .fav { opacity: 1; } }
.lock { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 100px 20px; background: #000 center/cover; position: relative; }
.lock::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); }
.lock > div { position: relative; width: 420px; max-width: 100%; }
.lock form { display: flex; flex-direction: column; gap: 18px; margin-top: 34px; text-align: left; }
.progress { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #fff; color: #000; padding: 14px 22px; font-size: .85rem; font-weight: 600; z-index: 60; box-shadow: 0 6px 30px rgba(0,0,0,.5); max-width: calc(100% - 32px); }

/* Visualizador */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.97); z-index: 50; display: flex; align-items: center; justify-content: center; user-select: none; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); object-fit: contain; }
.lb-btn { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; padding: 14px; font-size: 1.8rem; line-height: 1; opacity: .7; text-decoration: none; }
.lb-btn:hover { opacity: 1; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; color: #fff; font-size: .75rem; letter-spacing: .2em; font-weight: 700; }
.lb-top .lb-btn { position: static; font-size: 1.3rem; }
.lb-actions { display: flex; align-items: center; gap: 4px; }
.lb-fav.on { color: var(--heart); opacity: 1; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-cap { color: #ddd; font-size: .9rem; text-align: center; max-width: 80ch; padding: 0 16px; }
.lb-cap:empty { display: none; }

@media (max-width: 760px) {
  :root { --row-h: 140px; --gut: 18px; }
  .site-header .bar { height: 64px; }
  .logo { font-size: 1.25rem; }
  .menu-toggle { display: block; }
  .nav { position: fixed; inset: 64px 0 auto 0; background: #000; flex-direction: column; gap: 0; padding: 10px 18px 24px; display: none; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a.on { border-bottom-color: var(--line); color: #fff; text-decoration: underline; }
  .hero-foot { letter-spacing: .2em; font-size: .62rem; }
  .grid-wrap { padding: 0 3px 60px; }
  .grid { gap: 3px; }
  .lightbox img { max-width: 100vw; max-height: calc(100vh - 130px); }
  .lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
  .btn { padding: 12px 22px; }
}
.g-head { padding-top: 140px; }
@media (max-width: 760px) { .g-head { padding-top: 100px; } }
