/* ============================================================
   Roster Mate — folha de estilos
   Tema: moderno, claro, tipografia grande, glass e gradientes
   suaves. Aviação: azuis profundos e acento de instrumentação.
   ============================================================ */

:root {
    /* Paleta */
    --azul-profundo: #0b2545;
    --azul-escuro:   #13315c;
    --azul:          #134074;
    --azul-medio:    #3a6ea5;
    --ceu:           #8da9c4;
    --ceu-claro:     #eef4fa;
    --instrumento:   #1b98e0;
    --instrumento-escuro: #0f7fc2;
    --ambar:         #e0a458;
    --verde:         #2a9d8f;
    --vermelho:      #c1443c;

    --texto:         #0e1b2c;
    --texto-suave:   #51617a;
    --fundo:         #fbfcfe;
    --fundo-alt:     #f2f6fb;
    --borda:         rgba(11, 37, 69, 0.10);

    --largura-max:   1120px;
    --largura-estreita: 760px;

    --raio-s:  12px;
    --raio:    20px;
    --raio-pill: 980px;

    --sombra:        0 1px 2px rgba(11, 37, 69, 0.05), 0 8px 24px rgba(11, 37, 69, 0.06);
    --sombra-hover:  0 2px 4px rgba(11, 37, 69, 0.06), 0 16px 40px rgba(11, 37, 69, 0.12);
    --sombra-forte:  0 24px 60px rgba(11, 37, 69, 0.22);

    --fonte: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
             Roboto, Helvetica, Arial, sans-serif;

    --transicao: 0.25s cubic-bezier(0.25, 0.6, 0.3, 1);
}

/* --- Reset leve --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--fonte);
    color: var(--texto);
    background: var(--fundo);
    line-height: 1.65;
    font-size: 1.0625rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--instrumento-escuro); }
a:hover { color: var(--instrumento); }

h1, h2, h3 {
    line-height: 1.15;
    color: var(--azul-profundo);
    letter-spacing: -0.02em;
    font-weight: 700;
}
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-top: 0; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

/* --- Acessibilidade --- */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--azul-profundo);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0 0 var(--raio-s) 0;
    z-index: 1000;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible {
    outline: 3px solid var(--instrumento);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--largura-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--estreito { max-width: var(--largura-estreita); }

.seccao { padding: 5.5rem 0; }
.seccao--alt { background: var(--fundo-alt); }

.seccao > .container > h2,
.seccao--alt > .container > h2 { text-align: center; }

/* --- Cabeçalho / navegação (glass) --- */
.cabecalho {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 252, 254, 0.75);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--borda);
}
.cabecalho__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 1rem;
}
.marca {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--azul-profundo);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.marca:hover { color: var(--azul-profundo); }
.marca__logo { border-radius: 8px; }
.marca__nome { font-size: 1.15rem; }

.nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}
.nav a {
    display: block;
    color: var(--texto-suave);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: var(--raio-pill);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background var(--transicao), color var(--transicao);
}
.nav a:hover { background: rgba(11, 37, 69, 0.06); color: var(--azul-profundo); }
.nav a.ativo {
    background: var(--azul-profundo);
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--azul-profundo);
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* --- Hero --- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 5rem;
    background:
        radial-gradient(60rem 32rem at 85% -10%, rgba(27, 152, 224, 0.14), transparent 60%),
        radial-gradient(50rem 30rem at -10% 110%, rgba(58, 110, 165, 0.12), transparent 60%),
        var(--fundo);
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
}
.hero h1 {
    margin: 0 0 1.2rem;
    background: linear-gradient(120deg, var(--azul-profundo) 30%, var(--instrumento) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--azul-profundo); /* fallback */
}
.hero__sub {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--texto-suave);
    max-width: 48ch;
    margin: 0;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 2rem 0 0.8rem; }
.hero__nota { font-size: 0.9rem; color: var(--texto-suave); margin-top: 1.2rem; }
.hero__imagem { display: flex; justify-content: center; }

