/* ==========================================================================
   MAIA WEB WORKS: letra Inter + scroll em "folhas"
   Carregado DEPOIS do style.css nas páginas principais (PT e EN).

   - Letra: Inter (corte display nos títulos), semibold e apertada. O Mono fica.
   - Scroll: o vídeo do topo fica fixo e cada secção sobe por cima da anterior
     como uma folha de cantos arredondados, a crescer até ocupar o ecrã.
     As classes "folhas" (no <html>) e "folha" (em cada secção) são postas pelo folhas.js.
   ========================================================================== */
:root {
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --folha-r: 40px;
}
body { font-optical-sizing: auto; }

/* ---------- letra ---------- */
h1, h2, h3, h4 { font-weight: 600; }
.hero__title { font-weight: 600; letter-spacing: -.048em; }
.h2 { font-weight: 600; letter-spacing: -.045em; }
.faq__item summary, .ruler strong, .about__badge strong { font-weight: 600; }

/* ---------- folhas ---------- */
html.folhas { scroll-behavior: auto; }
html.folhas .hero { position: sticky; top: 0; z-index: 0; }
html.folhas .hero__bar { bottom: var(--folha-r); }
html.folhas .hero__inner { will-change: transform, opacity; }

.folha {
  position: relative; z-index: 1;
  margin-top: calc(var(--folha-r) * -1);
  border-radius: var(--folha-r) var(--folha-r) 0 0;
  box-shadow: 0 -30px 70px -34px rgba(7, 14, 38, .5);
  transform-origin: 50% 0;
}
/* secções sem fundo próprio ficam com o fundo do site (senão via-se o vídeo por trás) */
:where(.folha) { background-color: var(--bg); }
/* espaço extra em baixo, para a folha seguinte não tapar o conteúdo */
.folha.section { padding-bottom: calc(var(--section) + var(--folha-r)); }
.folha.trust { border-bottom: 0; padding: 10px 0 var(--folha-r); }
.folha.footer { box-shadow: 0 -30px 70px -34px rgba(0, 0, 0, .6); }
/* a primeira folha (sobre o vídeo) leva um brilho azul por trás */
.folha.trust { box-shadow: 0 -30px 90px -30px rgba(44, 79, 214, .65); }


/* ==========================================================================
   ESTILO "LINHA LATERAL": sem caixas nem sombras.
   Os textos ficam soltos com uma linha cinzenta à esquerda e os botões
   passam a texto com a seta num círculo.
   ========================================================================== */
