/* EUROPA HOJE v2 — acentos animados no cabeçalho de cada faixa + calculadora resumida.
   Só tokens já usados (pages.css / sete-modelos.css). Animações ligadas pela classe .is-visible que o site.js
   já põe nos .reveal; com prefers-reduced-motion tudo fica parado no estado final. */

/* --- acento: ícone SVG ao lado do .section-head --- */
.eh-head { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.eh-head .section-head { margin: 0; }
.eh-anim { width: 72px; height: 72px; color: var(--c-dark); flex: none; }
.eh-anim svg { width: 100%; height: 100%; overflow: visible; }
.eh-anim .acc { color: var(--c-accent); }
@media (max-width: 600px) { .eh-anim { width: 56px; height: 56px; } .eh-head { gap: 16px; } }

/* câmbio: linha que se desenha + seta */
.eh-anim .trace { stroke-dasharray: 140; stroke-dashoffset: 140; }
.is-visible .eh-anim .trace { animation: ehDraw 1.6s var(--pg-ease) .2s forwards; }
.eh-anim .tip { opacity: 0; transform-origin: center; }
.is-visible .eh-anim .tip { animation: ehPop .5s var(--pg-ease) 1.5s forwards; }
@keyframes ehDraw { to { stroke-dashoffset: 0; } }
@keyframes ehPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }

