/*
Theme Name: Svenska Exiler
Theme URI: https://www.poe2.se/
Author: Svenska Exiler
Description: Dark, grimy custom theme for Svenska Exiler - a Swedish Path of Exile 2 community site.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: svenska-exiler
*/

:root{
  --bg:            #0b0906;
  --bg-panel:      #161109;
  --bg-panel-2:    #1e1710;
  --ember:         #b0511f;
  --ember-bright:  #e0813d;
  --gold:          #a5895a;
  --gold-dim:      #6e5c3d;
  --text:          #eadfcb;
  --text-muted:    #96897290;
  --text-muted-solid: #a4967a;
  --crack:         rgba(176,81,31,0.4);
  --line:          rgba(165,137,90,0.22);
}

*{box-sizing:border-box; margin:0; padding:0;}

html{scroll-behavior:smooth;}

body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter', sans-serif;
  line-height:1.55;
  overflow-x:hidden;
  position:relative;
}

/* --- grain overlay --- */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:50;
  opacity:0.05;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- vignette --- */
body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:49;
  background:radial-gradient(ellipse at 50% 0%, transparent 40%, rgba(0,0,0,0.55) 100%);
}

a{color:inherit; text-decoration:none;}

h1,h2,h3{
  font-family:'Fraunces', serif;
  font-weight:560;
  letter-spacing:-0.01em;
  color:var(--text);
}

.wrap{
  max-width:1180px;
  margin:0 auto;
  padding:0 40px;
}

:focus-visible{
  outline:2px solid var(--ember-bright);
  outline-offset:3px;
}

