/* =========================================================
   AIS — Site base styles (LiquidGlass + Nav + Mobile)
   Autor: Ulisses + assistente | 2025-10-22
========================================================= */

/* ===== Design tokens ===== */
:root{
  --bg: #111;
  --fg: #eaeaea;
  --fg-soft: #cfcfcf;
  --glass: rgba(255,255,255,0.07);
  --glass-strong: rgba(255,255,255,0.16); 
  --ink: #111;
  --brand-blue: #74C7EC; /* #74C7EC */
  --brand-green:#B6E45F; /* #B6E45F */
  --snake-color: #B6E45F;       /* cor do traço do snake */
  --snake-speed: 3s;            /* velocidade da volta */
  --snake-seg: 5;              /* % de perímetro ocupado pelo traço (0–100) */
  --snake-thickness: 2;       /* espessura do traço em px */
  --snake-offset: 3px;          /* quanto sai para fora do pill */
}

/* ===== Base ===== */
body {
  margin: 0;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #eaeaea;
  font-family: 'Source Code Pro', monospace;
}
*{ box-sizing: border-box; }
img{ max-width:100%; display:block; }

/* ===== Canvas (3D) ===== */
canvas#scene{
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  display:block;
  z-index:0;
}


/* ===== NAV — Glass minimal ===== */
.glass-nav a{
  font-family: 'Source Code Pro', monospace;
  font-size: 14px;
  color: var(--fg);
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 22px;

  /* só outline + blur */
  border: 1px solid rgba(255,255,255,0.14);
  background: transparent;                 /* sem fundo */
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  box-shadow: none;                         /* sem sombras */

  transition: border-color .25s ease, transform .25s ease, color .25s ease;
  user-select: none;
  position: relative;
  overflow: visible;
  isolation: isolate;
}

/* remove a camada de gradiente interna */
.glass-nav a::before{ content: none !important; }

/* hover discreto: só reforça o outline */
.glass-nav a:hover{
  transform: translateY(-2px);
  background: transparent;
  border-color: rgba(255,255,255,0.28);
  box-shadow: none;
}

/* ativo: zero fundo/sombra; outline um pouco mais forte */
.glass-nav a.active{
  color: #fff;
  background: transparent;
  animation: none;
  border: 1px solid rgba(255,255,255,0.22);
  overflow: visible;
  box-shadow: none;
}
.glass-nav a.active::after{ content:none !important; }

