/* =========================================================
   Voz dos Sabores · folha de estilo (v3)
   Referência visual: apresentações «Parceria» e «Embaixadas».
   Mudar as variáveis abaixo muda o site todo.
   ========================================================= */
:root {
  /* Cores das apresentações */
  --creme:        #F7EBD9;  /* fundo principal */
  --creme-claro:  #FCF5EA;  /* cartões, faixa informativa */
  --tinta:        #222222;  /* titulares */
  --texto:        #3F3A36;  /* texto corrido */
  --suave:        #7D746C;  /* notas */
  --linha:        #E6D6C0;  /* divisórias finas */
  --coral:        #E36B49;  /* destaque, horas, linhas curtas */
  --mostarda:     #EAAA2F;
  --petroleo:     #466E66;  /* botões, rodapé */
  --azulado:      #5B928A;

  --f-titulo: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-texto:  'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --col: 760px;             /* largura da coluna de texto */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; overflow-x: clip;
  background: var(--creme);
  color: var(--texto);
  font: 400 1rem/1.75 var(--f-texto);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petroleo); text-underline-offset: 3px; }
a:hover { color: var(--coral); }
h1, h2, h3 { color: var(--tinta); margin: 0; font-family: var(--f-titulo); text-wrap: balance; }
p { margin: 0 0 1rem; }
.hl { color: var(--coral); }
.nowrap { white-space: nowrap; }

