
@font-face{
  font-family: 'Slenco-Black demo';
  src: url('fonts/Slenco-Black demo.otf') format('opentype');
}

:root {
  --bg-1:#9ecae1;
  --bg-2:#c8dbef;
  --text:#0f172a;
  --white:#ffffff;
  --primary:#4A90E2;
  --primary-700:#2563eb;
  --accent:#61718a;
  --radius:16px;
  --shadow:0 10px 30px rgba(2,8,23,.15);
  --ring:0 0 0 4px rgba(74,144,226,.25);
}

*{ box-sizing:border-box; }

html, body {
  margin:0; padding:0;
  font-family:'Slenco-Black demo', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  letter-spacing:.5px;
  color:var(--white);
  scroll-behavior:smooth;
}

body {
  background: #a7c9ea;
  -webkit-font-smoothing:antialiased;
}

header{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 16px;
  color:var(--white);
  background:rgba(200,219,239,.75);
  backdrop-filter:saturate(120%) blur(8px);
  box-shadow:0 2px 14px rgba(15,23,42,.15);
  min-height:56px;
}

.logo-container{ display:flex; align-items:center; margin-left:clamp(16px,4vw,100px); }
.logo{ width:clamp(72px,10vw,100px); transition: transform .25s ease; }
.logo:hover, .logo:focus{ transform: translateY(-2px) scale(1.06); outline:none; }

nav{
  display:flex; align-items:center; justify-content:center; flex-grow:1;
  margin-top:6px; flex-wrap: wrap; gap:8px;
  padding-inline: 8px;
}
nav a{
  padding:10px 16px;
  font-size: clamp(14px, 2.2vw, 20px);
  font-weight:700;
  color:#00264d;
  text-decoration:none;
  background: rgba(255,255,255,.7);
  border-radius:999px;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
nav a:hover, nav a:focus{
  background:#deebf7;
  transform: translateY(-1px);
  outline:none;
  box-shadow: var(--shadow);
}
nav a.active-link{
  background: #deebf7;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.social-icons{ display:flex; align-items:center; margin:0 clamp(12px,4vw,65px) 0 auto; gap:8px; }
.social-icon{ display:inline-flex; padding:6px; border-radius:12px; transition: transform .2s ease, background .2s ease; }
.social-icon img{ max-width:50px; height:auto; }
.social-icon:hover, .social-icon:focus{ transform: translateY(-2px); background: rgba(255,255,255,.25); outline:none; }

section{
  height:100vh;
  display:flex; flex-direction:column; justify-content:center; align-items:stretch;
  text-align:start; position:relative;
  background-size:cover; background-position:center;
  margin-top:60px;
  overflow:hidden;
}

.slide{
  position:relative; width:100%; height:100vh; overflow:hidden;
  opacity:0; transition: opacity .5s ease;
}
.slide.active{ opacity:1; }

.overlay h1, .overlay button, #desc{ margin-left:90px; }
section h1{
  font-size: 6.5em; /* ligeiramente menor aqui por causa do vídeo */
  text-shadow: 1px 1px 2px rgba(0,0,0,.3);
  margin-bottom:0;
}
section p{
  font-size: 2em;
  text-shadow: 1px 1px 2px rgba(0,0,0,.2);
  margin-bottom:30px;
}

.toggle-button{ position: relative; z-index: 2; }

.overlay.is-playing h1,
.overlay.is-playing #desc{
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}

section h1, section p{
  opacity: 0;
  will-change: transform, opacity;
}
section h1{
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: .05s;
}
section p{
  transform: translateX(-24px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: .12s;
}
section.in-view h1, section.in-view p{
  opacity:1; transform: translate(0,0);
}

.bg-video{
  position:absolute; top:50%; left:50%;
  transform: translate(-50%,-50%);
  width:60%;
  height:auto;
  object-fit:cover;
  z-index:0;
  opacity:.5;
  transition: opacity .5s ease, width .5s ease, height .5s ease;
}

button, .toggle-button{
  appearance:none; border:0; cursor:pointer;
  padding:10px 20px; font-size:16px; font-weight:800;
  border-radius:12px; color:#fff;
  background: linear-gradient(180deg, var(--accent) 0%, #7e8ea8 100%);
  box-shadow: 0 6px 16px rgba(2,8,23,.18);
  transition: transform .06s ease, filter .2s ease, box-shadow .2s ease;
}
button:hover, button:focus{
  transform: translateY(-1px);
  filter: brightness(1.03);
  outline:none;
}

/* Tokens para coerência (seguem o header) */
:root{
  --glass-bg: rgba(200,219,239,.75);    /* igual ao header */
  --glass-bg-strong: rgba(200,219,239,.9);
  --ink: #00264d;                       /* links/ícones escuros, coerente com nav */
  --frost-blur: 8px;                    /* igual ao header */
  --frost-saturate: 120%;
  --border-glow: 0 -4px 18px rgba(15,23,42,.18);
}

/* ===== Footer ===== */
.footer{
  pointer-events: none;   /* não bloqueia cliques quando invisível */
  z-index: 1000;
  min-height: var(--footer-h);
  position: fixed; left: 0; right: 0; bottom: 0;
  /* Vidro/blur igual ao header */
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(var(--frost-saturate)) blur(var(--frost-blur));
  backdrop-filter: saturate(var(--frost-saturate)) blur(var(--frost-blur));
  /* contorno discreto para separar do conteúdo */
  border-top: 1px solid rgba(255,255,255,.35);
  box-shadow: var(--border-glow);

  color: #0f172a; /* texto principal um pouco mais escuro para contraste */
  text-align: center; padding: 8px 12px;
  font-size: clamp(14px, 2.2vw, 18px);

  /* Animação de entrada (se já houver JS a controlar visibilidade) */
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease, background .25s ease, backdrop-filter .25s ease;
}
.footer.is-ready{ will-change: opacity, transform; }
.footer.is-visible{ opacity: 1;  pointer-events: auto; transform: translateY(0); }

/* Navegação dentro do footer — sem alterar estrutura */
.footer .footer-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  opacity: .95;
}
.footer .footer-nav a{
  padding: 0; margin: 0 .2rem;
  font-size: clamp(12px, 1.6vw, 14px);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border-radius: 0; box-shadow: none; transform: none;
  transition: color .2s ease, text-shadow .2s ease;
}
.footer .footer-nav a:hover,
.footer .footer-nav a:focus{
  color: #0b3a73;
  text-shadow: 0 0 1px rgba(255,255,255,.45);
  outline: none;
}

/* Ícones sociais — coerentes com o header */
.footer .footer-social{ display:flex; align-items:center; justify-content:center; gap: 10px; }
.footer .footer-social img{
  width: 28px; height: 28px; display:block; object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(2,8,23,.15));
  transition: transform .2s ease, filter .2s ease;
}
.footer .footer-social a:hover img,
.footer .footer-social a:focus img{
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 3px 8px rgba(2,8,23,.25));
}
@media (min-width: 768px){
  .footer .footer-social img{ width: 44px; height: 44px; }
}

