:root{
  --purple-main:#6d5dfc;
  --purple-dark:#4c3fd9;
  --purple-accent:#a89cff;
  --purple-soft:#f3f1ff;
  --bg:#ffffff;
  --text:#111827;
}

*{ box-sizing:border-box; }

html, body{
  height:100%;
}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);

  /* Sticky footer på korta sidor (Kontakt/Offert) */
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* ================= HEADER ================= */

header{
  position:sticky;
  top:0;
  z-index:1000;
  background:linear-gradient(135deg,var(--purple-dark),var(--purple-main));
}

.header-inner{
  max-width:1200px;
  margin:auto;
  padding:1rem 2rem;
  display:flex;
  align-items:center;
  gap:1rem;
  position:relative; /* referens för mobilmenyn */
}

.header-brand{
  display:flex;
  align-items:center;
}

/* Mobil först */
.header-logo{
  height:96px;
  width:auto;
  display:block;
}

/* Tablet / Desktop */
@media (min-width:769px){
  .header-logo{ height:58px; }
}

/* Stor desktop */
@media (min-width:1024px){
  .header-logo{ height:180px; }
}

/* Hamburger (dold på desktop) */
.menu-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
}

.menu-toggle span{
  width:26px;
  height:3px;
  background:#fff;
  border-radius:3px;
}

/* Desktop-nav */
nav{
  margin-left:auto;
}

nav ul{
  list-style:none;
  display:flex;
  gap:1.5rem;
  margin:0;
  padding:0;
}

nav a{
  color:#fff;
  text-decoration:none;
  font-weight:500;
}

/* Submenu desktop */
.has-submenu{ position:relative; }

.submenu{
  position:absolute;
  top:100%;
  left:0;
  background:#fff;
  border-radius:14px;
  min-width:220px;
  display:none;
  box-shadow:0 20px 40px rgba(0,0,0,.18);
}

.submenu-toggle{
  cursor:pointer;
  padding-left:0.4rem;
  font-size:0.85em;
  color:#fff;
  user-select:none;
  display:inline-flex;
  align-items:center;
}

.submenu a{
  color:#111;
  padding:.8rem 1.2rem;
  display:block;
}

.has-submenu:hover .submenu{
  display:block;
}

/* ================= MOBIL ================= */

@media (max-width:768px){

  .menu-toggle{
    display:flex;
    position:absolute;
    right:16px;
    top:50%;
    transform:translateY(-50%);
    z-index:1100;
  }

  nav ul{
    display:none;
    flex-direction:column;
    gap:1rem;
    background:#4c3fd9;
    padding:1.5rem;
    border-radius:18px;
    min-width:220px;
    z-index:1050;
    box-shadow:0 18px 40px rgba(0,0,0,.25);

    position:fixed;
    left:auto !important;
    right:var(--menu-right,16px); /* om du sätter via JS */
    top:var(--menu-top,80px);     /* om du sätter via JS */
    width:min(280px, calc(100vw - 32px));
  }

  nav ul.show{
    display:flex;
  }
}

/* Desktop-säkerhet */
@media (min-width:769px){
  nav{
    position:static;
    transform:none;
    width:auto;
    height:auto;
    margin-left:auto;
  }

  nav ul{
    display:flex !important;
    position:static;
    box-shadow:none;
  }
}

/* ================= LAYOUT ================= */

.hero{
  background:linear-gradient(135deg,var(--purple-main),var(--purple-dark));
  color:#fff;
}

.hero-inner{
  max-width:1100px;
  margin:auto;
  padding:7rem 2rem;
}

.section{
  max-width:1100px;
  margin:auto;
  padding:5rem 2rem;
}

.card{
  background:#fff;
  border-radius:22px;
  padding:2.5rem;
  box-shadow:0 25px 60px rgba(0,0,0,.1);
  color:var(--text);
}

.page{
  max-width:900px;
  margin:60px auto;
  padding:0 20px;
  line-height:1.7;
}

/* Cookie-safeguard: gör så bannern inte täcker sista content på korta sidor */
.hero:last-of-type{
  padding-bottom:140px;
}

/* ================= KNAPPAR ================= */

.btn{
  background:linear-gradient(135deg,var(--purple-accent),#ffffff);
  color:#4c3fd9;
  padding:1rem 2.2rem;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  box-shadow:0 12px 30px rgba(76,63,217,.35);
  transition:transform .2s ease, box-shadow .2s ease;
  cursor:pointer;
  border:none;
  display:inline-block;
}

.btn:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(76,63,217,.45);
}

/* ================= FORM ================= */

form input,
form select,
form textarea{
  width:100%;
  padding:1rem;
  margin-bottom:1rem;
  border-radius:12px;
  border:1px solid #ddd;
  transition:border-color .2s ease, box-shadow .2s ease;
}