.wrap { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Linha curta coral */
.rule { width: 60px; height: 0; margin: 0 0 1.5rem; border: 0; border-top: 3px solid var(--coral); border-radius: 2px; }

/* Secções: o conteúdo fica sempre à frente dos ornamentos */
section.wrap, .hero.wrap { position: relative; isolation: isolate; }
section.wrap { padding-top: 4rem; padding-bottom: 1.5rem; }
section h2 {
  font-size: clamp(1.9rem, 6.2vw, 2.75rem); font-weight: 800;
  line-height: 1.08; letter-spacing: -.015em;
  margin-bottom: 1.25rem;
}

/* =========================================================
   ORNAMENTOS (formas orgânicas das apresentações)
   Cada .deco ocupa a largura do ecrã atrás da secção.
   --s tamanho · --t posição vertical · --max parte visível máxima
   ========================================================= */
.deco {
  position: absolute; z-index: -1; pointer-events: none;
  top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw;
  overflow: hidden;
  --free: calc((100vw - var(--col)) / 2 - 12px);
}
.hero .deco { top: -80px; }            /* sobe por trás da navegação */
.blob {
  position: absolute; top: var(--t, 0); width: var(--s, 22rem);
  aspect-ratio: 1; display: block;
  transform: translate3d(0, calc(var(--py, 0px) * var(--k, 1)), 0);
}
.blob svg {
  width: 100%; height: 100%; display: block; overflow: visible;
  transition: transform .65s cubic-bezier(.2,.7,.2,1), opacity .65s ease;
}
.blob use { fill: currentColor; }
/* parte visível = margem livre ao lado da coluna, entre 40px e --max */
.blob.r { right: calc(clamp(40px, var(--free), var(--max, 240px)) - var(--s, 22rem)); }
.blob.l { left:  calc(clamp(40px, var(--free), var(--max, 240px)) - var(--s, 22rem)); }
.c-coral    { color: var(--coral); }
.c-mostarda { color: var(--mostarda); }
.c-petroleo { color: var(--petroleo); }
.c-azulado  { color: var(--azulado); }

/* Estado de entrada (só com JavaScript ativo) */
.js .deco .blob svg { opacity: 0; transform: translate(var(--dx, 18px), 18px); }
.js .deco .blob.l svg { --dx: -18px; }
.js .in-view > .deco .blob svg { opacity: 1; transform: none; }
.js .in-view > .deco .blob:nth-child(2) svg { transition-delay: .08s; }
.js .in-view > .deco .blob:nth-child(3) svg { transition-delay: .16s; }
.js .was-seen:not(.in-view) > .deco .blob svg { opacity: .35; transform: none; }

/* Onda inferior (fecho) */
.wave { position: absolute; z-index: -1; left: 50%; width: 100vw; margin-left: -50vw; bottom: 0; height: clamp(90px, 14vw, 180px); pointer-events: none; }
.wave svg { width: 100%; height: 100%; display: block; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .7s ease; }
.js .closing:not(.in-view) .wave svg { transform: translateY(24px); opacity: 0; }

/* Telemóvel: menos formas, mais pequenas, só nas margens entre secções */
@media (max-width: 759px) {
  .deco .blob.desk { display: none; }
  section.wrap > .deco { top: -1.5rem; }
  .blob { width: calc(var(--s, 22rem) * .3); top: 0; }
  .blob.r { right: calc(46px - var(--s, 22rem) * .3); }
  .blob.l { left:  calc(16px - var(--s, 22rem) * .3); }
  .hero .blob { top: 110px; }
  .hero .blob.r { right: calc(96px - var(--s, 22rem) * .3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { transform: none !important; }
  .js .deco .blob svg, .js .wave svg, .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* =========================================================
   NAVEGAÇÃO
   ========================================================= */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--creme) 90%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linha);
}
.topnav .wrap {
  max-width: 1100px;
  display: flex; align-items: center; gap: .6rem 1.25rem; flex-wrap: wrap;
  padding-top: .6rem; padding-bottom: .6rem;
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: .95rem; color: var(--tinta); text-decoration: none; }
.brand img { width: 30px; }
.topnav ul {
  order: 3; flex: 1 0 100%;
  display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0 0 .1rem;
  overflow-x: auto; scrollbar-width: none;
}
.topnav ul::-webkit-scrollbar { display: none; }
.topnav ul a { font-size: .82rem; font-weight: 600; color: var(--tinta); text-decoration: none; white-space: nowrap; }
.topnav ul a:hover, .topnav ul a:focus-visible, .topnav ul a[aria-current] { color: var(--coral); }
.lang { margin: 0 0 0 auto; font-size: .8rem; font-weight: 600; color: var(--suave); }
.lang strong { color: var(--coral); }
.lang a { color: var(--tinta); text-decoration: none; }
@media (min-width: 760px) {
  .topnav ul { order: 0; flex: 0 1 auto; margin-left: auto; }
  .lang { margin-left: 0; }
}
section[id], main[id] { scroll-margin-top: 5.5rem; }

/* =========================================================
   1. PRIMEIRA PÁGINA
   ========================================================= */
.hero.wrap { padding-top: 2.5rem; padding-bottom: 1rem; }
.logo { width: min(170px, 42vw); margin: 0 0 1.5rem -4px; }
.label { font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--coral); margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(2.5rem, 9.5vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.025em; margin: 0 0 1.4rem; }
.lead { font-size: 1.1rem; max-width: 36rem; margin-bottom: 1.75rem; }
.infostrip {
  list-style: none; margin: 0 0 1.75rem; padding: 1rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: .35rem 1.4rem;
  background: var(--creme-claro); border-radius: 14px;
  font-size: .9rem; font-weight: 600; line-height: 1.5; color: var(--tinta);
  font-variant-numeric: tabular-nums;
}
.infostrip li { white-space: nowrap; }
.infostrip li::before { content: "•"; color: var(--coral); margin-right: .5rem; }
.infostrip strong { color: var(--coral); }
@media (max-width: 480px) { .infostrip { flex-direction: column; } }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  display: inline-block; background: var(--petroleo); color: #fff;
  font: 700 .92rem/1 var(--f-texto);
  padding: 1rem 1.5rem; border-radius: 999px; text-decoration: none;
  transition: background .2s, color .2s;
}
.btn:hover, .btn:focus-visible { background: var(--coral); color: #fff; }
.btn-ghost { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 2px var(--tinta); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--tinta); color: #fff; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

/* Ilustração larga debaixo da primeira página */
.hero-art { max-width: 1120px; margin: 2.5rem auto 0; padding: 0 20px; }
.hero-art img { width: 100%; border-radius: 22px; }

/* =========================================================
   2–4. FESTIVAL, O QUE VAIS ENCONTRAR, GASTRONOMIA
   ========================================================= */
.motto { font-size: 1.3rem; font-weight: 700; line-height: 1.35; color: var(--coral); margin-top: 1.5rem; max-width: 30ch; }

.features { display: grid; gap: 1.75rem 1.5rem; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.features article { display: flex; flex-direction: column; }
.features img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: center bottom;
  border-radius: 16px; margin-bottom: 1rem; background: var(--creme-claro);
}
.features h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: .4rem; }
.features p { margin: 0; font-size: .96rem; }

.projects { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .projects { grid-template-columns: 1fr 1fr; } }
.projects img { border-radius: 14px; margin-bottom: .75rem; }
.projects h3 { font-size: 1.2rem; font-weight: 800; }
.projects .country { font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--coral); text-transform: uppercase; margin-bottom: .4rem; }

