:root{
    --bg:#060d1c;
    --bg-2:#0a1428;
    --surface:#0f1d38;
    --surface-2:#152741;
    --blue:#1c3f75;
    --blue-light:#3a6bb0;
    --cyan:#4fd1c5;
    --cyan-dim:#2c6e68;
    --cyan-tint:#b9ede6;
    --platinum:#d7deea;
    --platinum-dim:#5b6478;
    --platinum-tint:#eef1f6;
    --accent:var(--cyan);
    --accent-dim:var(--cyan-dim);
    --text:#f4f6fa;
    --text-muted:#8a9ab8;
    --text-faint:#526080;
    --border:rgba(255,255,255,0.08);
    --border-strong:rgba(255,255,255,0.14);
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html,body{height:100%;}
  body{
    background:var(--bg);
    color:var(--text);
    font-family:'Manrope',sans-serif;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
    min-height:100vh;
    min-height:100dvh;
  }
  .display{font-family:'Space Grotesk',sans-serif;}
  body.sector-energy{ --accent:var(--cyan); --accent-dim:var(--cyan-dim); }
  body.sector-datacenter{ --accent:var(--platinum); --accent-dim:var(--platinum-dim); }
  .mono{font-family:'JetBrains Mono',monospace;}
  #app{position:relative; min-height:100vh; min-height:100dvh;}

  /* ---------- SPLASH ---------- */
  #splash{
    position:fixed; inset:0; z-index:100;
    display:flex; align-items:center; justify-content:center;
    background:
      radial-gradient(ellipse 600px 400px at 50% 42%, rgba(58,107,176,.3), transparent 60%),
      var(--bg);
    transition:opacity .55s ease, visibility .55s ease;
  }
  #splash.hide{ opacity:0; visibility:hidden; pointer-events:none; }
  .splash-logo{
    height:50px; width:auto; opacity:0;
    filter:drop-shadow(0 0 26px rgba(79,209,197,.28));
    animation:splashIn 1s cubic-bezier(.2,.8,.25,1) forwards;
  }
  @keyframes splashIn{
    0%{ opacity:0; transform:scale(.92) translateY(6px); }
    65%{ opacity:1; transform:scale(1.015) translateY(0); }
    100%{ opacity:1; transform:scale(1) translateY(0); }
  }
  @media (prefers-reduced-motion: reduce){
    .splash-logo{ animation:none; opacity:1; }
    #splash{ transition:none; }
  }

  /* ---------- shared ---------- */
  .eyebrow{
    font-family:'JetBrains Mono',monospace;
    font-size:10.5px; letter-spacing:.14em; text-transform:uppercase;
    color:var(--text-faint); font-weight:500;
  }
  button{font-family:inherit; cursor:pointer; border:none; background:none; color:inherit;}

  /* ---------- SCREEN 1 : SECTOR SELECT ---------- */
  #screen-select{
    min-height:100vh; min-height:100dvh;
    display:flex; flex-direction:column;
    padding:28px 22px 34px;
    position:relative;
    background:
      radial-gradient(ellipse 600px 400px at 50% -10%, rgba(58,107,176,.28), transparent 60%),
      var(--bg);
  }
  .bg-grid{
    position:absolute; inset:0; opacity:.35; pointer-events:none;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 500px 500px at 50% 20%, black, transparent 75%);
  }
  .select-header{ text-align:center; margin-bottom:auto; padding-top:10px; position:relative; z-index:1;}
  .logo-full{ height:44px; width:auto; opacity:.96; }

  .select-title-wrap{ text-align:center; margin:52px 0 40px; position:relative; z-index:1; }
  .select-title-wrap .eyebrow{ margin-bottom:10px; }
  .select-title{
    font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:21px; line-height:1.3;
    letter-spacing:-.005em; color:var(--text);
  }
  .select-title em{ font-style:normal; font-weight:600; color:var(--text); }
  .select-sub{ margin-top:12px; font-size:13.5px; color:var(--text-muted); line-height:1.5; }

  .sector-stack{ display:flex; flex-direction:column; gap:14px; position:relative; z-index:1; }
  .sector-card{
    position:relative; text-align:left; border-radius:16px; padding:22px 20px;
    background:linear-gradient(155deg, var(--surface), var(--bg-2));
    border:1px solid var(--border);
    display:flex; align-items:center; gap:16px;
    transition:transform .18s ease, border-color .18s ease, background .18s ease;
    overflow:hidden;
  }
  .sector-card:active{ transform:scale(.98); }
  .sector-card::before{
    content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  }
  .sector-card.energy{ --accent:var(--cyan); --accent-dim:var(--cyan-dim); border-color:rgba(79,209,197,.18); }
  .sector-card.datacenter{ --accent:var(--platinum); --accent-dim:var(--platinum-dim); border-color:rgba(215,222,234,.18); }
  .sector-card.energy::before,
  .sector-card.datacenter::before{ background:linear-gradient(180deg,var(--accent),var(--accent-dim)); }
  .sector-icon{
    flex:0 0 auto; width:48px; height:48px; border-radius:12px;
    display:flex; align-items:center; justify-content:center;
  }
  .sector-card.energy .sector-icon{ background:rgba(79,209,197,.12); }
  .sector-card.datacenter .sector-icon{ background:rgba(215,222,234,.12); }
  .sector-icon svg{ width:24px; height:24px; }
  .sector-text .sector-name{
    font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:17px; letter-spacing:0; margin-bottom:3px;
  }
  .sector-card.energy .sector-name{ color:var(--cyan-tint); }
  .sector-card.datacenter .sector-name{ color:var(--platinum-tint); }
  .sector-text .sector-desc{ font-size:12.5px; color:var(--text-muted); line-height:1.4; }
  .sector-count{
    margin-left:auto; flex:0 0 auto; text-align:right; align-self:center;
  }
  .sector-count .n{ font-family:'JetBrains Mono',monospace; font-size:21px; font-weight:600; display:block; color:var(--text); }
  .sector-count .l{ font-family:'JetBrains Mono',monospace; font-size:9px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-faint); }

  .select-footer{ margin-top:34px; position:relative; z-index:1; }
  .footer-grid{
    display:flex; flex-direction:column; gap:16px;
    padding-top:18px; border-top:1px solid var(--border); text-align:center;
  }
  .footer-label{
    font-family:'JetBrains Mono',monospace; font-size:9px; letter-spacing:.12em;
    text-transform:uppercase; color:var(--text-faint); margin-bottom:5px;
  }
  .footer-text{ font-size:11.5px; color:var(--text-muted); line-height:1.65; }
  .footer-contacts{ display:flex; flex-direction:column; gap:8px; align-items:center; }
  .footer-link{
    font-size:12.5px; color:var(--text); text-decoration:none; font-weight:600;
    display:inline-flex; align-items:center; gap:6px; letter-spacing:.01em;
  }
  .footer-link:active{ opacity:.7; }
  .footer-whatsapp{ color:var(--accent); }
  .footer-whatsapp svg{ width:15px; height:15px; flex:0 0 auto; }

  /* ---------- SCREEN 2 : MAP ---------- */
  #screen-map{
    position:fixed; inset:0; display:flex; flex-direction:column;
    opacity:0; pointer-events:none; transform:translateY(14px);
    transition:opacity .32s ease, transform .32s ease;
  }
  body.on-map #screen-map{ opacity:1; pointer-events:auto; transform:none; }
  body.on-map #screen-select{ display:none; }

  .topbar{
    flex:0 0 auto; display:flex; align-items:center; gap:10px;
    padding:16px 16px 14px; border-bottom:1px solid var(--border);
    background:rgba(6,13,28,.9); backdrop-filter:blur(10px);
    position:relative; z-index:5;
  }
  .topbar .logo-mini{ height:22px; width:auto; opacity:.97; }
  .topbar .divider{ width:1px; height:18px; background:var(--border-strong); margin:0 2px; }
  .topbar .sector-chip{ display:flex; align-items:center; gap:8px; }
  .sector-chip .dot{ flex:0 0 auto; width:3px; height:15px; border-radius:1.5px; }
  .sector-chip.energy .dot,
  .sector-chip.datacenter .dot{ background:var(--accent); box-shadow:0 0 8px var(--accent); }
  .sector-chip .label{ font-family:'Space Grotesk',sans-serif; font-size:13px; font-weight:600; letter-spacing:0; line-height:1.15; }
  .topbar .spacer{ flex:1; }
  .btn-switch{
    display:flex; align-items:center; gap:5px; padding:8px 12px; border-radius:8px;
    background:var(--surface-2); border:1px solid var(--border-strong);
    font-family:'JetBrains Mono',monospace; font-size:10.5px; font-weight:500; letter-spacing:.02em;
    color:var(--text-muted); white-space:nowrap; text-transform:uppercase;
  }
  .btn-switch:active{ background:var(--surface); }
  .btn-switch svg{ width:13px; height:13px; }

  .map-stage{ flex:1; position:relative; overflow:hidden; }
  .map-stage .radial{
    position:absolute; inset:0;
    background:radial-gradient(ellipse 480px 480px at 50% 42%, rgba(58,107,176,.22), transparent 65%);
  }
  .map-stage svg.brmap{ position:absolute; inset:0; width:100%; height:100%; }

  .map-hint{
    flex:0 0 auto; text-align:center; padding:10px 24px 4px;
    font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.04em;
    color:var(--text-faint);
  }

  .insights-bar{
    flex:0 0 auto; display:flex; justify-content:center;
    padding:14px 20px calc(30px + env(safe-area-inset-bottom, 0px));
    border-top:1px solid var(--border);
    background:rgba(6,13,28,.5); backdrop-filter:blur(8px);
  }
  .btn-insights{
    width:100%; max-width:460px; margin:0 auto;
    display:flex; align-items:center; justify-content:space-between; gap:14px;
    padding:16px 18px; border-radius:16px; text-align:left;
    background:linear-gradient(155deg, var(--surface), var(--bg-2));
    border:1px solid var(--border-strong); cursor:pointer;
    transition:transform .15s ease, border-color .2s ease;
  }
  .btn-insights:active{ transform:scale(.98); border-color:var(--accent); }
  .btn-insights-text{ display:flex; flex-direction:column; gap:4px; min-width:0; }
  .btn-insights-eyebrow{
    font-family:'JetBrains Mono',monospace; font-size:9.5px; letter-spacing:.1em;
    text-transform:uppercase; color:var(--accent);
  }
  .btn-insights-label{
    font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:13.5px; color:var(--text);
    line-height:1.32;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
  .btn-insights-cta{
    flex:0 0 auto; display:flex; align-items:center; gap:5px;
    font-family:'JetBrains Mono',monospace; font-size:10px; font-weight:600;
    letter-spacing:.03em; text-transform:uppercase; color:var(--accent); white-space:nowrap;
  }
  .btn-insights-cta svg{ width:13px; height:13px; }

  .scan-stop{ stop-color:var(--accent); }
  .state{
    fill:#132a4d; stroke:#3a6bb0; stroke-opacity:.4; stroke-width:1;
    transition:fill .35s ease, stroke-opacity .35s ease;
    vector-effect:non-scaling-stroke;
  }
  .state.active{ fill:#1c3457; stroke:var(--accent); stroke-opacity:.85; stroke-width:1.4; }
  .pin-group{ transition:opacity .25s ease; }
  .pin-hit{ fill:transparent; }
  .pin-core{ fill:var(--accent); transition:transform .15s ease; }
  .pin-group:active .pin-core{ transform:scale(1.25); }
  .pin-leader{ stroke:var(--accent); stroke-opacity:.5; stroke-width:.6; }
  .pin-label{
    font-family:'JetBrains Mono',monospace; font-size:8px; letter-spacing:.02em;
    fill:var(--text); text-transform:uppercase; opacity:.9; pointer-events:none;
  }
  .pulse{ fill:var(--accent); transform-box:fill-box; transform-origin:center; animation:pulse 2.4s ease-out infinite; }
  @keyframes pulse{
    0%{ transform:scale(1); opacity:.5; }
    70%{ transform:scale(3.2); opacity:0; }
    100%{ transform:scale(3.2); opacity:0; }
  }
  .scanline{
    transform-box:fill-box; transform-origin:center;
    animation:scan 5.5s linear infinite;
  }
  @keyframes scan{
    0%{ opacity:0; transform:translateY(-160px); }
    8%{ opacity:.5; }
    45%{ opacity:.15; }
    55%{ opacity:0; transform:translateY(260px); }
    100%{ opacity:0; transform:translateY(260px); }
  }

  /* ---------- BOTTOM SHEET ---------- */
  .overlay{
    position:fixed; inset:0; background:rgba(3,7,16,.6); backdrop-filter:blur(2px);
    opacity:0; pointer-events:none; transition:opacity .28s ease; z-index:10;
  }
  .overlay.open{ opacity:1; pointer-events:auto; }

  .sheet{
    position:fixed; left:0; right:0; bottom:0; z-index:11;
    background:linear-gradient(180deg, var(--surface), var(--bg-2) 88%);
    border-top:1px solid var(--border-strong);
    border-radius:20px 20px 0 0;
    max-height:82vh; overflow-y:auto;
    transform:translateY(100%);
    transition:transform .32s cubic-bezier(.2,.8,.25,1);
    box-shadow:0 -20px 60px rgba(0,0,0,.5);
  }
  .sheet.open{ transform:translateY(0); }
  .sheet-handle{ display:flex; justify-content:center; padding:10px 0 4px; }
  .sheet-handle span{ width:36px; height:4px; border-radius:2px; background:var(--border-strong); }
  .sheet-close{
    position:absolute; top:14px; right:14px; width:30px; height:30px; border-radius:50%;
    background:rgba(255,255,255,.06); display:flex; align-items:center; justify-content:center; z-index:2;
  }
  .sheet-close svg{ width:14px; height:14px; }
  .sheet-photo{
    width:100%; height:190px; object-fit:cover; display:block;
    -webkit-mask-image:linear-gradient(180deg,#000 75%,transparent);
    mask-image:linear-gradient(180deg,#000 75%,transparent);
  }
  .sheet-body{ padding:2px 22px 30px; margin-top:-28px; position:relative; }
  .sheet-status{
    display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:20px;
    background:rgba(6,13,28,.75); border:1px solid var(--border-strong);
    font-family:'JetBrains Mono',monospace; font-size:10px; font-weight:500;
    letter-spacing:.04em; text-transform:uppercase; margin-bottom:12px; backdrop-filter:blur(6px);
  }
  .sheet-status .dot{ width:6px; height:6px; border-radius:50%; }
  .sheet-status.op .dot{ background:var(--accent); }
  .sheet-status.dev .dot{ background:var(--accent-dim); }
  .sheet-title{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:22px; letter-spacing:-.01em; line-height:1.25; margin-bottom:6px; }
  .sheet-loc{ display:flex; align-items:center; gap:5px; font-size:12.5px; color:var(--text-muted); margin-bottom:16px; }
  .sheet-loc svg{ width:12px; height:12px; opacity:.7; }
  .sheet-desc{ font-size:13.5px; line-height:1.65; color:#c3cee2; margin-bottom:18px; }
  .sheet-tags{ display:flex; flex-wrap:wrap; gap:8px; }
  .tag{
    display:flex; flex-direction:column; padding:9px 13px; border-radius:10px;
    background:var(--surface-2); border:1px solid var(--border); min-width:84px;
  }
  .tag .tv{ font-family:'JetBrains Mono',monospace; font-weight:600; font-size:13.5px; color:var(--text); }
  .tag .tl{ font-family:'JetBrains Mono',monospace; font-size:8.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-faint); margin-top:2px; }

  /* ---------- INSIGHTS SHEET ---------- */
  .insights-sheet{
    position:fixed; left:0; right:0; bottom:0; z-index:11;
    background:linear-gradient(180deg, var(--surface), var(--bg-2) 88%);
    border-top:1px solid var(--border-strong);
    border-radius:20px 20px 0 0;
    max-height:88vh; overflow-y:auto;
    transform:translateY(100%);
    transition:transform .32s cubic-bezier(.2,.8,.25,1);
    box-shadow:0 -20px 60px rgba(0,0,0,.5);
  }
  .insights-sheet.open{ transform:translateY(0); }
  .insights-body{ padding:34px 22px 40px; }

  .ins-eyebrow{ font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); margin-bottom:10px; }
  .ins-title{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:24px; line-height:1.25; letter-spacing:-.01em; margin-bottom:10px; }
  .ins-subtitle{ font-size:13px; line-height:1.65; color:var(--text-muted); margin-bottom:28px; }

  .ins-section{ margin-bottom:28px; padding-top:22px; border-top:1px solid var(--border); }
  .ins-section:first-of-type{ padding-top:0; border-top:none; }
  .ins-h{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:15px; color:var(--text); margin-bottom:10px; }
  .ins-p{ font-size:13px; line-height:1.7; color:#c3cee2; }

  .ins-fundbox{ background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:18px; }
  .ins-fund-name{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:14px; color:var(--text); margin-bottom:2px; }
  .ins-fund-phase{ font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.06em; color:var(--accent); text-transform:uppercase; margin-bottom:14px; }
  .ins-chip-row{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
  .ins-chip{ font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.02em; color:var(--text-muted); background:rgba(255,255,255,.04); border:1px solid var(--border); border-radius:8px; padding:6px 10px; }
  .ins-note{ font-size:11px; color:var(--text-faint); line-height:1.5; font-style:italic; }

  .ins-steps{ display:flex; flex-direction:column; gap:16px; }
  .ins-step{ display:flex; gap:12px; }
  .ins-step-n{
    flex:0 0 auto; width:26px; height:26px; border-radius:50%;
    background:rgba(255,255,255,.05); border:1px solid var(--border-strong);
    display:flex; align-items:center; justify-content:center;
    font-family:'JetBrains Mono',monospace; font-size:11px; color:var(--accent);
  }
  .ins-step-title{ font-weight:600; font-size:13px; color:var(--text); margin-bottom:3px; }
  .ins-step-desc{ font-size:12px; line-height:1.55; color:var(--text-muted); }

  .ins-grid2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
  .ins-why-title{ font-weight:600; font-size:12.5px; color:var(--text); margin-bottom:5px; }
  .ins-why-desc{ font-size:11.5px; line-height:1.55; color:var(--text-muted); }

  .ins-callout{ background:rgba(6,13,28,.6); border:1px solid var(--border-strong); border-radius:14px; padding:18px; }
  .ins-callout-label{ font-family:'JetBrains Mono',monospace; font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-faint); margin-bottom:8px; }
  .ins-callout-text{ font-size:12.5px; line-height:1.65; color:#c3cee2; margin-bottom:10px; }
  .ins-callout-highlight{ font-size:12px; line-height:1.5; color:var(--accent); font-weight:600; border-left:2px solid var(--accent); padding-left:10px; }

  .ins-portfolio{ display:flex; flex-direction:column; gap:10px; }
  .ins-pcard{ background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
  .ins-pcard-top{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:2px; }
  .ins-pcard-name{ font-family:'Space Grotesk',sans-serif; font-weight:600; font-size:13.5px; color:var(--text); }
  .ins-pcard-irr{ font-family:'JetBrains Mono',monospace; font-size:13px; font-weight:600; color:var(--accent); }
  .ins-pcard-type{ font-size:10.5px; color:var(--text-faint); margin-bottom:10px; }
  .ins-pcard-stats{ display:flex; flex-wrap:wrap; gap:14px; }
  .ins-pcard-stat{ font-size:11px; color:var(--text-muted); }
  .ins-pcard-stat b{ display:block; font-family:'JetBrains Mono',monospace; font-size:11.5px; color:var(--text); font-weight:600; }

  .ins-disclaimer{ font-size:10px; line-height:1.6; color:var(--text-faint); margin-top:6px; }

  @media (prefers-reduced-motion: reduce){
    .pulse, .scanline{ animation:none !important; }
  }

  @media (min-width:560px){
    .sheet{ left:50%; right:auto; width:520px; transform:translate(-50%,100%); border-radius:20px 20px 0 0; }
    .sheet.open{ transform:translate(-50%,0); }
    .insights-sheet{ left:50%; right:auto; width:560px; transform:translate(-50%,100%); border-radius:20px 20px 0 0; }
    .insights-sheet.open{ transform:translate(-50%,0); }
    #screen-select{ max-width:460px; margin:0 auto; }
  }