/* Disclaimer e layout do conteúdo do footer (preserva estrutura) */
.footer .footer-content{
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.footer .footer-disclaimer{
  font-size: clamp(11px, 1.4vw, 13px);
  margin: 0;
  opacity: .95;
}

/* Estado "forte" opcional (ex.: quando o conteúdo por baixo for muito contrastado) */
.footer.is-strong{
  background: var(--glass-bg-strong);
}

/* Base overlay spacing and stacking to keep Play button visible */
.overlay{
  position: relative;
  z-index: 2;
  padding: clamp(12px, 2.5vw, 28px);
  display: grid;
  gap: clamp(8px, 1.8vw, 18px);
}

/* Make video fill safely on smaller screens */
@media (max-width: 1200px){
  .bg-video{
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .45;
  }
}

/* Phones — portrait */
@media (max-width: 768px){
  header{ min-height: 52px; padding: 6px 10px; }
  .logo{ width: clamp(60px, 20vw, 84px); }
  nav a{ padding: 8px 12px; }
  section{ margin-top: 52px; }
  .overlay{ padding: 16px; }
  .overlay h1, .overlay button, #desc{ margin-left: 0; }
  section h1{ 
    font-size: clamp(28px, 9vw, 40px);
    line-height: 1.05;
    word-break: break-word;
  }
  section p{ 
    font-size: clamp(14px, 4.5vw, 18px);
    line-height: 1.35;
  }
  /* subtle glass behind text for contrast */
  .overlay{
    background: rgba(200,219,239,.72);
    -webkit-backdrop-filter: saturate(120%) blur(6px);
    backdrop-filter: saturate(120%) blur(6px);
    border-radius: 16px;
  }
  .toggle-button{ justify-self: start; }
}

/* Small phones */
@media (max-width: 400px){
  section h1{ font-size: clamp(22px, 10vw, 32px); }
  section p{ font-size: clamp(13px, 4.8vw, 16px); }
}

/* Landscape on phones — limited height */
@media (max-height: 480px) and (orientation: landscape){
  header{ min-height: 44px; padding: 4px 8px; }
  section{ margin-top: 44px; }
  .overlay{
    grid-template-columns: 1fr auto;
    align-items: end;
    background: rgba(200,219,239,.78);
  }
  section h1{ font-size: clamp(20px, 6vw, 28px); margin: 0; }
  section p{ font-size: clamp(12px, 2.8vw, 16px); margin: 0; }
  .toggle-button{
    position: sticky;
    bottom: 8px; /* keeps the button within view */
    z-index: 4;
  }
}

/* Prevent header/footer from covering overlay content */
.slide{ padding-inline: clamp(8px, 3vw, 32px); }
.footer{ font-size: clamp(12px, 1.8vw, 16px); }



/* === Fancy Play button === */
.toggle-button{
  --btn-bg: rgba(21, 28, 45, .45);
  --btn-bg-hover: rgba(21, 28, 45, .6);
  --btn-fg: #fff;
  --btn-ring: rgba(255,255,255,.35);
  --btn-radius: 14px;

  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: .65rem;
  padding: clamp(10px, 1.6vw, 14px) clamp(16px, 2.4vw, 22px);
  color: var(--btn-fg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0)) padding-box,
    radial-gradient(120% 140% at 50% -20%, rgba(255,255,255,.35), rgba(255,255,255,0)) padding-box,
    linear-gradient(120deg, rgba(255,255,255,.25), rgba(255,255,255,0) 40%) border-box,
    var(--btn-bg);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--btn-radius);
  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 8px 24px rgba(0,0,0,.25);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  font-weight: 800;
  letter-spacing: .3px;
  width: min(560px, 92vw);
  justify-self: center;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
  z-index: 5;
}

