/* ==========================================================================
   IGEPREV Petrolina — Design System
   Tokens (cores, espaçamentos, tipografia, raios, sombras), reset e base.
   Paleta extraída da logo institucional do IGEPREV.
   Vermelho NÃO é cor principal — uso apenas em alertas pontuais.
   ========================================================================== */

:root {
	/* -- Cores institucionais ------------------------------------------------ */
	--ige-primary:        #0E6FAD;   /* Azul vivo da identidade */
	--ige-primary-dark:   #083D77;   /* Azul profundo da marca, sem o tom antigo chapado */
	--ige-primary-soft:   #E8F5FC;   /* Fundos suaves, badges */

	--ige-secondary:      #11885E;   /* Verde institucional */
	--ige-secondary-dark: #0A5F43;
	--ige-secondary-soft: #E5F5EE;

	/* Acentos vindos da faixa colorida da logo */
	--ige-accent:         #D84B36;
	--ige-accent-dark:    #A93426;
	--ige-accent-soft:    #FCEDEA;

	--ige-support:        #F6B834;   /* Amarelo ouro — apoio/destaque */
	--ige-support-soft:   #FFF6DA;

	--ige-alert:          #B00020;   /* Vermelho — APENAS alertas/erros */
	--ige-alert-soft:     #FDECEE;

	/* -- Neutros ------------------------------------------------------------- */
	--ige-bg-white:       #FFFFFF;
	--ige-bg-light:       #F6F8FA;
	--ige-bg-muted:       #EEF3F7;
	--ige-text-main:      #172132;
	--ige-text-muted:     #4B5563;
	--ige-text-soft:      #6B7280;
	--ige-border-soft:    #E5E9F2;
	--ige-border:         #CBD5E1;

	/* -- Tipografia ---------------------------------------------------------- */
	--ige-font-base: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

	/* fonte base 18px (idosos) — sobe via barra A11y */
	--ige-fs-base:   1.125rem;  /* 18px  */
	--ige-fs-sm:     1rem;      /* 16px  */
	--ige-fs-xs:     0.875rem;  /* 14px  */
	--ige-fs-lg:     1.25rem;   /* 20px  */
	--ige-fs-xl:     1.5rem;    /* 24px  */
	--ige-fs-h3:     1.75rem;   /* 28px  */
	--ige-fs-h2:     2.25rem;   /* 36px  */
	--ige-fs-h1:     2.75rem;   /* 44px  */

	--ige-lh-tight:  1.2;
	--ige-lh-normal: 1.6;
	--ige-lh-loose:  1.75;

	--ige-fw-regular: 400;
	--ige-fw-medium:  500;
	--ige-fw-semi:    600;
	--ige-fw-bold:    700;
	--ige-fw-extra:   800;

	/* -- Espaçamentos (escala 4px) ------------------------------------------ */
	--ige-sp-1:  0.25rem;   /* 4   */
	--ige-sp-2:  0.5rem;    /* 8   */
	--ige-sp-3:  0.75rem;   /* 12  */
	--ige-sp-4:  1rem;      /* 16  */
	--ige-sp-5:  1.5rem;    /* 24  */
	--ige-sp-6:  2rem;      /* 32  */
	--ige-sp-7:  3rem;      /* 48  */
	--ige-sp-8:  4rem;      /* 64  */
	--ige-sp-9:  6rem;      /* 96  */

	/* -- Raios e sombras ---------------------------------------------------- */
	--ige-radius-sm:  6px;
	--ige-radius-md:  10px;
	--ige-radius-lg:  14px;
	--ige-radius-xl:  20px;
	--ige-radius-pill: 999px;

	--ige-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
	--ige-shadow-sm: 0 2px 6px rgba(15, 23, 42, .06);
	--ige-shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
	--ige-shadow-lg: 0 18px 48px rgba(15, 23, 42, .12);

	/* -- Áreas de toque acessíveis ----------------------------------------- */
	--ige-touch:     48px;   /* mínimo para botões/links principais */

	/* -- Container ---------------------------------------------------------- */
	--ige-container-max: 1320px;
	--ige-container-pad: clamp(1rem, 3vw, 2rem);

	/* -- Transições --------------------------------------------------------- */
	--ige-transition: 180ms ease;

	/* -- Header sticky ------------------------------------------------------ */
	--ige-header-height: 84px;
	--ige-topbar-height: 40px;
}

/* ==========================================================================
   Reset / base global
   ========================================================================== */

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

html {
	font-size: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--ige-header-height) + var(--ige-topbar-height) + 16px);
}

body {
	margin: 0;
	font-family: var(--ige-font-base);
	font-size: var(--ige-fs-base);
	line-height: var(--ige-lh-normal);
	color: var(--ige-text-main);
	background: var(--ige-bg-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea,
.elementor,
.elementor-widget,
.elementor-heading-title,
.elementor-button,
.elementor-field,
.elementor-nav-menu a {
	font-family: var(--ige-font-base) !important;
}

/* Respeita preferência de redução de movimento */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================================================================
   Tipografia
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ige-font-base);
	color: var(--ige-text-main);
	line-height: var(--ige-lh-tight);
	margin: 0 0 var(--ige-sp-4);
	font-weight: var(--ige-fw-bold);
	letter-spacing: 0;
}

h1 { font-size: clamp(2rem, 4vw, var(--ige-fs-h1)); font-weight: var(--ige-fw-extra); }
h2 { font-size: clamp(1.75rem, 3vw, var(--ige-fs-h2)); }
h3 { font-size: clamp(1.375rem, 2.2vw, var(--ige-fs-h3)); }
h4 { font-size: var(--ige-fs-xl); }
h5 { font-size: var(--ige-fs-lg); }
h6 { font-size: var(--ige-fs-base); text-transform: uppercase; letter-spacing: 0; }

p {
	margin: 0 0 var(--ige-sp-4);
	max-width: 70ch;
}

strong, b { font-weight: var(--ige-fw-bold); }

small { font-size: var(--ige-fs-sm); color: var(--ige-text-muted); }

a {
	color: var(--ige-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1.5px;
	transition: color var(--ige-transition);
}
a:hover { color: var(--ige-primary-dark); text-decoration-thickness: 2px; }

/* ==========================================================================
   Foco visível — acessibilidade WCAG 2.2 AA
   ========================================================================== */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--ige-support);
	outline-offset: 3px;
	border-radius: var(--ige-radius-sm);
}

/* ==========================================================================
   Utilitários
   ========================================================================== */

.ige-container {
	max-width: var(--ige-container-max);
	margin-inline: auto;
	padding-inline: var(--ige-container-pad);
}

.ige-sr-only,
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* "Ir para o conteúdo" — visível ao receber foco */
.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 9999;
	padding: 12px 20px;
	background: var(--ige-primary-dark);
	color: #fff !important;
	font-weight: var(--ige-fw-bold);
	border-radius: var(--ige-radius-md);
	text-decoration: none !important;
	transition: top var(--ige-transition);
}
.skip-link:focus,
.skip-link:focus-visible {
	top: 16px;
	outline: 3px solid var(--ige-support);
	outline-offset: 3px;
}

/* Imagens responsivas por padrão */
img, svg, video { max-width: 100%; height: auto; display: block; }

/* Seleção institucional */
::selection { background: var(--ige-primary); color: #fff; }