/* snake sem glow */
.glass-nav a .snake{
  position: absolute;
  inset: calc(-1 * var(--snake-offset));
  width: calc(100% + 2 * var(--snake-offset));
  height: calc(100% + 2 * var(--snake-offset));
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
}
.glass-nav a .snake rect{
  fill: none;
  stroke: var(--snake-color);
  stroke-width: var(--snake-thickness);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  filter: none; /* sem sombras/glow */
  stroke-dasharray: var(--snake-seg) calc(100 - var(--snake-seg));
  stroke-dashoffset: 0;
  transition: opacity .18s ease;
}
.glass-nav a.active .snake rect{
  opacity: 1;
  animation: snake-loop var(--snake-speed) linear infinite;
}
@keyframes snake-loop{ to{ stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce){
  .glass-nav a.active .snake rect{
    animation: none;
    stroke-dasharray: 100 0;
  }
}

/* Desktop pill wider */
@media (min-width: 980px){
  .glass-nav{
    padding: 12px 18px;
    gap: 14px;
    min-width: 720px;
    border-radius: 18px;
    justify-content: center;
  }
  .glass-nav a{
    font-size: 15px;
    padding: 10px 18px;
  }
}


/* =========================================================
   CARDS — LiquidGlass XXL + layout responsivo
========================================================= */
.cards{
  position: fixed;
  top: 50%; transform: translateY(-50%);
  display: grid; gap: 18px;
  width: min(600px, 48vw);
  z-index: 2;
  pointer-events: auto;
}
.cards-left{  left: 2rem; right:auto; }
.cards-right {
  position: fixed;
  top: 50%;
  right: 17vw; /* controla o afastamento da margem direita */
  transform: translateY(-50%);
  display: grid;
  gap: 18px;
  width: min(600px, 48vw);
  text-align: right;
  z-index: 2;
}
.cards-right .card {
  text-align: right;
  padding: 50px 80px 70px 50px; /* espelha o espaçamento dos da esquerda */
}

/* Grupos (fade-in) */
.cards .group{
  opacity:0; pointer-events:none;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .5s ease;
}
.cards .group.active{ opacity:1; pointer-events:auto; transform: translateY(0); }

.hidden{ display:none !important; }


/* ================================
   CARTÕES — "ver mais" e "ver menos"
   Estilo: Minimalista + AIS Identity (global)
=================================== */

.card{
  --phi: 1.618;
  --card-title-size: clamp(2.8rem, 2rem + 4vw, 5.6rem);
  display: none;
  color: #fff;
  width: min(840px, 94vw);
  padding: 50px 100px 70px;
  border-radius: 40px;
  position: relative;
  aspect-ratio: 16 / 9;
  font-family: 'Source Code Pro', monospace;
  margin-bottom: 40px;
}
.card.show{ display: block; }

/* Títulos (suporta h1/h3 usados no HTML) */
.card h1,
.card h3{
  font-family: 'Montserrat', sans-serif;
  font-weight: 100;
  font-size: var(--card-title-size);
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

/* Texto */
.card p {
  font-size: calc(var(--card-title-size) / var(--phi));
  line-height: 1.45;
  color: #eaeaea; 
  margin: 0;
  letter-spacing: 0.01em;
}

/* Texto da parte de trás (ver menos) — mais pequeno */
.card .face.back p {
  font-size: calc(var(--card-title-size) / (var(--phi) * 1.5)); /* reduz ~35% */
  line-height: 1.6;
  opacity: 0.9;
}

/* Base comum (ancoras e botões existentes) */
.card .vermais,
.card .vermenos {
  position: static;
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.4rem;
  background: none;       /* ← remove o fundo */
  border: none;           /* ← remove a caixa verde */
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;             /* ← remove o espaçamento de botão */
}
/* -------- VER MAIS -------- */
.vermais,
.ver-mais {
  color: #fff; /* branco no estado normal */
  transition: color 0.3s ease, transform 0.3s ease;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}
.vermais::after,
.ver-mais::after {
  content: '+';
  font-size: 1.3rem;
  margin-left: 6px;
  transition: transform 0.3s ease;
}
.vermais:hover,
.ver-mais:hover {
  color: var(--brand-green); /* verde no hover */
}
.vermais:hover::after,
.ver-mais:hover::after {
  transform: rotate(90deg);
}

/* -------- VER MENOS -------- */
.vermenos,
.ver-menos {
  color: #fff; /* branco no estado normal */
  transition: color 0.3s ease, transform 0.3s ease;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}
.vermenos::after,
.ver-menos::after {
  content: '–';
  font-size: 1.6rem;
  margin-left: 6px;
  transition: transform 0.3s ease;
}
.vermenos:hover,
.ver-menos:hover {
  color: #ff6060; /* vermelho no hover */
}
.vermenos:hover::after,
.ver-menos:hover::after {
  transform: scale(1.2);
}

/* Suporte mínimo ao layout front/back existente */
.card .card-inner{ position: relative; }
.card .face{
  position: static;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.card .face.back{ display: none; }
.card.flipped .face.front{ display: none; }
.card.flipped .face.back{ display: block; }

/* Corrige alinhamento e espaçamento dos cartões do lado direito */
.cards-right .card {
  text-align: right;
  padding: 50px 100px 70px 60px; /* menos padding do lado direito */
}

/* Títulos e texto alinhados à direita, sem empurrar o cartão para fora */
.cards-right .card h3,
.cards-right .card p,
.cards-right .card button {
  text-align: right;
  justify-content: flex-end;
}

/* =========================================================
   Ajustes Header — Logo maior + Nav centralizado
========================================================= */
.topbar-container {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 40px;
  background: rgba(17,17,17,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  z-index: 5;
}

.topbar-container .brand-left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.topbar-container .brand-logo {
  width: 80px;   /* aumentei o tamanho */
  height: auto;

}

.topbar-container .glass-nav {
  justify-self: center;  /* centraliza no grid */
  position: static;
  transform: none;
  box-shadow: none;
}

.topbar-container .brand-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.topbar-container .brand-right span {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #B6E45F, #74C7EC, #B6E45F, #74C7EC);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: moveGradient 10s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(182, 228, 95, 0.15));
}

@keyframes moveGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

   .glass-nav a.active{ overflow: visible; }

   /* ============ INTRO — MANIFESTO “Pensar…” (unificado) ============ */
.intro-frase{
  position: fixed;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 12; pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.intro-type{
  font-family: 'Source Code Pro', monospace;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.05;
  font-size: clamp(50px, 12vw, 110px); /* PATCH 2025-10-24: aumentar limite (min 32px, fluido 12vw, max 220px) */
  color: rgba(234,234,234,.86);
  text-align: center;
  display: block;
  max-width: clamp(18ch, 72vw, 28ch); /* não ocupa a largura toda — controla nº de caracteres por linha */
  margin-inline: auto;                 /* centra o bloco */
  padding-inline: 2vw;                 /* respiro lateral em ecrãs pequenos */
  text-wrap: balance;                  /* quebras mais elegantes em multi-linha (browsers modernos) */
}
.intro-type .big,
.intro-type .small{ font: inherit; display:inline; }

/* Cursor tipo “typing” */
.intro-type::after{
  content:"";
  display:inline-block;
  width:.6ch; height:1em; margin-left:.05ch;
  background: currentColor;
  vertical-align:-0.06em;
  animation: caretBlink 1s steps(1,end) infinite;
  opacity: 0; /* só mostra quando .show-caret */
}
.intro-type.show-caret::after{ opacity: 1; }
@keyframes caretBlink{ 50%{ opacity:0; } }

.intro-frase.fade-out{ opacity:0; transform: translateY(-8px); }