/* clima: sol gira, raios pulsam, nuvem desliza, gotas caem */
.eh-anim .sun { transform-origin: 32px 30px; }
.is-visible .eh-anim .sun { animation: ehSpin 18s linear infinite; }
.eh-anim .cloud { transform: translateX(-14px); opacity: 0; }
.is-visible .eh-anim .cloud { animation: ehDrift 1.4s var(--pg-ease) .3s forwards; }
.eh-anim .drop { opacity: 0; }
.is-visible .eh-anim .drop { animation: ehRain 1.3s ease-in infinite; }
.is-visible .eh-anim .drop:nth-child(2) { animation-delay: .35s; }
.is-visible .eh-anim .drop:nth-child(3) { animation-delay: .7s; }
@keyframes ehSpin { to { transform: rotate(360deg); } }
@keyframes ehDrift { to { transform: translateX(0); opacity: 1; } }
@keyframes ehRain { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* custo de morar: casa sobe, chave encaixa */
.eh-anim .house { transform: translateY(10px); opacity: 0; }
.is-visible .eh-anim .house { animation: ehRise .9s var(--pg-ease) .1s forwards; }
.eh-anim .key { transform: translateX(16px) rotate(-30deg); opacity: 0; transform-origin: 48px 52px; }
.is-visible .eh-anim .key { animation: ehKey .8s var(--pg-ease) .9s forwards; }
@keyframes ehRise { to { transform: translateY(0); opacity: 1; } }
@keyframes ehKey { to { transform: translateX(0) rotate(0); opacity: 1; } }

/* calculadora: moedas empilham */
.eh-anim .coin { transform: translateY(-26px); opacity: 0; }
.is-visible .eh-anim .coin { animation: ehStack .55s var(--pg-ease) forwards; }
.is-visible .eh-anim .coin:nth-child(1) { animation-delay: .1s; }
.is-visible .eh-anim .coin:nth-child(2) { animation-delay: .3s; }
.is-visible .eh-anim .coin:nth-child(3) { animation-delay: .5s; }
.is-visible .eh-anim .coin:nth-child(4) { animation-delay: .7s; }
@keyframes ehStack { to { transform: translateY(0); opacity: 1; } }

/* estadia: avião cruza */
.eh-anim .plane { transform: translate(-30px, 16px) ; opacity: 0; }
.is-visible .eh-anim .plane { animation: ehFly 1.4s var(--pg-ease) .2s forwards; }
@keyframes ehFly { to { transform: translate(0, 0); opacity: 1; } }

/* vagas: pasta abre (tampa) */
.eh-anim .lid { transform-origin: 32px 30px; transform: rotate(0); }
.is-visible .eh-anim .lid { animation: ehLid 1s var(--pg-ease) .3s forwards; }
@keyframes ehLid { 40% { transform: rotate(-14deg); } 100% { transform: rotate(0); } }

/* edição: linhas do jornal escrevem */
.eh-anim .line { transform: scaleX(0); transform-origin: left; }
.is-visible .eh-anim .line { animation: ehWrite .5s var(--pg-ease) forwards; }
.is-visible .eh-anim .line:nth-child(2) { animation-delay: .15s; }
.is-visible .eh-anim .line:nth-child(3) { animation-delay: .3s; }
.is-visible .eh-anim .line:nth-child(4) { animation-delay: .45s; }
@keyframes ehWrite { to { transform: scaleX(1); } }

/* ícones de clima por cidade na tabela */
.eh-ico { display: inline-block; width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; color: var(--pg-mid); }
.eh-ico svg { width: 100%; height: 100%; overflow: visible; }
.eh-ico .sun { transform-origin: 11px 11px; }
.is-visible .eh-ico .sun { animation: ehSpin 14s linear infinite; }
.is-visible .eh-ico .drop { animation: ehRain 1.3s ease-in infinite; }
.is-visible .eh-ico .drop:nth-child(2) { animation-delay: .4s; }
.is-visible .eh-ico .flake { animation: ehRain 2.2s ease-in infinite; }
.is-visible .eh-ico .fog { animation: ehFog 2.4s ease-in-out infinite alternate; }
@keyframes ehFog { from { transform: translateX(-2px); opacity: .5; } to { transform: translateX(2px); opacity: 1; } }

/* série do câmbio: sparkline em SVG */
.eh-spark { width: 100%; height: 160px; display: block; margin-top: 32px; }
.eh-spark .area { fill: var(--c-accent); opacity: .12; }
.eh-spark .path { fill: none; stroke: var(--c-dark); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.eh-spark .dot { fill: var(--c-accent); }
.eh-spark-legenda { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--pg-mid); margin-top: 8px; }
@media (max-width: 600px) { .eh-spark { height: 120px; } }

/* comparativo: barras em relação a Lisboa */
.eh-barras { margin-top: 40px; display: grid; gap: 14px; }
.eh-barra { display: grid; grid-template-columns: 140px 1fr 64px; gap: 14px; align-items: center; font-size: .95rem; }
.eh-barra .trilho { height: 10px; background: #fff; border: 1px solid var(--pg-line); overflow: hidden; }
.eh-barra .fill { height: 100%; background: var(--c-dark); width: 0; transition: width 1.2s var(--pg-ease); }
.eh-barra .fill.acc { background: var(--c-accent); }
.is-visible .eh-barra .fill { width: var(--w); }
.eh-barra .pct { text-align: right; font-weight: 600; color: var(--c-dark); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .eh-barra { grid-template-columns: 1fr 56px; } .eh-barra .trilho { grid-column: 1 / -1; } }

/* calculadora */
.eh-calc { margin-top: 48px; border: 1px solid var(--pg-line); background: #fff; display: grid; grid-template-columns: 1fr 1fr; }
.eh-calc > div { padding: clamp(24px, 3.4vw, 44px); }
.eh-calc .form { border-right: 1px solid var(--pg-line); display: grid; gap: 18px; align-content: start; }
.eh-calc label { display: grid; gap: 6px; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--pg-mid); font-weight: 700; }
.eh-calc select, .eh-calc input { font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--c-dark); border: 1px solid var(--pg-line); background: #F4F6F8; padding: 10px 12px; border-radius: 0; width: 100%; }
.eh-calc .dois { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.eh-calc .faixa { display: flex; align-items: center; gap: 12px; }
.eh-calc input[type="range"] { accent-color: var(--c-dark); background: none; border: 0; padding: 0; }
.eh-calc output { font-weight: 600; color: var(--c-dark); font-size: 14px; letter-spacing: 0; min-width: 2ch; }
.eh-calc .resultado dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; margin: 20px 0 0; font-size: .95rem; }
.eh-calc .resultado dt { color: var(--pg-mid); }
.eh-calc .resultado dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: var(--c-dark); }
.eh-calc .total { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--pg-line); }
.eh-calc .total .display { font-size: clamp(2.2rem, 3.6vw, 3.4rem); letter-spacing: -.04em; line-height: 1; color: var(--c-dark); margin: 6px 0; }
.eh-calc .total small { color: var(--pg-mid); font-size: 13px; }
.eh-calc .acoes { margin-top: 28px; }
@media (max-width: 900px) { .eh-calc { grid-template-columns: 1fr; } .eh-calc .form { border-right: 0; border-bottom: 1px solid var(--pg-line); } }

/* vagas: lista no padrão award-list */
.eh-vagas .award-row { text-decoration: none; }
.eh-vagas .award-row small { display: block; }

@media (prefers-reduced-motion: reduce) {
    .eh-anim *, .eh-ico *, .eh-barra .fill { animation: none !important; transition: none !important; }
    .eh-anim .trace { stroke-dashoffset: 0; }
    .eh-anim .tip, .eh-anim .cloud, .eh-anim .house, .eh-anim .key, .eh-anim .coin, .eh-anim .plane, .eh-anim .drop, .eh-ico .drop, .eh-ico .flake { opacity: 1; transform: none; }
    .eh-anim .line { transform: scaleX(1); }
    .eh-barra .fill { width: var(--w); }
}
