/* =========================================================
   Portal Núcleo Farma — Estilo
   ========================================================= */

:root {
    --primary: #007bff;
    --primary-btn: #0069d9;
    --primary-dark: #0056b3;
    --primary-soft: #e8f2fe;
    --secondary: #2c3e50;
    --gold: #f1c40f;
    --gold-dark: #d4ac0d;
    --bg: #f4f7f9;
    --surface: #ffffff;
    --border: #e3e9ef;
    --text: #333;
    --text-muted: #5f6d79;
    --shadow-sm: 0 2px 8px rgba(44, 62, 80, .06);
    --shadow-md: 0 10px 30px rgba(44, 62, 80, .10);
    --radius: 14px;
    --radius-lg: 20px;
    --transition: .25s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary-dark); }

.container {
    width: 100%;
    max-width: 1040px;
    margin-inline: auto;
    padding-inline: 20px;
}

/* =========================================================
   Cabeçalho
   ========================================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.header.is-scrolled { box-shadow: var(--shadow-sm); }

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 14px;
}

.header__brand { display: inline-flex; }

.header__logo {
    height: 52px;
    width: auto;
}

.header__nav {
    display: flex;
    gap: 8px;
}

.header__nav a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: .95rem;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background var(--transition), color var(--transition);
}

.header__nav a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative;
    padding: 84px 0 72px;
    text-align: center;
    background:
        radial-gradient(600px 300px at 15% 0%, rgba(0, 123, 255, .10), transparent 70%),
        radial-gradient(600px 300px at 85% 0%, rgba(0, 123, 255, .08), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    overflow: hidden;
}

.hero__eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 16px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-radius: 999px;
}

.hero__title {
    margin: 0 0 18px;
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -.02em;
}

.hero__subtitle {
    max-width: 640px;
    margin: 0 auto 32px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================================================
   Seções
   ========================================================= */
.section { padding: 64px 0; }

.section--muted {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section__head {
    text-align: center;
    margin-bottom: 40px;
}

.section__title {
    margin: 0 0 8px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -.01em;
}

.section__desc {
    margin: 0;
    color: var(--text-muted);
}

/* =========================================================
   Cards de sistemas
   ========================================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.card__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    color: #fff;
}

.card__icon svg { width: 26px; height: 26px; }

.card__icon--blue { background: linear-gradient(135deg, #007bff, #0056b3); }
.card__icon--green { background: linear-gradient(135deg, #27ae60, #1e8449); }

.card__title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
}

.card__tag {
    font-size: .85rem;
    font-weight: 700;
    color: var(--primary-dark);
    vertical-align: middle;
}

.card__desc {
    margin: 0;
    font-size: .95rem;
    color: var(--text-muted);
}

/* Selo de área de instalação */
.card__pill {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 12px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-radius: 999px;
}

/* Dica de instalação */
.card__hint {
    margin: 0 0 18px;
    padding: 10px 14px;
    text-align: center;
    font-size: .87rem;
    font-weight: 600;
    color: var(--secondary);
    background: var(--primary-soft);
    border-radius: 10px;
}

.card__store {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.card__badge { width: 148px; }

/* Painel escuro para o logo GAV (texto claro no original) */
.card__logo-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 18px;
    min-height: 96px;
}

.card__gav-logo { width: min(100%, 320px); }

/* =========================================================
   Botões
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition), background var(--transition),
                box-shadow var(--transition), border-color var(--transition), color var(--transition);
}

.btn:active { transform: scale(.98); }

.btn--lg { padding: 15px 30px; font-size: 1rem; border-radius: 12px; }

.btn--primary {
    background: var(--primary-btn);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 105, 217, .30);
}

.btn--primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn--gold {
    background: var(--gold);
    color: var(--secondary);
    box-shadow: 0 6px 16px rgba(241, 196, 15, .30);
}

.btn--gold:hover {
    background: var(--gold-dark);
    color: var(--secondary);
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn--ghost:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

/* =========================================================
   Acessos restritos
   ========================================================= */
.restricted-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin-inline: auto;
}

.restricted-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px dashed #b9c4cd;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--secondary);
    transition: border-color var(--transition), box-shadow var(--transition),
                transform var(--transition), background var(--transition);
}

.restricted-card:hover {
    border-style: solid;
    border-color: var(--primary);
    background: #fbfdff;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.restricted-card__icon { font-size: 1.5rem; }

.restricted-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.restricted-card__body strong { font-size: .98rem; }

.restricted-card__body small {
    color: var(--text-muted);
    font-size: .82rem;
}

.restricted-card__arrow {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    transition: transform var(--transition);
}

.restricted-card:hover .restricted-card__arrow { transform: translateX(4px); }

/* =========================================================
   Rodapé
   ========================================================= */
.footer {
    background: var(--secondary);
    color: #cbd5dd;
    padding: 36px 0;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.footer__logo {
    height: 56px;
    width: auto;
    background: #fff;
    padding: 6px 14px;
    border-radius: 10px;
}

.footer__copy {
    margin: 0;
    font-size: .88rem;
}

/* =========================================================
   Animação de entrada (reveal)
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   Acessibilidade
   ========================================================= */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 768px) {
    .header__logo { height: 42px; }

    .header__nav a { padding: 7px 11px; font-size: .88rem; }

    .hero { padding: 56px 0 48px; }

    .section { padding: 48px 0; }

    .grid,
    .restricted-grid { grid-template-columns: 1fr; }

    .card { padding: 24px; }

    .footer__logo { height: 48px; }
}

@media (max-width: 420px) {
    .hero__actions .btn { width: 100%; }
}