form input:focus,
form select:focus,
form textarea:focus{
  outline:none;
  border-color: rgba(109,93,252,.65);
  box-shadow:0 0 0 4px rgba(109,93,252,.18);
}

/* Felruta */
.form-error{
  display:none;
  margin-bottom:16px;
  padding:14px 16px 14px 44px;
  border-radius:16px;
  color:#111827;

  background: linear-gradient(135deg, rgba(168,156,255,.22), rgba(243,241,255,.90));
  border:1px solid rgba(109,93,252,.35);

  box-shadow:0 18px 40px rgba(76,63,217,.16);
  line-height:1.45;
  font-weight:600;
  position:relative;
}

.form-error::before{
  content:"!";
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:22px;
  height:22px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#fff;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-main));
  box-shadow:0 10px 22px rgba(76,63,217,.25);
}

.form-field-error{
  border-color: rgba(239,68,68,.75) !important;
  box-shadow: 0 0 0 4px rgba(239,68,68,.20) !important;
  background:#fff;
}

/* ================= LÄNK-PILLS ================= */

.service-links{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  margin-top:.75rem;
}

.pill-link{
  display:inline-block;
  padding:.55rem .8rem;
  border-radius:999px;
  background:var(--purple-soft);
  border:1px solid rgba(109,93,252,.25);
  color:var(--purple-dark);
  text-decoration:none;
  font-weight:600;
  font-size:.95rem;
}

.pill-link:hover{
  filter:brightness(.98);
  text-decoration:underline;
  text-underline-offset:2px;
}

/* ================= COOKIE BANNER ================= */

.cookie-banner{
  position:fixed;
  left:1rem;
  right:1rem;
  bottom:1rem;
  z-index:2000;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:0.9rem 1rem;
  border-radius:14px;
  background:#111827;
  color:#fff;
  box-shadow:0 20px 50px rgba(0,0,0,.35);
}

.cookie-banner a{
  color:#fff;
  text-decoration:underline;
  text-underline-offset:3px;
}

.cookie-actions{
  display:flex;
  gap:0.6rem;
  align-items:center;
}

.cookie-btn{
  background:#ffffff;
  color:#111827;
  border:none;
  border-radius:999px;
  padding:0.6rem 1rem;
  font-weight:700;
  cursor:pointer;
}

.cookie-deny{
  background:transparent;
  color:#fff;
  border:2px solid rgba(255,255,255,.6);
}

@media (max-width:420px){
  .cookie-banner{
    flex-direction:column;
    align-items:flex-start;
  }
  .cookie-actions{
    width:100%;
    justify-content:flex-end;
  }
}

@media (max-width:768px){
  .hero-actions .btn:nth-child(3){
    margin-top:14px;
  }
}

/* ================= FOOTER (NY 3-KOLUMN) ================= */
/* OBS: vi låter INTE en gammal footer{}-regel styra, bara .site-footer */

.site-footer{
  background:#0b1020;
  color:#e5e7eb;
  padding:34px 20px 22px;
}

.site-footer .footer-inner{
  max-width:1100px;
  margin:0 auto;
}

.site-footer .footer-grid{
  display:grid;
  gap:22px;
  grid-template-columns:1fr;
  padding-bottom:18px;
  border-bottom:1px solid rgba(229,231,235,.16);
}

.site-footer .footer-col h3{
  margin:0 0 10px;
  font-size:0.95rem;
  letter-spacing:.2px;
}

.site-footer .footer-col p{
  margin:0;
  line-height:1.6;
  color:rgba(229,231,235,.9);
  font-size:0.95rem;
}

.site-footer .footer-links{
  display:grid;
  gap:8px;
}

.site-footer a{
  color:#e5e7eb;
  text-decoration:none;
}

.site-footer a:hover{
  text-decoration:underline;
}

.site-footer .badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(229,231,235,.16);
  background:rgba(255,255,255,.04);
  font-size:12px;
  color:rgba(229,231,235,.9);
  margin-top:10px;
}

.site-footer .footer-note{
  color:rgba(229,231,235,.78);
  font-size:0.9rem;
  line-height:1.5;
}

.site-footer .footer-bottom{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  justify-content:space-between;
  align-items:center;
  padding-top:14px;
  color:rgba(229,231,235,.78);
  font-size:0.85rem;
}

.site-footer .footer-bottom .small-links{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.site-footer .dot::before{
  content:"·";
  margin:0 10px;
  opacity:.7;
}

@media (min-width:860px){
  .site-footer .footer-grid{
    grid-template-columns:1.2fr 1fr 1fr;
    align-items:start;
  }
}

/* Sticky footer: se till att footern hamnar längst ner på korta sidor */
#site-footer{
  margin-top:auto;
}