/* ==========================================================================
   Sobre mim (sobre.php). Sem prévia aprovada: mesmo sistema visual das páginas
   aprovadas (rd-mc, paleta B; hero em 2 colunas como LUTs/Contato, fatos e
   fechamento com a foto da Irlanda como a "Minha história" da Home). Prefixo sb-.
   Regra de movimento: só transform/opacity; fora da tela pausa (data-motion).
   Ajustes 1 (21/10): números dos fatos subindo de 0 (assets/js/pages/sobre.js).
   Ajustes 2 (21/10): foto real escolhida pelo Rai no hero (câmera com microfone na
   estrada da Irlanda, sobre-09). Substitui secundarias-sobre.css.
   ========================================================================== */

/* base das páginas (igual às prévias aprovadas) */
:root { --dim: #8b8a99; }
picture { display: contents; }
.btn .ic { width: 17px; height: 17px; }
main { display: block; overflow-x: hidden; overflow-x: clip; }
@media (min-width: 761px) { .section { padding: 120px 0; } }
.h1, .h2 { text-wrap: balance; }
.lead { text-wrap: pretty; }
.section-head .lead { margin-top: 18px; text-wrap: balance; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }
.nobr { white-space: nowrap; }
:focus-visible { outline-color: var(--accent-text); }
section[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ==========================================================================
   1. HERO · texto + foto real emoldurada (tilt) com 2 cards flutuando
   ========================================================================== */
.sb-hero {
  position: relative; isolation: isolate; overflow: hidden; padding: 156px 0 112px;
  background: radial-gradient(46% 58% at 74% 50%, rgba(var(--glow-rgb), .26), transparent 70%), var(--bg);
}
.sb-hero__glow { left: 58%; top: 12%; width: 640px; height: 620px; opacity: .42; }
.sb-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: -1; pointer-events: none; background: linear-gradient(180deg, transparent, var(--bg)); }
.sb-hero .container { max-width: 1240px; }
.sb-hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 64px; align-items: center; }
.sb-hero__title { font-size: clamp(42px, 4.4vw, 62px); }
.sb-hero__copy .lead { margin: 22px 0 0; max-width: 540px; }
.sb-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* 3 fatos (mesmos da Home) */
.sb-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; max-width: 580px; margin: 44px 0 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.sb-facts > div { padding: 16px 16px 15px; background: rgba(9, 9, 20, .94); }
.sb-facts dt { font-size: 17px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.sb-facts dd { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }

/* número que sobe (sobre.js): a largura do valor final fica reservada (::before invisível na mesma
   célula do grid) e os algarismos são tabulares, então nada ao redor se mexe enquanto conta.
   Com .js o valor só aparece quando o JS da página assume (começa do 0); se o JS não rodar,
   aparece sozinho em 2,5 s. Sem JS nenhum, movimento reduzido ou print: valor final direto. */
.sb-num { display: inline-grid; font-variant-numeric: tabular-nums; text-align: right; }
.sb-num::before { content: attr(data-final); grid-area: 1 / 1; visibility: hidden; }
.sb-num__val { grid-area: 1 / 1; }
.js .sb-num__val { opacity: 0; animation: sb-num-show 0s linear 2.5s forwards; }
.js .sb-num.is-on .sb-num__val, .is-shot .sb-num__val { opacity: 1; animation: none; }
@keyframes sb-num-show { to { opacity: 1; } }

.sb-hero__visual { position: relative; justify-self: center; width: min(470px, 100%); }
.sb-photo {
  position: relative; aspect-ratio: 3 / 4; border-radius: 32px; overflow: hidden; background: #0a0a14;
  border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 110px rgba(var(--glow-rgb), .3);
}
.sb-photo img { width: 100%; height: 100%; object-fit: cover; }
.sb-photo::after { /* foto real de dia (estrada na Irlanda, céu claro): escurece a base e traz um toque índigo da página */
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, transparent 62%, rgba(5, 5, 14, .5) 100%),
              radial-gradient(70% 45% at 0% 100%, rgba(var(--glow-rgb), .3), transparent 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.sb-photo .tilt__glare { z-index: 1; }

.sb-f { display: flex; flex-direction: column; }
/* "Só câmera na mão" no céu, acima do cabelo (que começa a ~18% da altura da foto): o pé do card, mais os 8px que ele
   desce flutuando, fica sempre acima disso em todas as larguras */
.sb-f--cam { flex-direction: row; align-items: center; gap: 10px; right: -42px; top: 20px; --rot: 2deg; }
.sb-f--cam .ic { width: 20px; height: 20px; color: var(--accent-text); }
.sb-f--cam b { font-weight: 600; white-space: nowrap; }
.sb-f--ie { left: -46px; bottom: 64px; --rot: -2deg; }
.sb-f--ie b { display: flex; align-items: center; font-size: 18px; letter-spacing: -.02em; }
.sb-f__soft { display: block; margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, .85); }

/* ==========================================================================
   2. MINHA HISTÓRIA · título fixo à esquerda, texto à direita
   ========================================================================== */
.sb-story { padding-top: 72px; }
.sb-story__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
.sb-story__head { position: sticky; top: 120px; }
.sb-story__head .h2 { font-size: clamp(34px, 3.9vw, 52px); }
.sb-story__head .tone { display: block; text-wrap: balance; }   /* 2ª linha em bloco: quebra equilibrada, sem palavra sozinha */
.sb-story__text .lead { max-width: none; margin: 0 0 22px; font-size: clamp(18px, 1.55vw, 21px); color: #d3d2df; line-height: 1.6; }
.sb-story__text p:not(.lead) { margin: 0 0 18px; font-size: 16.5px; line-height: 1.75; color: var(--muted); }
.sb-story__text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   3. HOJE · 4 cards de vidro (cada um leva pra uma página)
   ========================================================================== */
.sb-today { overflow: hidden; }
.sb-today__glow { left: 50%; top: 30%; width: 900px; height: 520px; margin-left: -450px; opacity: .26; }
.sb-today .section-head .lead { max-width: 720px; }
.sb-cards { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.sb-card { display: flex; flex-direction: column; padding: 28px 26px 26px; color: var(--text); }
.sb-card .card__icon { margin-bottom: 20px; }
.sb-card .card__icon .ic { width: 22px; height: 22px; }
.sb-card h3 { font-size: 20px; letter-spacing: -.03em; line-height: 1.2; }
.sb-card p { margin: 10px 0 22px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.sb-card__go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.sb-card__go .ic { width: 16px; height: 16px; transition: transform .25s ease; }
.sb-card:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .sb-card:hover .sb-card__go .ic { transform: translateX(3px); } }

/* ==========================================================================
   4. FECHAMENTO · foto larga da Irlanda com a frase e os botões
   ========================================================================== */
.sb-final { padding-top: 40px; }
.sb-final__card {
  position: relative; isolation: isolate; aspect-ratio: 2 / 1; border-radius: 36px; overflow: hidden; background: #0a0a14;
  border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .6), 0 0 120px rgba(var(--glow-rgb), .2);
}
.sb-final__photo { position: absolute; inset: 0; z-index: -1; }
.sb-final__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.sb-final__photo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 5, 14, .94) 0%, rgba(5, 5, 14, .76) 34%, rgba(5, 5, 14, .12) 62%, transparent 74%),
    linear-gradient(180deg, transparent 50%, rgba(5, 5, 14, .66)),
    radial-gradient(60% 80% at 0% 100%, rgba(var(--glow-rgb), .38), transparent 70%);
}
.sb-final__over { position: absolute; left: 60px; bottom: 56px; max-width: 590px; }
.sb-final__q { width: 34px; height: 34px; color: var(--accent-text); margin-bottom: 18px; opacity: .9; }
.sb-final__title { font-size: clamp(28px, 3vw, 42px); line-height: 1.12; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.sb-final__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ==========================================================================
   Movimento reduzido
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .sb-card__go .ic { transition: none; }
  .js .sb-num__val { opacity: 1; animation: none; }
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1180px) {
  .sb-hero__grid { gap: 48px; }
  .sb-f--cam { right: -6px; top: -8px; } /* foto menor: o card passa um pouco da borda de cima, longe do cabelo */
  .sb-f--ie { left: -22px; }
  .sb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .sb-final__card { aspect-ratio: 16 / 10; }
  .sb-final__over { left: 40px; right: 40px; bottom: 40px; }
}

