/* =====================================================================
   Página em atualização — Banda da Academia de Santa Cecília (B.A.S.C.)
   Ficheiro de estilos: em-atualizacao-dividido.css
   Deve ficar na MESMA PASTA que em-atualizacao-dividido.html

   COMO EDITAR
   1. Cores, tipo de letra e velocidade do loading: bloco ":root" aqui em baixo.
   2. Tamanhos e espaçamentos: procure a secção pelo nome (títulos com =====).
   3. Grave o ficheiro e atualize a página no navegador (F5, ou Ctrl+F5).

   ÍNDICE
   - Variáveis (cores, letra, loading)
   - Base
   - Painel azul (conteúdo, título, contactos)
   - Painel dourado (logótipo, pauta, loading)
   - Ajustes por tamanho de ecrã (telemóvel, tablet, monitores)
   - Movimento reduzido
   ===================================================================== */

:root {
  /* ---------- CORES ---------- */
  --navy: #0f1f3d;            /* azul do painel esquerdo e texto do painel dourado */
  --ivory: #f4efe2;           /* cor do texto principal */
  --muted: #a9b6cf;           /* texto secundário (cinzento-azulado) */
  --gold: #e8bd4b;            /* dourado dos detalhes, ícones e "atualização" */
  --gold-deep: #b8871a;       /* dourado escuro (fim do degradê do painel) */
  --line: rgba(244,239,226,.14); /* linhas finas entre os contactos */

  /* ---------- PAINEL DOURADO (degradê) ---------- */
  --gold-panel-1: #f6d575;    /* topo / canto superior esquerdo */
  --gold-panel-2: #dfae3a;    /* meio */
  --gold-panel-3: #b8871a;    /* fundo / canto inferior direito */

  /* ---------- TIPO DE LETRA ---------- */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;

  /* ---------- LOADING ---------- */
  --duracao-loading: 6.4s;    /* tempo de cada volta das notas (menor = mais rápido) */
  --duracao-barra: 1.2s;      /* velocidade da barra de progresso */

  /* ---------- TAMANHO E POSIÇÃO DO LOGÓTIPO ---------- */
  --logo-largura: 620px;      /* altere este valor para mudar o tamanho */
  --logo-descida: 0px;        /* ajuste a posição vertical */

  /* ---------- MARCA DE ÁGUA "BASC" ---------- */
  --marca-agua: rgba(15,31,61,.1); /* cor/transparência das letras BASC */

  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  background: var(--navy);
  color: var(--ivory);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
/* ===== Base ===== */
.split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }

.reveal { opacity: 0; transform: translateY(16px); animation: rise .85s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ===== Painel azul: conteúdo, título e contactos ===== */
.navy {
  background:
    radial-gradient(40rem 30rem at 0% 0%, rgba(47,102,224,.22), transparent 60%),
    var(--navy);
  padding: max(2rem, env(safe-area-inset-top)) max(1.4rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1.4rem, env(safe-area-inset-left));
  display: flex; flex-direction: column; justify-content: center;
}
.tag { font-style: italic; font-weight: 500; font-size: .98rem; color: var(--gold); letter-spacing: .03em; display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.tag::before { content: ""; width: 2.5rem; height: 2px; background: var(--gold); border-radius: 2px; flex: none; }
h1 { font-weight: 800; font-size: clamp(2.4rem, 11vw, 3.8rem); line-height: 1.04; letter-spacing: -.02em; margin-bottom: 1rem; }
h1 em { font-style: italic; font-weight: 700; color: var(--gold); }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 34ch; margin-bottom: 2rem; }

.contacts { display: grid; border-top: 1px solid var(--line); }
.contact {
  display: flex; align-items: center; gap: 1rem; min-width: 0;
  padding: .95rem .2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ivory); text-decoration: none;
  transition: padding .25s, background .25s;
}
.contact:hover { padding-left: .8rem; background: rgba(232,189,75,.07); }
.contact:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.contact .ico {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold); color: var(--gold);
  transition: background .25s, color .25s;
}
.contact:hover .ico { background: var(--gold); color: var(--navy); }
.contact .ico svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact .txt { min-width: 0; flex: 1; }
.contact small { display: block; color: var(--muted); font-size: .86rem; font-style: italic; line-height: 1.2; margin-bottom: .15rem; }
.contact .v { font-weight: 600; font-size: 1.05rem; overflow-wrap: break-word; }
.contact .go { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s, stroke .25s; }
.contact:hover .go { transform: translate(3px, -3px); stroke: var(--gold); }
.foot { margin-top: 1.6rem; font-style: italic; font-size: .98rem; color: var(--muted); letter-spacing: .05em; }