/* --- Botões --- */
.botao {
    display: inline-block;
    padding: 0.8rem 1.7rem;
    border-radius: var(--raio-pill);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--transicao), color var(--transicao),
                box-shadow var(--transicao), transform var(--transicao);
}
.botao:active { transform: scale(0.98); }
.botao--primario {
    background: var(--azul-profundo);
    color: #fff;
    box-shadow: 0 8px 20px rgba(11, 37, 69, 0.25);
}
.botao--primario:hover {
    background: var(--azul-escuro);
    color: #fff;
    box-shadow: 0 12px 28px rgba(11, 37, 69, 0.32);
}
.botao--secundario {
    background: rgba(11, 37, 69, 0.06);
    color: var(--azul-profundo);
    border-color: transparent;
}
.botao--secundario:hover { background: rgba(11, 37, 69, 0.11); color: var(--azul-profundo); }

/* --- Placeholders (screenshots) --- */
.placeholder {
    background: repeating-linear-gradient(
        45deg, rgba(11, 37, 69, 0.06), rgba(11, 37, 69, 0.06) 12px,
        rgba(11, 37, 69, 0.02) 12px, rgba(11, 37, 69, 0.02) 24px);
    border: 2px dashed rgba(11, 37, 69, 0.25);
    border-radius: 24px;
    color: var(--texto-suave);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
}
.placeholder--telemovel { width: 230px; height: 460px; }

/* --- Cartões --- */
.cartoes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 2.5rem;
}
.cartao {
    background: #fff;
    border: 1px solid var(--borda);
    border-radius: var(--raio);
    padding: 1.8rem;
    box-shadow: var(--sombra);
    transition: transform var(--transicao), box-shadow var(--transicao);
}
.cartao:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-hover);
}
.cartao h3 { margin-top: 0; color: var(--azul-profundo); }
.cartao p { color: var(--texto-suave); margin-bottom: 0; font-size: 0.98rem; }

/* --- CTA final --- */
.cta-final { text-align: center; }
.cta-final h2 { margin-top: 0; }
.cta-final p { color: var(--texto-suave); font-size: 1.1rem; }
.cta-final .botao { margin-top: 0.6rem; }

/* --- Páginas de conteúdo --- */
.pagina h1 { margin-top: 2.5rem; }
.pagina .lead { font-size: 1.2rem; color: var(--texto-suave); }
.pagina .meta { color: var(--texto-suave); font-size: 0.9rem; }
.pagina p { max-width: 68ch; }