.toggle-button:hover{
  background-color: var(--btn-bg-hover);
  border-color: rgba(255,255,255,.38);
  box-shadow:
    0 2px 0 rgba(255,255,255,.35) inset,
    0 10px 30px rgba(0,0,0,.28);
  transform: translateY(-1px);
}

.toggle-button:active{
  transform: translateY(0);
  box-shadow:
    0 0 0 rgba(255,255,255,0) inset,
    0 6px 18px rgba(0,0,0,.25);
}

.toggle-button:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 3px var(--btn-ring),
    0 12px 32px rgba(0,0,0,.28);
}

/* Play icon */
.toggle-button::before{
  content: "";
  width: clamp(18px, 2.6vw, 22px);
  height: clamp(18px, 2.6vw, 22px);
  mask: url("data:image/svg+xml;utf8,<svg width='24' height='24' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M8 5v14l11-7z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg width='24' height='24' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M8 5v14l11-7z'/></svg>") center/contain no-repeat;
  background: currentColor;
  display: inline-block;
  opacity: .9;
}

/* When in pause state (button text changes via JS), switch icon */
.toggle-button.is-playing::before{
  mask: url("data:image/svg+xml;utf8,<svg width='24' height='24' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M6 5h4v14H6zm8 0h4v14h-4z'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg width='24' height='24' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'><path d='M6 5h4v14H6zm8 0h4v14h-4z'/></svg>") center/contain no-repeat;
}

/* Smaller look on short/landscape screens */
@media (max-height: 480px) and (orientation: landscape){
  .toggle-button{
    width: min(440px, 86vw);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
  }
}

/* Ensure it never hides behind anything */
.toggle-button{ z-index: 10; }


/* === Realinhamento e comportamento do botão Play === */

/* Garante que título, parágrafo e botão partilham o mesmo alinhamento left */
.slide .overlay{
  display: grid;
  gap: clamp(8px, 1.6vw, 16px);
  max-width: min(1080px, 92vw);
  padding-left: clamp(24px, 6vw, 90px); /* alinha com a margem visual do texto */
}

/* Todo conteúdo da overlay alinha à esquerda */
.slide .overlay > *{
  justify-self: start;
  text-align: left;
}

/* Botão menos largo e alinhado ao texto */
.toggle-button{
  width: fit-content;
  min-width: 220px;
  margin-top: clamp(8px, 1.2vw, 12px);
  transition: transform .15s ease, background-color .2s ease, 
              box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}

/* Ao tocar (playing) reduz a opacidade a 50% conforme pedido */
.toggle-button.is-playing{
  opacity: .5;
}

/* Em hover enquanto playing, aumenta ligeiramente para feedback visual */
.toggle-button.is-playing:hover{ opacity: .65; }

/* Mobile: mantém alinhado à esquerda e sem ocupar 100% */
@media (max-width: 768px){
  .slide .overlay{ padding-left: clamp(16px, 5vw, 32px); }
  .toggle-button{ width: fit-content; min-width: 200px; }
}


/* === Mobile: remover o blur da overlay quando o vídeo está a tocar === */
@media (max-width: 768px){
  .overlay.is-playing{
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }
  /* mantém apenas o botão visível acima do vídeo */
  .overlay.is-playing .toggle-button{ z-index: 10; }
}