/* ---------- NAV ---------- */
nav{
  position:sticky; top:0; z-index:40;
  background:linear-gradient(to bottom, rgba(11,9,6,0.96), rgba(11,9,6,0.86));
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}
nav .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:78px;
}
.logotype{
  font-family:'Fraunces', serif;
  font-weight:680;
  font-size:1.28rem;
  letter-spacing:0.02em;
  display:flex;
  align-items:center;
  gap:10px;
}
.logotype .mark{
  width:9px; height:9px;
  background:var(--ember-bright);
  border-radius:50%;
  box-shadow:0 0 10px 2px rgba(224,129,61,0.7);
  flex-shrink:0;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:11px 22px;
  font-family:'Inter', sans-serif;
  font-size:0.92rem;
  font-weight:500;
  border:1px solid var(--gold-dim);
  background:transparent;
  color:var(--text);
  cursor:pointer;
  transition:border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover{
  border-color:var(--ember-bright);
  box-shadow:0 0 22px -4px rgba(224,129,61,0.55);
}
.btn-solid{
  background:var(--ember);
  border-color:var(--ember);
  color:#0b0906;
  font-weight:600;
}
.btn-solid:hover{
  background:var(--ember-bright);
  border-color:var(--ember-bright);
  color:#0b0906;
}

/* ---------- HERO ---------- */
.hero{
  position:relative;
  padding:118px 0 100px;
  overflow:hidden;
}
.embers{
  position:absolute; inset:0;
  pointer-events:none;
  z-index:0;
}
.ember-particle{
  position:absolute;
  bottom:-10px;
  width:3px; height:3px;
  background:var(--ember-bright);
  border-radius:50%;
  box-shadow:0 0 6px 1px rgba(224,129,61,0.9);
  animation:rise linear infinite;
  opacity:0;
}
@keyframes rise{
  0%{ transform:translate(0,0); opacity:0; }
  8%{ opacity:0.9; }
  90%{ opacity:0.25; }
  100%{ transform:translate(var(--drift,20px), -620px); opacity:0; }
}
@media (prefers-reduced-motion: reduce){
  .ember-particle{ animation:none; display:none; }
}

.hero .wrap{ position:relative; z-index:1; }
.hero-inner{ max-width:680px; }

.eyebrow{
  font-size:0.86rem;
  color:var(--text-muted-solid);
  margin-bottom:22px;
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow .rune{
  width:14px; height:1px;
  background:var(--gold-dim);
  position:relative;
}
.eyebrow .rune::after{
  content:"";
  position:absolute; left:6px; top:-3px;
  width:1px; height:7px;
  background:var(--gold-dim);
  transform:rotate(30deg);
}

.hero h1{
  font-size:clamp(2.6rem, 5.4vw, 4.2rem);
  line-height:1.05;
  margin-bottom:28px;
}
.hero h1 em{
  font-style:italic;
  color:var(--ember-bright);
}

.hero p.lede{
  font-size:1.13rem;
  color:var(--text-muted-solid);
  max-width:52ch;
  margin-bottom:38px;
}

.hero .actions{
  display:flex;
  gap:16px;
  align-items:center;
  flex-wrap:wrap;
}
.link-quiet{
  font-size:0.94rem;
  color:var(--text-muted-solid);
  border-bottom:1px solid var(--gold-dim);
  padding-bottom:2px;
  transition:color .2s ease, border-color .2s ease;
}
.link-quiet:hover{ color:var(--text); border-color:var(--ember-bright); }

/* ---------- CRACK DIVIDER ---------- */
.crack-divider{
  width:100%;
  height:26px;
  display:block;
}

/* ---------- ABOUT ---------- */
.about{
  padding:90px 0 100px;
  border-top:1px solid var(--line);
}
.about .wrap{
  display:grid;
  grid-template-columns:0.85fr 1.15fr;
  gap:70px;
}
.about h2{
  font-size:2rem;
  margin-bottom:22px;
  max-width:11ch;
}
.about .col-left p{
  color:var(--text-muted-solid);
  max-width:42ch;
  margin-bottom:16px;
}

.rune-list{ list-style:none; }
.rune-list li{
  display:flex;
  gap:18px;
  padding:20px 0;
  border-top:1px solid var(--line);
}
.rune-list li:last-child{ border-bottom:1px solid var(--line); }
.rune-list .glyph{
  font-family:'Fraunces', serif;
  font-size:1rem;
  color:var(--ember-bright);
  flex-shrink:0;
  width:26px;
  padding-top:2px;
}
.rune-list h3{
  font-size:1.05rem;
  font-weight:560;
  margin-bottom:6px;
}
.rune-list p{
  color:var(--text-muted-solid);
  font-size:0.95rem;
  max-width:48ch;
}

/* ---------- FEATURES ---------- */
.features{
  padding:20px 0 110px;
}
.features .grid{
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr;
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
}
.feature-panel{
  background:var(--bg-panel);
  padding:38px 34px;
  position:relative;
}
.feature-panel:first-child{
  background:var(--bg-panel-2);
}
.feature-panel h3{
  font-size:1.32rem;
  margin-bottom:14px;
}
.feature-panel p{
  color:var(--text-muted-solid);
  font-size:0.96rem;
  max-width:34ch;
}
.feature-panel .corner{
  position:absolute;
  top:16px; right:16px;
  width:8px; height:8px;
  border-top:1px solid var(--gold-dim);
  border-right:1px solid var(--gold-dim);
  opacity:0.7;
}

/* ---------- CTA BAND ---------- */
.cta-band{
  position:relative;
  padding:96px 0;
  text-align:left;
  background:
    radial-gradient(ellipse 60% 100% at 20% 50%, rgba(176,81,31,0.16), transparent 70%),
    var(--bg-panel);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.cta-band .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
  flex-wrap:wrap;
}
.cta-band h2{
  font-size:clamp(1.8rem, 3.4vw, 2.5rem);
  max-width:14ch;
}
.cta-band .side{
  display:flex;
  flex-direction:column;
  gap:16px;
  align-items:flex-start;
}
.cta-band .side p{
  color:var(--text-muted-solid);
  max-width:34ch;
  font-size:0.96rem;
}

/* ---------- FOOTER ---------- */
footer{
  padding:44px 0;
}
footer .wrap{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
}
footer .fine{
  color:var(--text-muted);
  font-size:0.82rem;
  max-width:52ch;
}
footer .flinks{
  display:flex;
  gap:24px;
  font-size:0.88rem;
  color:var(--text-muted-solid);
}
footer .flinks a:hover{ color:var(--ember-bright); }

/* ---------- BASIC PAGE / POST FALLBACK (used by index.php) ---------- */
.basic-content{
  padding:90px 0;
  border-top:1px solid var(--line);
}
.basic-content .wrap{ max-width:760px; }
.basic-content h1{ font-size:2.4rem; margin-bottom:24px; }
.basic-content p{ color:var(--text-muted-solid); margin-bottom:16px; }
.basic-content article + article{
  margin-top:56px;
  padding-top:56px;
  border-top:1px solid var(--line);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:860px){
  .wrap{ padding:0 24px; }
  .about .wrap{ grid-template-columns:1fr; gap:44px; }
  .features .grid{ grid-template-columns:1fr; }
  .hero{ padding:80px 0 70px; }
  .cta-band .wrap{ flex-direction:column; align-items:flex-start; }
}