/* --- FAQ (acordeão nativo) --- */
.faq {
    border: 1px solid var(--borda);
    border-radius: var(--raio-s);
    margin: 0.85rem 0;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: box-shadow var(--transicao);
}
.faq:hover { box-shadow: var(--sombra-hover); }
.faq summary {
    cursor: pointer;
    padding: 1.15rem 1.4rem;
    font-weight: 600;
    color: var(--azul-profundo);
    list-style: none;
    position: relative;
    padding-right: 3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    position: absolute;
    right: 1.4rem;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--instrumento);
    border-bottom: 2px solid var(--instrumento);
    transform: translateY(-70%) rotate(45deg);
    transition: transform var(--transicao);
}
.faq[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq summary:hover { background: var(--ceu-claro); }
.faq__corpo { padding: 0 1.4rem 1.3rem; color: var(--texto-suave); }
.faq__corpo p { max-width: none; }
.faq__nota { font-size: 0.9rem; font-style: italic; }

/* --- Formulário --- */
.formulario { margin-top: 2rem; max-width: 560px; }
.campo { margin-bottom: 1.2rem; }
.campo label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }
.campo input,
.campo textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--borda);
    border-radius: var(--raio-s);
    font: inherit;
    color: var(--texto);
    background: #fff;
    box-shadow: 0 1px 2px rgba(11, 37, 69, 0.04);
    transition: border-color var(--transicao), box-shadow var(--transicao);
}
.campo input:focus,
.campo textarea:focus {
    border-color: var(--instrumento);
    box-shadow: 0 0 0 4px rgba(27, 152, 224, 0.15);
    outline: none;
}
.campo textarea { resize: vertical; }
.campo--honeypot { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.campo--consentimento {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.campo--consentimento input { width: auto; margin-top: 0.3rem; }
.campo--consentimento label { font-weight: 400; font-size: 0.95rem; }

/* --- Alertas --- */
.alerta {
    padding: 1rem 1.3rem;
    border-radius: var(--raio-s);
    margin: 1.5rem 0;
    border: 1px solid;
}
.alerta--sucesso { background: #e9f7f4; border-color: rgba(42, 157, 143, 0.35); color: #14554c; }
.alerta--erro    { background: #fceceb; border-color: rgba(193, 68, 60, 0.35); color: #7a241f; }
.alerta--aviso   { background: #fdf4e7; border-color: rgba(224, 164, 88, 0.45); color: #7a5320; }

/* --- Rodapé --- */
.rodape {
    background: var(--azul-profundo);
    color: #cdd9e8;
    margin-top: 5rem;
    border-radius: 28px 28px 0 0;
}
.rodape__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
    padding-top: 3.5rem;
    padding-bottom: 2.5rem;
}
.rodape h2 {
    color: #fff;
    font-size: 0.85rem;
    margin: 0 0 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.rodape .marca__nome { color: #fff; font-size: 1.1rem; font-weight: 700; }
.rodape p { margin: 0.4rem 0; font-size: 0.92rem; }
.rodape__aviso { color: var(--ceu); font-style: italic; }
.rodape ul { list-style: none; padding: 0; margin: 0; }
.rodape li { margin: 0.4rem 0; }
.rodape a { color: #cdd9e8; text-decoration: none; transition: color var(--transicao); }
.rodape a:hover { color: #fff; text-decoration: underline; }
.rodape__base {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.2rem 1.5rem;
    font-size: 0.85rem;
    color: var(--ceu);
}

/* --- Moldura de telemóvel (screenshots) --- */
.device {
    background: #0b1f38;
    padding: 10px;
    border-radius: 44px;
    box-shadow: var(--sombra-forte);
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
    transition: transform var(--transicao), box-shadow var(--transicao);
}
.device img {
    display: block;
    width: 100%;
    border-radius: 34px;
}
.device--hero { max-width: 290px; }
.galeria .device:hover { transform: translateY(-6px) scale(1.015); }

/* --- Secção widget --- */
.widget-showcase__inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3.5rem;
    align-items: center;
}
.widget-showcase h2 { margin-top: 0; text-align: left; }
.widget-showcase p { color: var(--texto-suave); }
.widget-showcase ul {
    list-style: none;
    padding: 0;
    margin: 1.4rem 0 0;
}
.widget-showcase li {
    position: relative;
    padding-left: 2rem;
    margin: 0.9rem 0;
    color: var(--texto-suave);
}
.widget-showcase li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--instrumento), var(--azul-medio));
}
.widget-showcase li strong { color: var(--texto); }

/* --- Galeria de screenshots --- */
.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 2.5rem 2rem;
    margin-top: 3rem;
}
.galeria__item { text-align: center; margin: 0; }
.galeria__item h3 {
    margin: 1.2rem 0 0.3rem;
    font-size: 1.05rem;
    color: var(--azul-profundo);
}
.galeria__item p {
    color: var(--texto-suave);
    font-size: 0.92rem;
    margin: 0 auto;
    max-width: 30ch;
}
.seccao .lead { text-align: center; color: var(--texto-suave); max-width: 60ch; margin: 0.8rem auto 0; }

/* --- Animações de entrada (classes aplicadas por JS) --- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.6, 0.3, 1),
                transform 0.6s cubic-bezier(0.25, 0.6, 0.3, 1);
}
.reveal.visivel { opacity: 1; transform: none; }

/* --- Responsivo --- */
@media (max-width: 800px) {
    .seccao { padding: 3.5rem 0; }
    .hero { padding: 3.5rem 0; }
    .hero__inner { grid-template-columns: 1fr; text-align: center; }
    .hero__ctas { justify-content: center; }
    .hero__sub { margin-left: auto; margin-right: auto; }
    .rodape__inner { grid-template-columns: 1fr; }
    .rodape { border-radius: 0; }
    .widget-showcase__inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .widget-showcase h2 { text-align: center; }
    .widget-showcase ul { display: inline-block; text-align: left; }

    .nav-toggle { display: flex; }
    .nav {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(251, 252, 254, 0.92);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        border-bottom: 1px solid var(--borda);
        display: none;
    }
    .nav.aberto { display: block; }
    .nav ul { flex-direction: column; padding: 0.5rem 1rem 1rem; }
    .nav a { padding: 0.8rem 1rem; }
}

/* --- Preferência de movimento reduzido --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
    .reveal { opacity: 1; transform: none; }
}
