@charset "UTF-8";
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

:root {
  --brand-primary:   #006393;
  --brand-secondary: #00A9D1;
  --brand-accent:    #2AE0C9;
  --brand-deep:      #004D74;
  --bg:              #0B1620;
  --surface:         #11202C;
  --elevated:        #16293A;
  --border:          #1F3447;
  --text:            #E8EEF5;
  --muted:           #8A9AAE;
  --font-sans:       'Sora', system-ui, -apple-system, sans-serif;
  --font-mono:       'JetBrains Mono', ui-monospace, monospace;
  --panel-w:         380px;
  --radius:          10px;
}

:root[data-theme="light"],
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg:           #EEF4FA;
  --surface:      #FFFFFF;
  --elevated:     #F4F8FC;
  --border:       #C8D8E8;
  --text:         #0B1620;
  --muted:        #4A6480;
}}

:root[data-theme="light"] {
  --bg:           #EEF4FA;
  --surface:      #FFFFFF;
  --elevated:     #F4F8FC;
  --border:       #C8D8E8;
  --text:         #0B1620;
  --muted:        #4A6480;
}

body {
  display: grid;
  grid-template-columns: var(--panel-w) 1fr;
  grid-template-rows: 100vh;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
}

/* ── Panel ── */
.panel {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  overflow-y: auto;
}
.panel-header {
  padding: 28px 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-main {
  flex: 1;
  padding: 48px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.panel-footer {
  padding: 20px 36px 28px;
  border-top: 1px solid var(--border);
}

/* ── Logo ── */
.logo-link { display: inline-block; text-decoration: none; flex-shrink: 0; }
.logo-img  { display: block; height: auto; width: 200px; max-width: 100%; }

/* ── Theme toggle ── */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--brand-secondary); color: var(--brand-secondary); }
.theme-toggle:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun  { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}

/* ── Eyebrow ── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--brand-accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ── Headline ── */
.headline {
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 18px;
}
.headline span {
  background: linear-gradient(135deg, #00A9D1, #2AE0C9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Body text ── */
.body-text {
  font-size: .825rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 36px;
}

/* ── CTA ── */
.cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  background: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  font-family: var(--font-sans);
  line-height: inherit;
  transition: background .18s ease;
}
.cta:hover, .cta:focus-visible { background: var(--brand-deep); outline: none; }
.cta:focus-visible { box-shadow: 0 0 0 3px rgba(0,169,209,.4); }
.cta-arrow { font-size: .85rem; }

/* ── Footer ── */
.footer-contact {
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
}
.footer-contact a { color: var(--brand-secondary); text-decoration: none; }

.footer-social {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.footer-social a:hover { border-color: var(--brand-secondary); color: var(--brand-secondary); }
.footer-social svg { width: 14px; height: 14px; display: block; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 10px;
}
.footer-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .68rem;
  color: var(--muted);
  padding: 0;
  font-family: var(--font-sans);
}
.footer-link-btn:hover { color: var(--brand-secondary); }

.footer-copy {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ── Map ── */
.map-side { position: relative; background: var(--bg); overflow: hidden; }
#chartdiv { width: 100%; height: 100%; }

/* ── Flags ── */
.flags {
  position: absolute;
  bottom: 20px; right: 20px;
  display: flex;
  gap: 6px;
  z-index: 5;
}
.flag-btn {
  width: 48px; height: 32px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, transform .12s;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}
.flag-btn .fi { width: 100%; height: 100%; background-size: cover; background-position: center; border-radius: 3px; }
.flag-btn:hover { border-color: var(--brand-secondary); transform: translateY(-2px); }
.flag-btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.flag-btn::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .62rem;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s;
}
.flag-btn:hover::after { opacity: 1; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(580px, 92vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  transition: transform .2s;
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: .9rem; font-weight: 600; color: var(--text); }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color .15s;
}
.modal-close:hover { color: var(--text); }
.modal-close svg { width: 16px; height: 16px; display: block; }
.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: .8rem;
  line-height: 1.75;
  color: var(--muted);
}
.modal-body h3 {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 6px;
}
.modal-body h3:first-child { margin-top: 0; }
.modal-body p { margin-bottom: 8px; }
.modal-body a { color: var(--brand-secondary); }

/* ── Responsive ── */
@media (max-width: 800px) {
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 55vw;
    overflow: auto;
    height: auto;
  }
  .panel { overflow: visible; border-right: none; border-bottom: 1px solid var(--border); }
  .panel-main   { padding: 32px 24px 24px; }
  .panel-header { padding: 24px 24px 0; }
  .panel-footer { padding: 16px 24px 24px; }
  .flags { bottom: 10px; right: 10px; }
  .flag-btn { width: 36px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .cta, .flag-btn, .modal, .modal-overlay { transition: none; }
}
