/* eSALBAR React site — layered on top of app_info.css */

:root { --red: #e85f50; --green: #28a578; --surface: #fff; --surface-2: #f4f8fc; --header-bg: rgba(255,255,255,.94); }

body { transition: background-color .3s ease, color .3s ease; }
button { font: inherit; color: inherit; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 3000; padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
.page-enter { animation: pageIn .45s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* Scroll progress + offline */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; height: 3px; transform-origin: 0 50%; background: linear-gradient(90deg, #237ec8, #4fb3ff, var(--red)); }
.offline-banner { position: sticky; top: 0; z-index: 1500; padding: 10px 18px; color: #fff; background: #b4372b; font-size: .85rem; font-weight: 700; text-align: center; }
.offline-banner a { color: #fff; }

/* Header */
.site-header { background: var(--header-bg); }
.nav-link.is-active { color: var(--blue); }
.nav-dropdown__toggle { padding: 0; border: 0; background: none; cursor: pointer; }
.nav-dropdown__toggle::after { content: "▾"; margin-left: 6px; font-size: .72em; }
.nav-dropdown__menu { animation: pop .16s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.icon-btn { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: #485c75; font-size: 1.05rem; cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.icon-btn:hover { transform: translateY(-1px); border-color: var(--blue); }
.mobile-nav__toggle.is-open .menu-icon { background: transparent; }
.mobile-nav__toggle.is-open .menu-icon::before { top: 0; transform: rotate(45deg); }
.mobile-nav__toggle.is-open .menu-icon::after { top: 0; transform: rotate(-45deg); }
.mobile-nav__panel { animation: pop .16s ease both; }
.mobile-nav__label { padding: 10px 12px 4px; color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.mobile-nav__panel > a.mobile-nav__sub { padding-left: 22px; }

/* Buttons used as links */
.link-btn { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.site-footer__links .link-btn { font-size: .78rem; text-decoration: none; color: inherit; }
.site-footer__links .link-btn:hover { color: var(--blue); }

/* Hero */
.hero__accent { background: linear-gradient(100deg, #176fbd, #0d54a5 45%, #e85f50); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Mascot position — same geometry as the desktop layout (app_info.css) on every screen size:
   mascot top -85px, centred, card translateY(40px) rotate(2deg). Only the size shrinks on small phones. */
.hero__stage { display: contents; }
@media (max-width: 640px) {
  .hero__visual { min-height: 0; padding: 110px 0 60px; }
  .hero__visual .visual-card { width: min(92%, 380px); transform: translateY(40px) rotate(2deg); }
  .hero__visual .hero__mascot { top: 25px; left: 50%; width: 155px; height: 155px; transform: translateX(-50%); }
}
@media (max-width: 420px) {
  .hero__visual { padding-top: 90px; }
  .hero__visual .hero__mascot { top: 25px; width: 130px; height: 130px; }
}
.pulse-dot { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(40,165,120,.55); } 100% { box-shadow: 0 0 0 10px rgba(40,165,120,0); } }
.visual-card[data-stage="0"] .pulse-dot { background: var(--red); animation-name: pulseRed; }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 rgba(232,95,80,.55); } 100% { box-shadow: 0 0 0 10px rgba(232,95,80,0); } }
.map-pin--two { transition: top 1.2s ease, left 1.2s ease; top: 72%; left: 78%; }
.map-pin--two.is-moving { top: 52%; left: 52%; }
.map-route { opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity .3s, clip-path 1.2s ease; }
.map-route.is-drawn { opacity: 1; clip-path: inset(0 0 0 0); }
.status-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.status-track span { height: 5px; border-radius: 4px; background: #e1e9f2; transition: background .4s ease; }
.status-track span.is-done { background: var(--blue); }
.status-icon { transition: background .3s, color .3s; color: var(--blue-dark); background: #e2effb; font-size: .8rem; }
.status-icon.is-complete { color: #137c58; background: #dcf4e9; }

/* Incident chips */
.incident-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; }
.incident-strip__label { margin-right: 4px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.incident-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 700; transition: transform .15s, border-color .15s; }
.incident-chip:hover { transform: translateY(-2px); border-color: var(--blue); }

/* Interactive steps */
.steps::before { content: ""; position: absolute; top: 20px; left: 30px; right: 30px; height: 2px; background: linear-gradient(90deg, var(--blue) var(--progress), #c9dbec var(--progress)); transition: background .5s; }
.step:not(:last-child)::after { display: none; }
.step__btn { width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.step__btn h3, .step__btn p { transition: color .3s; }
.step__number { position: relative; transition: transform .3s ease, background .3s ease, box-shadow .3s ease; background: #9db8d1; }
.step.is-done .step__number, .step.is-active .step__number { background: var(--blue); }
.step.is-active .step__number { transform: scale(1.18); box-shadow: 0 0 0 1px var(--blue), 0 0 0 8px rgba(23,111,189,.15); }
.step:not(.is-active) .step__btn p { opacity: .75; }
.step.is-active h3 { color: var(--blue-dark); }
.step__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; border-radius: 8px; }

/* Feature cards */
.feature { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .7s ease; }
.feature.reveal.is-in:hover { transform: translateY(-5px); border-color: #bcd6ee; box-shadow: 0 16px 34px rgba(22,49,76,.1); }
.feature:hover .feature__icon { color: #fff; background: var(--blue); }
.feature__icon { transition: background .25s, color .25s; }

/* FAQ */
.faq-section { padding-top: 80px; padding-bottom: 80px; }
.faq { max-width: 780px; margin: 0 auto; }
.faq__search { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.faq__search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,111,189,.12); }
.faq__search span { color: var(--muted); font-size: 1.2rem; }
.faq__search input { flex: 1; min-height: 52px; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: .95rem; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; border: 0; background: none; font-size: 1rem; font-weight: 750; text-align: left; cursor: pointer; }
.faq__q:hover { color: var(--blue); }
.faq__chev { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-dark); background: #e9f3fc; font-size: 1.1rem; transition: transform .3s ease; }
.faq__item.is-open .faq__chev { transform: rotate(45deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { margin: 0 0 18px; color: var(--muted); line-height: 1.7; }
.faq__empty { color: var(--muted); text-align: center; }

/* Preparedness */
.prepare-section { padding: 76px 0; background: var(--surface-2); }
.prepare-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: start; }
.prepare-layout h2 { margin: 0; font-size: clamp(1.75rem, 3.5vw, 2.55rem); letter-spacing: -.035em; line-height: 1.14; }
.prepare-lead { color: var(--muted); line-height: 1.65; }
.progress-ring { --pct: 0; width: 170px; height: 170px; margin: 24px 0 14px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--pct) * 1%), #dbe6f0 0); transition: background .4s; }
.progress-ring > span { width: 136px; height: 136px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--surface-2); }
.progress-ring strong { font-size: 2rem; letter-spacing: -.03em; }
.progress-ring small { color: var(--muted); font-size: .75rem; font-weight: 700; }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checklist label { position: relative; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .88rem; font-weight: 650; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.checklist label:hover { transform: translateY(-2px); border-color: #bcd6ee; }
.checklist input { position: absolute; opacity: 0; pointer-events: none; }
.checklist .checkbox { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border: 2px solid #b8cbdd; border-radius: 7px; color: transparent; font-size: .8rem; font-weight: 900; transition: all .2s ease; }
.checklist label.is-done { border-color: #a9e0c8; background: #effaf5; }
.checklist label.is-done .checkbox { color: #fff; border-color: var(--green); background: var(--green); transform: scale(1.08); }
.checklist input:focus-visible + .checkbox { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Footer */
.site-footer__links { align-items: center; }

/* Back to top with progress ring */
.back-to-top { right: 24px; bottom: 24px; opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity .25s, transform .25s; font-size: 1.2rem; font-weight: 900; }
.back-to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.back-to-top .ring-bg { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 3; }
.back-to-top .ring-fg { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.back-to-top span { position: relative; }
.back-to-top .back-to-top__icon { position: relative; width: 24px; height: 24px; object-fit: contain; }

/* Hotline FAB + drawer */
.hotline-fab { position: fixed; left: 24px; bottom: 24px; z-index: 1100; min-height: 48px; padding: 0 20px 0 16px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #ef6a5b, #c8392b); box-shadow: 0 10px 26px rgba(200,57,43,.35); font-weight: 800; cursor: pointer; transition: transform .18s; }
.hotline-fab:hover { transform: translateY(-3px); }
.hotline-fab__pulse { position: absolute; inset: 0; border-radius: inherit; animation: fabPulse 2.2s ease-out infinite; }
@keyframes fabPulse { 0% { box-shadow: 0 0 0 0 rgba(239,106,91,.55); } 100% { box-shadow: 0 0 0 16px rgba(239,106,91,0); } }
.drawer-backdrop { position: fixed; inset: 0; z-index: 2100; background: rgba(10,20,34,.45); opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(2px); }
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 2200; width: min(420px, 100%); padding: 26px; overflow-y: auto; background: var(--surface); box-shadow: -20px 0 50px rgba(10,20,34,.25); transform: translateX(105%); transition: transform .32s cubic-bezier(.2,.7,.2,1); visibility: hidden; }
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.drawer__head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.02em; }
.hotline-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hotline-list li { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.hotline-list strong, .hotline-list small { display: block; }
.hotline-list small { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.hotline-number { display: block; margin-top: 8px; font-size: 1.35rem; font-weight: 850; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.hotline-actions { display: flex; gap: 8px; }
.hotline-actions .button { flex: 1; cursor: pointer; }
.drawer__note { margin-top: 18px; color: var(--muted); font-size: .82rem; line-height: 1.55; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 90px; z-index: 3000; padding: 12px 18px; border-radius: 10px; color: #fff; background: #172a40; font-size: .88rem; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .25s, transform .25s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Sub pages */
.page-section { padding-top: 52px; padding-bottom: 80px; min-height: 60vh; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.035em; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.segmented button { min-width: 96px; min-height: 38px; border: 0; border-radius: 9px; background: none; font-weight: 750; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.segmented button.is-active { color: var(--blue-dark); background: var(--surface); box-shadow: 0 2px 8px rgba(22,36,58,.1); }
.infographic { margin: 0; }
.infographic__img { position: relative; width: 100%; display: block; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: zoom-in; box-shadow: 0 14px 40px rgba(22,49,76,.12); }
.infographic__img img { display: block; width: 100%; height: auto; animation: pageIn .4s ease both; }
.infographic__hint { position: absolute; right: 14px; bottom: 14px; padding: 7px 12px; border-radius: 999px; color: #fff; background: rgba(23,42,64,.8); font-size: .75rem; font-weight: 700; opacity: 0; transition: opacity .2s; }
.infographic__img:hover .infographic__hint { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 2500; padding: 24px; overflow: auto; display: grid; place-items: start center; background: rgba(8,14,24,.9); cursor: zoom-out; animation: pageIn .2s ease both; }
.lightbox img { max-width: min(1400px, 100%); height: auto; border-radius: 8px; cursor: default; }
.lightbox__close { position: fixed; top: 16px; right: 16px; color: #fff; background: rgba(255,255,255,.12); border-color: transparent; }

.legal-layout { display: grid; grid-template-columns: 1fr 240px; gap: 40px; align-items: start; }
.legal-article { max-width: 760px; }
.legal-article h1 { margin: 0 0 18px; font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.035em; }
.legal-article h2 { margin: 30px 0 8px; color: var(--blue-dark); font-size: 1.1rem; }
.legal-article p, .legal-article li { color: #445870; line-height: 1.75; }
.legal-article ul, .legal-article ol { padding-left: 1.3rem; }
.legal-back { display: inline-block; margin-top: 26px; color: var(--blue); font-weight: 800; text-decoration: none; }
.legal-aside { position: sticky; top: 100px; display: grid; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.legal-aside__title { margin: 0 0 6px; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.legal-aside a { padding: 8px 10px; border-radius: 8px; font-size: .9rem; font-weight: 700; text-decoration: none; }
.legal-aside a:hover { color: var(--blue); background: var(--surface); }
.legal-aside .button { margin-top: 10px; border: 0; cursor: pointer; }
.not-found { text-align: center; }
.not-found img { width: 140px; animation: float2 4s ease-in-out infinite; }
@keyframes float2 { 50% { transform: translateY(-8px); } }
.not-found p { color: var(--muted); margin-bottom: 22px; }

@media (max-width: 850px) {
  .steps::before { display: none; }
  .prepare-layout { grid-template-columns: 1fr; gap: 26px; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-aside { position: static; }
}
@media (max-width: 640px) {
  .header-actions > .icon-btn { width: 38px; height: 38px; flex-basis: 38px; }
  .checklist { grid-template-columns: 1fr; }
  .hotline-fab { left: 16px; bottom: 16px; }
  .back-to-top { right: 16px; bottom: 16px; }
  .faq-section, .prepare-section { padding-top: 56px; padding-bottom: 56px; }
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --ink: #e6eef8; --muted: #9db0c6; --blue: #5aa9ef; --blue-dark: #8cc6ff; --pale: #1a2a3e; --line: #263a52; --white: #0e1826;
  --surface: #13202f; --surface-2: #0f1b29; --header-bg: rgba(14,24,38,.9);
  color-scheme: dark;
}
[data-theme="dark"] body { background: #0e1826; }
[data-theme="dark"] .site-header { border-bottom-color: var(--line); }
[data-theme="dark"] .nav-link, [data-theme="dark"] .icon-btn { color: #c3d2e3; }
[data-theme="dark"] .nav-dropdown__menu, [data-theme="dark"] .mobile-nav__panel { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .nav-dropdown__menu a, [data-theme="dark"] .mobile-nav__panel > a { color: #c3d2e3; }
[data-theme="dark"] .menu-icon, [data-theme="dark"] .menu-icon::before, [data-theme="dark"] .menu-icon::after { background: #c3d2e3; }
[data-theme="dark"] .mobile-nav__toggle.is-open .menu-icon { background: transparent; }
[data-theme="dark"] .brand__mark { background: #1a2a3e; }
[data-theme="dark"] .hero { background: radial-gradient(ellipse at 80% 16%, rgba(90,169,239,.18), transparent 40%), linear-gradient(115deg, #0f1c2c 0%, #12253a 52%, #16304b 100%); }
[data-theme="dark"] .hero__lead, [data-theme="dark"] .hero__note { color: var(--muted); }
[data-theme="dark"] .hero__accent { background-image: linear-gradient(100deg, #8cc6ff, #5aa9ef 45%, #ff8a7c); }
[data-theme="dark"] .visual-card { background: rgba(19,32,47,.95); border-color: var(--line); }
[data-theme="dark"] .visual-card__status { background: #0f1b29; }
[data-theme="dark"] .visual-card__map { background-color: #1b2e26; filter: brightness(.85); }
[data-theme="dark"] .status-track span { background: #263a52; }
[data-theme="dark"] .button--light { color: #e6eef8; background: #1d3049; }
[data-theme="dark"] .button--outline { color: #8cc6ff; border-color: #2f4a68; background: transparent; }
[data-theme="dark"] .audience-card, [data-theme="dark"] .feature, [data-theme="dark"] .incident-chip { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .audience-card--public { background: linear-gradient(145deg, #13202f, #152a40); }
[data-theme="dark"] .workflow-section { background: var(--surface-2); }
[data-theme="dark"] .step__number { border-color: var(--surface-2); }
[data-theme="dark"] .feature__icon, [data-theme="dark"] .faq__chev { background: #1a2e45; }
[data-theme="dark"] .dashboard-section { background: #0a1320; }
[data-theme="dark"] .download-card { background: linear-gradient(115deg, #13253a, #13202f); border-color: var(--line); }
[data-theme="dark"] .checklist label.is-done { background: #12291f; border-color: #1f5a41; }
[data-theme="dark"] .progress-ring { background: conic-gradient(var(--green) calc(var(--pct) * 1%), #263a52 0); }
[data-theme="dark"] .legal-article p, [data-theme="dark"] .legal-article li { color: #b7c7d9; }
[data-theme="dark"] .workflow-showreel { border-color: var(--line); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .pulse-dot, .hotline-fab__pulse, .page-enter, .not-found img { animation: none !important; }
}

/* Keep section headings clear of the sticky header when jumping to them */
#faq, #prepare { scroll-margin-top: 96px; }

/* Label above the tutorial video */
.video-heading { width: min(100%, 960px); margin: 60px auto 0; text-align: center; }
.video-heading .eyebrow { margin-bottom: 6px; }
.video-heading h3 { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.75rem); letter-spacing: -.02em; }
.video-heading + .workflow-showreel { margin-top: 22px; }
@media (max-width: 640px) { .video-heading { margin-top: 42px; } }