/* ===== Painel dourado: logótipo, pauta e loading ===== */
.gold {
  order: -1;
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--gold-panel-1) 0%, var(--gold-panel-2) 52%, var(--gold-panel-3) 100%);
  color: var(--navy);
  display: grid; grid-template-rows: auto 1fr; justify-items: center; align-items: center;
  padding: 1.6rem 1.2rem 2rem;
}
.brand {
  position: relative;
  z-index: 1;
  display: block;
  width: min(var(--logo-largura), 300%);
  height: auto;
  margin-top: var(--logo-descida);
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(15,31,61,.4));
}
.gold::before { /* brilho suave */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(30rem 22rem at 25% 15%, rgba(255,255,255,.4), transparent 60%);
}
.mark {
  position: absolute; right: -.04em; bottom: -.2em; pointer-events: none; user-select: none;
  font-weight: 900; font-size: clamp(5.5rem, 29vw, 9.5rem); line-height: 1; letter-spacing: -.02em;
  color: var(--marca-agua);
}
.load { position: relative; width: min(100%, 34rem); text-align: center; align-self: center; }
.load .kicker { font-style: italic; font-weight: 600; font-size: .95rem; letter-spacing: .06em; margin-bottom: .6rem; opacity: .85; }
.staff { width: 100%; height: auto; display: block; overflow: visible; }
.staff .line { stroke: rgba(15,31,61,.4); stroke-width: 1.5; }
.staff .bar { stroke: var(--navy); stroke-width: 2.4; }
.note { fill: var(--navy); stroke: var(--navy); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; opacity: 0; animation: travel var(--duracao-loading) linear infinite; animation-delay: calc(var(--n, 0) * var(--duracao-loading) / 8); }
.note .stem { stroke-width: 2; }
.note .nf { fill: none; stroke-width: 2.6; }
.note .hole { stroke-width: 3; }
@keyframes travel {
  0%   { transform: translateX(30px);  opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { transform: translateX(570px); opacity: 0; }
}
.progress { width: min(240px, 70%); height: 4px; border-radius: 4px; background: rgba(15,31,61,.18); margin: .9rem auto .55rem; overflow: hidden; position: relative; }
.progress::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 4px; background: var(--navy);
  animation: sweep var(--duracao-barra) ease-in-out infinite;
}
@keyframes sweep { from { left: -40%; } to { left: 100%; } }
.loading-text { font-style: italic; font-size: .92rem; letter-spacing: .08em; }

/* ===== Ajustes por tamanho de ecrã ===== */
@media (max-width: 380px) {
  .navy { padding-inline: 1rem; }
  .brand { margin-top: 1rem; }
  h1 { font-size: 2.1rem; }
  .lead { font-size: 1rem; margin-bottom: 1.5rem; }
  .contact { gap: .75rem; }
  .contact .ico { width: 38px; height: 38px; }
  .contact .ico svg { width: 18px; height: 18px; }
  .contact .v { font-size: .9rem; }
  .gold { padding: 1.5rem 1rem; }
}
@media (min-width: 600px) and (max-width: 899px) {
  .navy { padding-inline: 3rem; }
  .gold { padding: 2.5rem 3rem; }
  h1 { font-size: 3.6rem; }
  .lead { max-width: 40ch; }
}

/* Monitores (900px+): painéis lado a lado; tudo escala com a largura E a altura do ecrã.
   1280 → 16px · 1920 → 19px · 2560 → 22px · 3840 → 29px */
@media (min-width: 900px) {
  html { font-size: clamp(16px, min(0.5vw + 9.6px, 1.78vh), 32px); }
  .split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .navy { padding: 3rem 4.5rem; }
  .gold { order: 0; padding: 3rem 3.5rem; }
  .brand { margin-top: 2.5rem; }
  h1 { font-size: clamp(2.8rem, 4.7vw, 4.6rem); }
  .mark { font-size: 15rem; }
  .load .kicker { font-size: 1.05rem; margin-bottom: 1rem; }
}
/* Ecrãs com pouca altura (ex.: 1366×768, 1280×720) */
@media (min-width: 900px) and (max-height: 820px) {
  .navy { padding: 1.6rem 3.5rem; }
  .brand { margin-top: 5rem; }
  .tag { margin-bottom: .7rem; }
  h1 { font-size: clamp(2.3rem, 4vw, 3.4rem); margin-bottom: .6rem; }
  .lead { margin-bottom: 1.1rem; font-size: 1.05rem; }
  .contact { padding: .6rem .2rem; }
  .contact .ico { width: 38px; height: 38px; }
  .foot { margin-top: 1rem; }
}

/* Telemóvel deitado */
@media (max-height: 560px) and (orientation: landscape) {
  .split { grid-template-columns: 1.1fr 1fr; }
  .navy { padding: 1rem 1.6rem; } .gold { order: 0; padding: 1rem; }
  .brand { margin-top: .4rem; }
  .tag { font-size: .8rem; margin-bottom: .4rem; }
  h1 { font-size: 1.9rem; margin-bottom: .4rem; }
  .lead { font-size: .9rem; margin-bottom: .7rem; }
  .contact { padding: .4rem .2rem; gap: .7rem; }
  .contact .ico { width: 32px; height: 32px; }
  .contact .ico svg { width: 15px; height: 15px; }
  .foot { margin-top: .6rem; }
  .mark { font-size: 6.5rem; }
}

/* ===== Movimento reduzido (acessibilidade) ===== */
@media (prefers-reduced-motion: reduce) {
  .note, .progress::after { animation: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .note { opacity: 1; transform: translateX(var(--x, 150px)); }
  .progress::after { left: 0; width: 100%; opacity: .5; }
}


