@import url('fonts/font-faces.css');

/* DC-43: base editorial clara. O Atlas e os painéis de situação têm áreas escuras próprias. */
:root{
  --sand:#ead19b;
  --sand-dark:#c39b60;
  --paper:#f5e6bd;
  --ink:#252821;
  --muted:#645d4a;
  --line:#bca36c;
  --soil:#954630;
  --sun:#e2b866;
  --night:#172421;
  --night-2:#24342e;
  --leaf:#456857;
}
body{background:var(--sand);color:var(--ink);font-family:'DM Sans',Arial,sans-serif;line-height:1.5}
h1,h2,h3,.brand,.section-head h2,.page-hero h1{font-family:'Barlow Condensed','Arial Narrow',sans-serif;letter-spacing:-.018em}
header{background:#edd5a2;color:var(--ink);border-bottom:1px solid rgba(82,67,40,.33)}
header nav a{font-weight:700;letter-spacing:.01em}
header nav a:hover,header nav a[aria-current="page"]{color:var(--soil);border-color:var(--soil)}
.ticker{background:#242820;color:#efe6d1}
.ticker-label{background:#a05034;color:#fff}
.page-hero{background:linear-gradient(90deg,rgba(22,32,25,.88),rgba(22,32,25,.24)),var(--hero) center/cover;min-height:320px;display:flex;flex-direction:column;justify-content:center}
.page-hero h1{font-size:clamp(48px,6vw,82px);font-weight:700;max-width:840px}
.eyebrow{font-weight:800;letter-spacing:.13em;text-transform:uppercase}
.section-head h2{font-size:clamp(34px,3.8vw,52px);font-weight:700;line-height:.98}
.button{background:var(--soil);color:#fff;border:1px solid var(--soil);text-transform:uppercase;letter-spacing:.07em}
.button:hover{background:#71341f;color:#fff}
.editorial-card,.source-card,.data-card{border-radius:0}
.editorial-card{background:var(--paper);border-top-color:var(--soil)}
.editorial-card img{filter:saturate(.85);transition:filter .2s,transform .3s}
.editorial-card:hover img{filter:saturate(1);transform:scale(1.015)}
.feature-copy,.sidebar,.territory-sidebar{background:#493d2e;color:#f5e7cc;border-color:#95805f}
.dashboard,.intel,.source-map{background:var(--night);color:#f1eadc}
.data-card,.source-card{background:var(--night-2)}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #1588aa;outline-offset:3px}

/* Capa: texto editorial claro e vídeo proprietário como paisagem em movimento. */
.portal-home .hero{max-width:none;min-height:565px;background:var(--sand);color:var(--ink);display:block;overflow:hidden}
.portal-home .hero-media{position:absolute;inset:0 0 0 48%;width:52%;height:100%;overflow:hidden;background:url('hero-caatinga-poster.jpg') center/cover}
.portal-home .hero-media video{filter:saturate(.82) contrast(1.03)}
.portal-home .hero-media video.active:not(.is-ready){opacity:0}
.portal-home .hero:after{inset:0 0 0 48%;background:linear-gradient(0deg,rgba(17,26,19,.42),transparent 58%);pointer-events:none}
.portal-home .hero-inner{width:48%;margin:0;padding:75px 35px 85px max(55px,calc((100vw - 1250px)/2));position:relative;z-index:2}
.portal-home .hero .eyebrow{color:#7b6037}
.portal-home .hero h1{color:var(--ink);font:700 clamp(65px,7vw,108px)/.88 'Barlow Condensed','Arial Narrow',sans-serif;letter-spacing:-.028em;max-width:570px;margin:23px 0}
.portal-home .hero p{color:#383a30;font-size:17px;line-height:1.48;max-width:450px}
.portal-home .hero .button.alt{color:var(--ink);border-color:#77634a}
.portal-home .hero-controls{right:32px;bottom:42px}
.portal-home .hero-control-label{right:32px;bottom:20px;color:#fff}
.portal-home .prototype{background:#f5e6bd;color:#5e513b}
.portal-home .section{max-width:1330px}
.portal-home .section-head h2,.portal-home .atlas-copy h2,.portal-home .guide h2{font:700 clamp(38px,4vw,56px)/.96 'Barlow Condensed','Arial Narrow',sans-serif;letter-spacing:-.018em}
.portal-home .territory-sidebar{background:#493d2e}
.portal-home .territory-sidebar h2{color:#f5e7cc}
.portal-home .territory-sidebar dt{color:#e3c598}
.portal-home .territory-sidebar dd{color:#fff2dc}
.portal-home .expedition-real{gap:26px}
.portal-home .expedition-real>img{height:390px}
.portal-home .field-notes{border-color:var(--line)}
.portal-home .photo-entry img{filter:saturate(.86)}
.portal-home .atlas{background:#dfd2b0}
.portal-home .planner{background:var(--night)}

/* Leitura em telas pequenas sem depender do vídeo para transmitir o assunto. */
@media(max-width:850px){
  .portal-home .hero{min-height:760px}
  .portal-home .hero-inner{width:100%;padding:50px 28px 32px;min-height:380px}
  .portal-home .hero h1{font-size:clamp(62px,12vw,95px);max-width:670px}
  .portal-home .hero-media{inset:380px 0 0;width:100%;height:380px}
  .portal-home .hero:after{inset:380px 0 0}
  .portal-home .hero-controls{bottom:38px}
  .portal-home .hero-control-label{bottom:17px}
}
@media(max-width:620px){
  header .menu{color:var(--ink);border-color:#786044}
  header nav{background:#edd5a2;color:var(--ink)}
  .portal-home .hero{min-height:735px}
  .portal-home .hero-inner{padding:43px 23px 25px;min-height:390px}
  .portal-home .hero h1{font-size:clamp(61px,15vw,76px)}
  .portal-home .hero p{font-size:15px}
  .portal-home .hero-media{top:390px;height:345px}
  .portal-home .hero:after{top:390px}
  .portal-home .hero .actions{gap:9px}
  .portal-home .hero .button{font-size:10px;padding:11px 13px}
  .portal-home .expedition-real>img{height:280px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.ticker-stream{animation:none}.portal-home .hero-media video{display:none}.portal-home .hero-media{background:url('hero-caatinga-poster.jpg') center/cover}}

/* Expedições: imagem como documento de campo, com acesso ao contexto local. */
.field-page{background:#e7d9bd}.field-hero{display:grid;grid-template-columns:57% 43%;min-height:565px}.field-photo{position:relative;margin:0;min-height:565px;background:#313d39;overflow:hidden}.field-photo>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.field-photo:after{content:'';position:absolute;inset:40% 0 0;background:linear-gradient(transparent,rgba(20,34,33,.68));pointer-events:none}.field-photo figcaption{position:absolute;z-index:1;bottom:27px;left:40px;right:40px;color:#fff;border-top:1px solid rgba(255,255,255,.75);padding-top:12px;display:flex;justify-content:space-between;align-items:end;gap:16px;font-size:11px}.field-photo figcaption strong{font:700 28px 'Barlow Condensed',sans-serif}.field-copy{padding:64px clamp(30px,5vw,80px) 40px;background:#ddc8a4}.field-copy .eyebrow{color:#76523e}.field-copy h1{font:700 clamp(62px,6.6vw,102px)/.87 'Barlow Condensed',sans-serif;margin:28px 0 24px;letter-spacing:-.026em}.field-copy h1 em,.field-intro h2 em{font-style:normal;color:#a34f37}.field-copy p{max-width:450px;font-size:16px;line-height:1.5}.field-index{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #a89471;border-bottom:1px solid #a89471;padding:14px 0;margin:22px 0;font-size:10px;font-weight:800;letter-spacing:.04em}.field-intro{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:40px}.field-intro h2{font:700 clamp(42px,4.5vw,64px)/.94 'Barlow Condensed',sans-serif;margin:12px 0 0}.field-intro p{max-width:480px;font-size:14px;margin:0 0 3px}.field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.field-card{min-width:0;background:#f4e9d3}.field-card>a:first-child{display:block;aspect-ratio:1.5;overflow:hidden;background:#313d39}.field-card img{display:block;width:100%;height:100%;object-fit:cover;filter:saturate(.85);transition:transform .3s,filter .3s}.field-card:hover img{transform:scale(1.035);filter:saturate(1)}.field-card-copy{padding:19px 20px 22px}.field-card-copy>span{font-size:10px;font-weight:800;letter-spacing:.11em;color:#875039}.field-card-copy h3{font:700 34px/.96 'Barlow Condensed',sans-serif;margin:9px 0}.field-card-copy p{font-size:12px;line-height:1.45;min-height:52px}.field-card-copy a{font-size:11px;font-weight:800;border-bottom:1px solid var(--ink);padding-bottom:4px}.field-atlas{margin-bottom:60px}.field-atlas h2{font:700 50px/.98 'Barlow Condensed',sans-serif;margin:13px 0}.field-atlas p{max-width:670px;font-size:14px}
@media(max-width:900px){.field-hero{grid-template-columns:1fr}.field-photo{min-height:430px}.field-copy{padding:40px 30px}.field-copy h1{font-size:75px}.field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.field-intro{grid-template-columns:1fr}}
@media(max-width:620px){.field-photo{min-height:330px}.field-photo figcaption{left:20px;right:20px}.field-photo figcaption span{max-width:135px;text-align:right}.field-copy{padding:35px 23px}.field-copy h1{font-size:65px}.field-index{font-size:8px}.field-grid{grid-template-columns:1fr}.field-card-copy p{min-height:0}.field-intro{gap:15px}.field-atlas h2{font-size:41px}}

/* Atlas: palco cartográfico amplo, com comandos separados do mapa. */
.atlas-page{background:#172521}
.atlas-page .atlas-hero{min-height:210px;padding-top:33px;padding-bottom:34px}
.atlas-page .atlas-hero h1{font-size:clamp(44px,4.7vw,70px);margin:10px 0}
.atlas-page .atlas-hero p{max-width:800px;font-size:13px}
.atlas-page .container{max-width:none;padding:14px clamp(12px,2vw,30px) 35px}
.atlas-page .atlas-layout{display:grid;grid-template-columns:minmax(220px,250px) minmax(420px,1fr) minmax(220px,250px);gap:12px;align-items:start}
.atlas-page .atlas-location,.atlas-page .atlas-layers{grid-column:auto;grid-row:auto;min-width:0;max-height:calc(100vh - 30px);overflow:auto;background:rgba(22,40,37,.96);backdrop-filter:blur(12px);border:1px solid #66736a;color:#f6f0e5;padding:20px}
.atlas-page .atlas-location h2,.atlas-page .atlas-layers h2{font:700 28px/.96 'Barlow Condensed',sans-serif;color:#fff3da;margin:0 0 18px;min-height:0}
.atlas-page .atlas-location label,.atlas-page .atlas-layers label{color:#f0ebdf;border-color:#53645b}
.atlas-page .atlas-location p,.atlas-page .atlas-layers p{color:#d6dfd4;font-size:12px}
.atlas-page .atlas-location a:not(.button),.atlas-page .atlas-layers a{color:#cce5db}
.atlas-page .atlas-location .territory-card{color:var(--ink);background:#f5e6bd}
.atlas-page .atlas-location .territory-card p,.atlas-page .atlas-location .territory-card a{color:var(--ink)}
.atlas-page .atlas-location input{background:#faf1dd;color:var(--ink);border-color:#cad1b9}
.atlas-page .atlas-location .button{display:block;margin-top:7px;text-align:center;font-size:10px;padding:10px}
.atlas-page .atlas-layers .layer-actions{display:flex;gap:7px}
.atlas-page .atlas-layers button{background:#cde2d2;color:#192b24;border-color:#cde2d2;font-size:11px;padding:8px}
.atlas-page .atlas-key{background:rgba(245,230,189,.1);border:1px solid #65746b;color:#ecf2e8;padding:12px}
.atlas-page .atlas-key p,.atlas-page .atlas-key strong{color:#ecf2e8}
.atlas-page .atlas-map{grid-column:auto;grid-row:auto;background:#24362f;border:1px solid #738071;padding:12px;min-width:0}
.atlas-page .map-surface{background:#f1e5ce;border-color:#aba895}
.atlas-page .map-surface svg{height:min(73vh,790px);min-height:610px}
.atlas-page .map-tools{background:rgba(245,230,189,.66);padding:8px}
.atlas-page .map-tools button{background:#f4e6c8;border-color:#80694c}
.atlas-page .map-drag-hint{font-size:10px;margin:8px 10px;color:#574d40}
.atlas-page .map-status-panel{background:#dce9db;color:#172521}
.atlas-page .map-documentation{color:#d8e0d6;font-size:11px;line-height:1.45}
.atlas-page footer{color:#d8e0d6;border-color:#718073}
@media(max-width:1150px){.atlas-page .atlas-layout{grid-template-columns:minmax(190px,240px) minmax(0,1fr)}.atlas-page .atlas-map{grid-column:2;grid-row:1/3}.atlas-page .atlas-layers{grid-column:1;grid-row:2;max-height:none}}
@media(max-width:760px){.atlas-page .atlas-layout{display:flex;flex-direction:column}.atlas-page .atlas-layout>*{width:100%}.atlas-page .atlas-map{order:0}.atlas-page .atlas-location{order:1;max-height:none}.atlas-page .atlas-layers{order:2;max-height:none}.atlas-page .map-surface svg{height:490px;min-height:0}.atlas-page .atlas-hero{min-height:0;padding:32px 20px}.atlas-page .atlas-hero h1{font-size:49px}.atlas-page .container{padding:12px}}

/* Perfil municipal: dois calendários distintos, mesma fonte e mesmo período. */
.municipal-profile{background:var(--sand);color:var(--ink)}
.municipal-profile header{background:#edd5a2;color:var(--ink)}
.municipal-profile .local-opening h1{font:700 clamp(54px,6.3vw,90px)/.9 'Barlow Condensed',sans-serif;letter-spacing:-.025em}
.municipal-profile .section-heading h2,.municipal-profile .municipal-section>h2{font:700 clamp(36px,3.4vw,48px)/.98 'Barlow Condensed',sans-serif}
.municipal-profile .municipal-section{border-color:#a9946c}
.municipal-profile .rain-calendar-panel{margin-top:40px;padding:23px;background:#f4e8d0;border:1px solid #b8a989}
.municipal-profile .rain-calendar-panel .section-heading h3{font:700 37px/.98 'Barlow Condensed',sans-serif;margin:7px 0 12px}
.municipal-profile .rain-calendar-panel>p{font-size:13px;margin:8px 0}
.municipal-profile .rain-gradient{width:150px;height:12px;background:linear-gradient(90deg,#e9f6f7,#20779e)}
.municipal-profile #rain-detail{display:block;margin-top:12px;font-size:13px;line-height:1.4}
.municipal-profile .rain-calendar-panel .day-cell{font-family:'DM Sans',sans-serif}
@media(max-width:620px){.municipal-profile .rain-calendar-panel{padding:16px}.municipal-profile .rain-calendar-panel .heat-legend{flex-wrap:wrap}}

/* Atlas: visão orbital da NASA como contexto datado, separada do mapa vetorial. */
.atlas-page .atlas-view-switch{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:0 0 11px}
.atlas-page .atlas-view-switch button{font:700 11px 'DM Sans',sans-serif;letter-spacing:.03em;background:transparent;color:#e5eee7;border:1px solid #80978a;padding:9px 11px}
.atlas-page .atlas-view-switch button[aria-pressed="true"]{background:#d8e8d6;color:#1b3028;border-color:#d8e8d6}
.atlas-page .atlas-view-switch a{margin-left:auto;color:#c9e3d6;font-size:10px;font-weight:700;text-decoration:underline}
.atlas-page .atlas-map.orbital-active .map-surface,.atlas-page .atlas-map.orbital-active .map-status-panel,.atlas-page .atlas-map.orbital-active .map-documentation{display:none}
.atlas-page #orbital-panel[hidden]{display:none}
.atlas-page #orbital-panel{position:relative;background:#0e1e1e;color:#eef3e9}
.atlas-page .orbital-caption{position:absolute;z-index:501;left:16px;top:16px;max-width:300px;padding:13px;background:rgba(14,27,27,.78);backdrop-filter:blur(10px);border:1px solid #9cb4a4}
.atlas-page .orbital-caption strong,.atlas-page .orbital-caption span{display:block;font-size:11px;line-height:1.4}.atlas-page .orbital-caption span{color:#d4ddd2;margin-top:5px}
.atlas-page .orbital-toggles{position:absolute;z-index:501;right:16px;top:16px;display:grid;gap:6px;padding:12px;background:rgba(14,27,27,.78);backdrop-filter:blur(10px);border:1px solid #9cb4a4}
.atlas-page .orbital-toggles label{color:#fff;font-size:11px;white-space:nowrap}.atlas-page .orbital-toggles input{accent-color:#c9e7d1}
.atlas-page #orbital-map{height:min(73vh,790px);min-height:610px;background:#1e3739}
.atlas-page #orbital-status{padding:10px 12px;margin:0;background:#243a36;color:#eaf1e9;text-align:left;font-size:11px}
.atlas-page .orbital-source{padding:8px 12px 11px;margin:0;color:#dce6df;font-size:10px}.atlas-page .orbital-source a{text-decoration:underline;color:#dce6df}
.atlas-page .leaflet-control-attribution{background:rgba(12,26,27,.82);color:#fff}.atlas-page .leaflet-control-attribution a{color:#d4ebdd}
@media(max-width:760px){.atlas-page #orbital-map{min-height:490px;height:490px}.atlas-page .orbital-caption{top:12px;left:12px;right:12px;max-width:none}.atlas-page .orbital-toggles{top:auto;bottom:80px;left:12px;right:auto}.atlas-page .atlas-view-switch a{width:100%;margin:3px 0}}

/* Auditoria UX: leitura contínua sem rios de espaço e navegação acessível. */
.skip-link{position:fixed;left:12px;top:-100px;z-index:9999;padding:12px 18px;background:#fff8e7;color:#1d3028;border:2px solid #1d3028;font-weight:700}
.skip-link:focus{top:12px}
main :is(.source-result,.data-card,.local-cards article,.base-panel,.weather-layout article,.territory-card) p{text-align:left;hyphens:none}
@media(max-width:760px){main p{text-align:left;hyphens:none;text-wrap:pretty}.atlas-page .atlas-location label,.atlas-page .atlas-layers label{min-height:42px;display:flex;align-items:center;gap:8px}.atlas-page :is(.atlas-location,.atlas-layers) input[type=checkbox]{width:20px;height:20px;flex:none}}