:root {
  --linha: rgba(12, 20, 48, .14);        /* linha cinzenta (tom das divisórias do site) */
  --linha-forte: rgba(12, 20, 48, .36);  /* ao passar o rato / item aberto */
  --linha-escura: rgba(255, 255, 255, .16);
  --seta-branca: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12m-5-5 5 5-5 5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --seta-escura: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10h12m-5-5 5 5-5 5' fill='none' stroke='%230C1430' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- botões: texto + seta num círculo ---------- */
.btn {
  --fg-btn: var(--ink); --btn-c: var(--blue); --btn-seta: var(--seta-branca);
  background: none !important; border: 0 !important; box-shadow: none !important;
  min-height: 40px; padding: 0; border-radius: 0; gap: 12px;
  font-weight: 600; letter-spacing: -.01em; transform: none !important;
}
.btn > svg { display: none; }
.btn::after {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--btn-seta) center / 16px no-repeat, var(--btn-c);
  transition: transform .3s var(--ease);
}
.btn:hover { --fg-btn: var(--btn-c); }
.btn:hover::after { transform: translateX(4px); }
.btn--sm { min-height: 32px; font-size: .9rem; gap: 10px; }
.btn--sm::after { width: 28px; height: 28px; background-size: 14px, auto; }
.btn--wa { --btn-c: var(--wa); }
.btn--block { width: 100%; justify-content: space-between; }
/* em fundos escuros (menu sobre o vídeo, secções azuis) o texto fica branco */
html .nav--over:not(.is-scrolled):not(.is-solid) .nav__cta,
.quote-sec .btn, .founder-sec .btn { --fg-btn: #fff; }
.quote-sec .form .btn { --fg-btn: var(--ink); }
html .nav--over:not(.is-scrolled):not(.is-solid) .nav__cta { --btn-c: #fff; --btn-seta: var(--seta-escura); }
.quote-sec .btn:hover { --fg-btn: var(--sky); }
.quote-sec .form .btn:hover { --fg-btn: var(--btn-c); }

/* ---------- O problema: frases com linha lateral ---------- */
#problema { padding-top: calc(var(--section) * .7); padding-bottom: calc(var(--section) * .7); }
#problema.folha { padding-bottom: calc(var(--section) * .7 + var(--folha-r)); }
.pains { gap: 1.8rem; }
.pains__title { font-size: clamp(2rem, 3.6vw, 3.1rem); max-width: 11em; }
.pains__list { border: 0; display: grid; gap: 22px 36px; }
@media (min-width: 640px) { .pains__list { grid-template-columns: 1fr 1fr; } }
.pains__list li {
  border: 0; border-left: 2px solid var(--linha); border-radius: 0; background: none;
  padding: 2px 0 2px 18px;
  font-family: var(--sans); font-size: 1.02rem; line-height: 1.55; letter-spacing: -.005em; color: var(--ink);
  transition: border-color .3s var(--ease);
}
.pains__list li:hover { border-left-color: var(--linha-forte); }
.pains__list li::before { display: none; }
.pains__answer { margin: 0; max-width: 26rem; font-family: var(--sans); font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.6; letter-spacing: 0; color: var(--muted); }
@media (min-width: 980px) {
  .pains { grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); column-gap: 4rem; align-items: start; }
  .pains__title { position: static; grid-column: 1; grid-row: 1; }
  .pains__answer { grid-column: 1; grid-row: 2; }
  .pains__list { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* ---------- FAQ: perguntas com linha lateral ---------- */
#faq { padding-top: calc(var(--section) * .7); padding-bottom: calc(var(--section) * .7); }
#faq.folha { padding-bottom: calc(var(--section) * .7 + var(--folha-r)); }
.faq { gap: 1.8rem; }
.faq__intro .h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.faq__intro .lead { margin-top: .8rem; font-size: 1rem; }
.faq__intro .btn { margin-top: .4rem; }
.faq__list { border: 0; display: grid; gap: 6px; }
.faq__item { border: 0; border-left: 2px solid var(--linha); border-radius: 0; background: none; transition: border-color .3s var(--ease); }
.faq__item:hover, .faq__item[open] { border-left-color: var(--linha-forte); }
.faq__item summary { padding: 10px 0 10px 18px; gap: 1rem; font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.faq__icon { width: 24px; height: 24px; border: 0; background: none; box-shadow: none; }
.faq__icon::before, .faq__icon::after { width: 11px; background: var(--muted); }
.faq__item[open] .faq__icon { background: none; }
.faq__item[open] .faq__icon::before, .faq__item[open] .faq__icon::after { background: var(--ink); }
.faq__body { padding: 0 2.5rem 14px 18px; font-size: .95rem; color: var(--muted); }
@media (min-width: 980px) { .faq { grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); gap: 4rem; } }

/* ---------- Serviços: painel com linha lateral em vez de caixa ---------- */
.svc__panel { background: none; border-radius: 0; border-left: 2px solid var(--linha); padding: .4rem 0 .4rem clamp(1.2rem, 3vw, 2.2rem); }
.svc__icon { width: auto; height: auto; border-radius: 0; background: none; color: var(--blue); justify-items: start; margin-bottom: 1rem; }
.svc__icon svg { width: 30px; height: 30px; }

/* ---------- Contactos diretos (secção azul): linha lateral ---------- */
.direct { gap: 1.1rem; }
.direct a { background: none; border: 0; border-left: 2px solid var(--linha-escura); border-radius: 0; padding: .3rem 0 .3rem 1.1rem; }
.direct a:hover { background: none; border-left-color: rgba(175, 194, 255, .7); }
.direct__ico { width: auto; height: auto; border-radius: 0; background: none; }

/* ---------- Etiqueta da foto: com o nome completo pode precisar de duas linhas ---------- */
.about__badge { white-space: normal; width: max-content; max-width: 100%; }

/* ---------- Formulário: plano, sem sombra ---------- */
.form { box-shadow: none; }

@media (max-width: 719px) {
  :root { --folha-r: 26px; }
  .pains__title, .faq__intro .h2 { font-size: 1.85rem; }
  .pains__list li { font-size: .97rem; }

  /* portefólio no telemóvel: mostra tudo o que aparece no computador, em formato compacto */
  #portefolio .section-head .lead { display: block; font-size: .95rem; margin-top: .2rem; }
  .work__num { display: flex; font-size: .72rem; margin-bottom: .4rem; }
  .work__desc { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: .92rem; line-height: 1.55; }
  .work .tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 1rem; }
  .work .tag { font-size: .74rem; padding: .28rem .6rem; }
  .work__domain { display: inline; font-size: .74rem; }
  .work__links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html.folhas .hero__inner { will-change: auto; }
}
