/* ============================================================
   STILFIL – Future Earth Institute
   Design: "Källvatten" + landskapsbild på startsidan och bakom alla sidor.
   ============================================================ */

/* Typsnitt – ligger lokalt i mappen typsnitt/ (inga anrop till Google) */
@font-face{font-family:'Inter';font-style:normal;font-weight:400;font-display:swap;src:url('typsnitt/inter-400.woff') format('woff')}
@font-face{font-family:'Inter';font-style:normal;font-weight:500;font-display:swap;src:url('typsnitt/inter-500.woff') format('woff')}
@font-face{font-family:'Inter';font-style:normal;font-weight:600;font-display:swap;src:url('typsnitt/inter-600.woff') format('woff')}
@font-face{font-family:'Inter';font-style:normal;font-weight:700;font-display:swap;src:url('typsnitt/inter-700.woff') format('woff')}
@font-face{font-family:'Inter Display';font-style:normal;font-weight:600;font-display:swap;src:url('typsnitt/inter-display-600.woff') format('woff')}
@font-face{font-family:'Inter Display';font-style:normal;font-weight:700;font-display:swap;src:url('typsnitt/inter-display-700.woff') format('woff')}

/* Färger */
:root{--bg:#F3F8FB;--mist:#E4F0F6;--ink:#1B2B3A;--water:#0B4F8A;--deep:#073A66;--sky:#2E8BD0;--leaf:#4E9F3D;--leaf2:#8CC63F;--card:#FFFFFF;--muted:#5A6B7B;color-scheme:light;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html,body{margin:0}
body{font-family:'Inter',system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.7;min-height:100vh;min-height:100dvh;display:grid;grid-template-rows:auto 1fr auto}
h1,h2,h3{font-family:'Inter Display','Inter',system-ui,sans-serif;font-weight:700;color:var(--water);letter-spacing:-.3px}

/* ---------- Sidhuvud: logga till vänster, språk + meny till höger ---------- */
header{background:var(--card);padding:calc(12px + var(--safe-top)) clamp(18px,4vw,48px) 12px;display:flex;align-items:stretch;gap:20px;box-shadow:0 1px 0 #DCEAF2;position:relative;z-index:2}
.logo{display:block;width:150px;height:auto;align-self:center;flex:none}
.right{flex:1;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:8px;min-width:0}
.lang{align-self:flex-end;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.lang button{font-family:inherit;font-size:12px;letter-spacing:1px;font-weight:500;color:var(--water);background:var(--mist);border:0;border-radius:999px;padding:6px 12px;cursor:pointer;transition:.18s}
.lang button:hover{background:#D3E6F1}
.lang button.active{color:#fff;background:linear-gradient(135deg,var(--sky),var(--water))}
nav{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:2px 6px}
nav a{text-decoration:none;color:var(--deep);font-size:14.5px;font-weight:500;padding:7px 14px;border-radius:999px;transition:.18s}
nav a:hover{background:var(--mist)}
nav a.active{background:var(--mist);color:var(--water);box-shadow:inset 0 -2px 0 var(--leaf)}

main{position:relative;overflow:hidden;display:flex;flex-direction:column}
main>*{flex:1 0 auto}

/* ---------- Startsida: stor landskapsbild med 3D-text ---------- */
.photo{position:relative;min-height:520px;background:url('bilder/bakgrund.webp') center/cover no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;padding:28px 24px 36px}
.hero-text{max-width:1040px;padding:18px 24px}
.hero-text h1{margin:0 0 18px;white-space:pre-line;color:#fff;font-weight:600;letter-spacing:.3px;line-height:1.22;font-size:clamp(30px,3.6vw,50px);
  text-shadow:-3px -1px 0 #073A66,-3px 0px 0 #073A66,-3px 1px 0 #073A66,-2px -2px 0 #073A66,-2px -1px 0 #073A66,-2px 0px 0 #073A66,-2px 1px 0 #073A66,-2px 2px 0 #073A66,-1px -3px 0 #073A66,-1px -2px 0 #073A66,-1px -1px 0 #073A66,-1px 0px 0 #073A66,-1px 1px 0 #073A66,-1px 2px 0 #073A66,-1px 3px 0 #073A66,0px -3px 0 #073A66,0px -2px 0 #073A66,0px -1px 0 #073A66,0px 1px 0 #073A66,0px 2px 0 #073A66,0px 3px 0 #073A66,1px -3px 0 #073A66,1px -2px 0 #073A66,1px -1px 0 #073A66,1px 0px 0 #073A66,1px 1px 0 #073A66,1px 2px 0 #073A66,1px 3px 0 #073A66,2px -2px 0 #073A66,2px -1px 0 #073A66,2px 0px 0 #073A66,2px 1px 0 #073A66,2px 2px 0 #073A66,3px -1px 0 #073A66,3px 0px 0 #073A66,3px 1px 0 #073A66,
  1px 1px 0 rgb(10,57,102),2px 2px 0 rgb(9,54,97),3px 3px 0 rgb(8,51,92),4px 4px 0 rgb(8,48,87),5px 5px 0 rgb(7,44,82),6px 6px 0 rgb(6,41,77),7px 7px 0 rgb(5,38,72),8px 8px 0 rgb(5,35,67),9px 9px 0 rgb(4,31,62),10px 10px 0 rgb(3,28,57),11px 11px 0 rgb(2,25,52),12px 12px 0 rgb(2,22,48),16px 18px 28px rgba(0,10,25,.65)}
.hero-text p{margin:0;white-space:pre-line;color:#fff;font-weight:700;letter-spacing:1px;word-spacing:3px;font-size:clamp(16px,1.7vw,21px);
  text-shadow:-3px -1px 0 #073A66,-3px 0px 0 #073A66,-3px 1px 0 #073A66,-2px -2px 0 #073A66,-2px -1px 0 #073A66,-2px 0px 0 #073A66,-2px 1px 0 #073A66,-2px 2px 0 #073A66,-1px -3px 0 #073A66,-1px -2px 0 #073A66,-1px -1px 0 #073A66,-1px 0px 0 #073A66,-1px 1px 0 #073A66,-1px 2px 0 #073A66,-1px 3px 0 #073A66,0px -3px 0 #073A66,0px -2px 0 #073A66,0px -1px 0 #073A66,0px 1px 0 #073A66,0px 2px 0 #073A66,0px 3px 0 #073A66,1px -3px 0 #073A66,1px -2px 0 #073A66,1px -1px 0 #073A66,1px 0px 0 #073A66,1px 1px 0 #073A66,1px 2px 0 #073A66,1px 3px 0 #073A66,2px -2px 0 #073A66,2px -1px 0 #073A66,2px 0px 0 #073A66,2px 1px 0 #073A66,2px 2px 0 #073A66,3px -1px 0 #073A66,3px 0px 0 #073A66,3px 1px 0 #073A66,
  1px 1px 0 rgb(9,54,97),2px 2px 0 rgb(8,48,87),3px 3px 0 rgb(6,41,77),4px 4px 0 rgb(5,35,67),5px 5px 0 rgb(3,28,57),6px 6px 0 rgb(2,22,48),8px 9px 16px rgba(0,10,25,.65)}

/* ---------- Innehållssidor: landskapsbilden bakom, halvgenomskinlig ruta ---------- */
.page{position:relative;padding:0 clamp(18px,5vw,40px) 80px;background:url('bilder/bakgrund.webp') center/cover no-repeat}
.pagetop{height:80px}
.panel{position:relative;z-index:1;max-width:860px;margin:0 auto;background:rgba(255,255,255,.68);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border-radius:22px;padding:clamp(26px,4vw,52px);box-shadow:0 18px 50px rgba(0,20,45,.35);overflow:hidden}
.panel::before{content:'';position:absolute;left:0;right:0;top:0;height:6px;background:linear-gradient(90deg,var(--sky),var(--leaf2))}
.kicker{font-size:12.5px;letter-spacing:3px;text-transform:uppercase;color:#3B7F2D;font-weight:700}
.panel h1{margin:0 0 10px;font-size:clamp(28px,3vw,40px);line-height:1.2}
.panel h2{font-size:1.3rem;margin:1.6rem 0 .4rem}
.panel p{margin:0 0 1rem;font-size:17.5px;font-weight:500;color:#13212E}
.panel a{color:var(--water)}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:26px}
.tile{background:rgba(228,240,246,.6);border-radius:16px;padding:18px}
.tile b{display:block;color:var(--water);font-family:'Inter Display','Inter',sans-serif;font-weight:700;font-size:17px;margin:8px 0 2px}
.tile span{font-size:15px;font-weight:500;color:#26384A;line-height:1.5;display:block}
.ico{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#fff}
.details{margin-top:1.3rem;padding-top:1.2rem;border-top:1px solid rgba(7,58,102,.18);font-size:1.05rem;font-weight:500;color:#26384A;line-height:2}
.details b{color:var(--deep);font-weight:700}
.details a{color:var(--water);text-decoration:none}
.details a:hover{text-decoration:underline}

/* ---------- Sidfot ---------- */
footer{background:var(--deep);color:#CFE3F2;padding:26px clamp(18px,4vw,48px) calc(26px + var(--safe-bottom));display:flex;gap:10px 24px;flex-wrap:wrap;align-items:center;font-size:14px}
footer .fl{font-family:'Inter Display','Inter',sans-serif;font-weight:700;color:#fff}
footer .legal{margin-left:auto}
footer .legal a{color:#fff;text-decoration:none}
footer .legal a:hover{text-decoration:underline}
footer .sep{margin:0 8px;opacity:.6}

/* ---------- Mobil ---------- */
@media (max-width:600px){
  header{gap:14px}
  .logo{width:96px}
  nav{gap:2px}
  nav a{font-size:12.5px;padding:5px 9px}
  .lang button{font-size:11px;padding:5px 9px}
  .hero-text p{white-space:normal}
  .photo{min-height:480px;background-image:url('bilder/bakgrund-mobil.webp');background-position:30% center}
  .page{background-image:url('bilder/bakgrund-mobil.webp')}
  .panel p{font-size:16.5px}
  .grid{grid-template-columns:1fr}
  .pagetop{height:40px}
}