/* Galeria do Instagram: faixa horizontal com deslize */
.gallery { margin-top: 2.5rem; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.gallery-head h3 { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.gallery-nav { display: flex; gap: .5rem; }
.gallery-nav button {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--tinta);
  background: transparent; color: var(--tinta); font: 700 1rem/1 var(--f-texto); cursor: pointer;
}
.gallery-nav button:hover, .gallery-nav button:focus-visible { background: var(--tinta); color: #fff; }
.gallery-nav button:disabled { opacity: .3; cursor: default; background: transparent; color: var(--tinta); }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62%, 220px); gap: .9rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scroll-behavior: smooth;
  list-style: none; margin: 0 -20px; padding: .4rem 20px 1rem;
  scrollbar-width: thin; scrollbar-color: var(--linha) transparent;
}
.strip li { scroll-snap-align: start; }
.strip a { display: block; border-radius: 14px; overflow: hidden; transition: transform .25s; }
.strip a:hover, .strip a:focus-visible { transform: translateY(-4px); }
.strip img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }

/* =========================================================
   5. PROGRAMA
   ========================================================= */
section > p + .timeline { margin-top: 1.5rem; }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linha); }
.timeline li {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; align-items: baseline;
  padding: .9rem 0; border-bottom: 1px solid var(--linha);
}
.timeline .t { font-size: .9rem; font-weight: 700; color: var(--coral); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline .a { font-size: 1rem; font-weight: 600; color: var(--tinta); }
.timeline .ambient .t, .timeline .ambient .a { color: var(--suave); font-weight: 500; }
.timeline .headliner { padding: 1.4rem 0 1.5rem; }
.timeline .headliner .a { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.timeline .headliner small { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--coral); margin-bottom: .5rem; }
@media (max-width: 480px) { .timeline li { grid-template-columns: 1fr; gap: .1rem; } }

.allday { margin-top: 2.25rem; padding: 1.5rem 1.5rem .75rem; background: var(--creme-claro); border-radius: 16px; }
.allday h3 { font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 1rem; }
.allday ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.allday li { display: flex; align-items: center; gap: .8rem; padding: .35rem 0; color: var(--tinta); font-weight: 500; }
.allday svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--coral); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.note { font-size: .88rem; color: var(--suave); }

/* =========================================================
   6. COMO CHEGAR
   ========================================================= */
.facts { display: grid; grid-template-columns: 5.5rem 1fr; gap: .45rem 1rem; margin: 0 0 1.5rem; }
.facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .12em; line-height: 2.1; color: var(--coral); text-transform: uppercase; }
.facts dd { margin: 0; color: var(--tinta); font-weight: 500; }
.map { aspect-ratio: 4 / 3; max-width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--linha); background: var(--creme-claro); }
@media (min-width: 640px) { .map { aspect-ratio: 16 / 9; } }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-btn { margin-top: 1rem; }

/* =========================================================
   7. PARTICIPA
   ========================================================= */
.participa-grid { display: grid; gap: 1.75rem; align-items: start; }
@media (min-width: 700px) { .participa-grid { grid-template-columns: 1.3fr 1fr; } }
.participa-grid img { border-radius: 18px; }
.aside { margin-top: 2rem; padding-left: 1rem; border-left: 3px solid var(--mostarda); font-size: .94rem; }
.aside p:last-child { margin-bottom: 0; }

/* =========================================================
   8. PERGUNTAS FREQUENTES
   ========================================================= */
.faq { border-top: 1px solid var(--linha); }
.faq details { border-bottom: 1px solid var(--linha); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 700; color: var(--tinta); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 700; font-size: 1.2rem; line-height: 1; color: var(--coral); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1.1rem; }

/* =========================================================
   9. FECHO E RODAPÉ
   ========================================================= */
section.closing { padding-top: 4.5rem; padding-bottom: clamp(130px, 18vw, 230px); }
.closing p { font-size: clamp(1.6rem, 5.4vw, 2.4rem); font-weight: 800; line-height: 1.15; letter-spacing: -.015em; color: var(--tinta); max-width: 26ch; margin: 0; }
.footer { background: var(--petroleo); color: #fff; font-size: .82rem; padding: 1.6rem 0; }
.footer p { margin: 0; }
.footer-data { opacity: .9; margin-bottom: .6rem !important; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer a { color: #fff; font-weight: 700; text-decoration: none; }
.footer a:hover, .footer a:focus-visible { text-decoration: underline; color: #fff; }

/* Entrada suave das ilustrações */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in-view { opacity: 1; transform: none; }