/* iPad retrato: hero em uma coluna, centrado (texto primeiro, foto depois) */
@media (max-width: 960px) {
  .sb-hero { padding: 136px 0 96px; }
  .sb-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .sb-hero__copy { text-align: center; }
  .sb-hero__copy .lead { margin-left: auto; margin-right: auto; max-width: 600px; text-wrap: balance; }
  .sb-hero__btns { justify-content: center; }
  .sb-hero__title { font-size: clamp(44px, 7.4vw, 66px); }
  .sb-facts { margin-left: auto; margin-right: auto; text-align: left; }
  .sb-hero__visual { width: 440px; max-width: 100%; }
  .sb-story__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 680px; margin: 0 auto; }
  .sb-story__head { position: static; }
}

@media (max-width: 760px) {
  .h2 { font-size: 32px; }

  /* hero */
  .sb-hero { padding: 108px 0 72px; }
  .sb-hero__glow { left: -20%; top: 50%; width: 140%; height: 440px; }
  .sb-hero__grid { gap: 48px; }
  .sb-hero__copy { text-align: left; }
  .sb-hero__copy .lead { margin: 18px 0 0; font-size: 17px; text-wrap: pretty; }
  .sb-hero__title { font-size: 40px; letter-spacing: -.05em; line-height: 1.02; }
  .sb-hero__btns { flex-wrap: nowrap; gap: 10px; margin-top: 26px; justify-content: flex-start; }
  .sb-hero__btns .btn { flex: 1 1 0; min-width: 0; height: 54px; padding: 0 12px; font-size: 15px; }
  .sb-facts { margin-top: 32px; }
  .sb-hero__visual { width: min(86vw, 380px); }
  .sb-photo { border-radius: 26px; }
  .sb-hero .float { font-size: 13px; padding: 10px 13px; border-radius: 14px; }
  .sb-f--cam { right: -10px; top: 10px; }
  .sb-f--cam .ic { width: 17px; height: 17px; }
  .sb-f--ie { left: -10px; bottom: 34px; }
  .sb-f--ie b { font-size: 15px; }
  .sb-f__soft { font-size: 12px; }

  /* história */
  .sb-story { padding-top: 64px; }
  .sb-story__text .lead { font-size: 17.5px; }
  .sb-story__text p:not(.lead) { font-size: 16px; }

  /* hoje */
  .sb-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sb-card { padding: 22px 20px 20px; display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; }
  .sb-card .card__icon { grid-row: 1 / 4; margin: 0; }
  .sb-card h3 { font-size: 18px; align-self: center; }
  .sb-card p { margin: 6px 0 12px; font-size: 14.5px; }
  .sb-card__go { min-height: 24px; }

  /* fechamento: foto em cima, texto embaixo dentro do card */
  .sb-final { padding-top: 16px; }
  .sb-final__card { aspect-ratio: auto; border-radius: 26px; display: flex; flex-direction: column; }
  .sb-final__photo { position: relative; inset: auto; z-index: 0; aspect-ratio: 1 / .82; }
  .sb-final__photo img { object-position: 74% 30%; }
  .sb-final__photo::after { background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 14, .6) 72%, #0a0a14 100%), radial-gradient(70% 50% at 0% 100%, rgba(var(--glow-rgb), .35), transparent 70%); }
  .sb-final__over { position: relative; left: auto; right: auto; bottom: auto; z-index: 1; margin-top: -64px; padding: 0 20px 26px; }
  .sb-final__q { width: 28px; height: 28px; margin-bottom: 12px; }
  .sb-final__title { font-size: 25px; }
  .sb-final__btns { flex-direction: column; gap: 10px; margin-top: 24px; }
  .sb-final__btns .btn { width: 100%; }
}
@media (max-width: 520px) {
  .sb-facts { grid-template-columns: minmax(0, 1fr); }
  .sb-facts > div { display: flex; align-items: baseline; gap: 14px; padding: 13px 16px; }
  .sb-facts dt { flex: 0 0 42%; font-size: 16px; }
  .sb-facts dd { margin: 0; }
}
@media (max-width: 370px) {
  .sb-hero__title { font-size: 36px; }
  .sb-hero__btns .btn { font-size: 14px; }
}
