:root {
  --bg: #0e0f12;
  --bg-2: #16181d;
  --surface: #1c1f26;
  --line: #2a2e37;
  --text: #f2f2f0;
  --muted: #a3a7b0;
  --accent: #f5a524;        /* varmt scenljus */
  --accent-ink: #1a1203;
  --radius: 14px;
  --gutter: 20px;
  --max: 1160px;
  color-scheme: dark;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 8px; }

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

.eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.4em;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffb840; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: var(--text); background: rgba(0,0,0,.2); }
.btn-ghost:hover { border-color: var(--text); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,15,18,.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 46px; width: auto; }
.logo-footer img { height: 64px; }
@media (min-width: 860px) { .logo img { height: 52px; } .logo-footer img { height: 72px; } }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav {
  position: absolute; top: 64px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
.site-nav a {
  display: block; padding: 14px 0; text-decoration: none; font-weight: 600; font-size: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .nav-cta { margin-top: 16px; border: 0; }
.site-nav .nav-cta a { border: 0; display: flex; padding: 0 1.4em; color: var(--accent-ink); }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: flex; align-items: flex-end;
  padding: 96px 0 56px;
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    /* mörk toning från höger till vänster – mörkast bakom texten */
    linear-gradient(270deg, rgba(14,15,18,0) 0%, rgba(14,15,18,.35) 45%, rgba(14,15,18,.85) 100%),
    linear-gradient(180deg, rgba(14,15,18,.2) 0%, rgba(14,15,18,.4) 50%, var(--bg) 100%);
}
.hero h1 { font-size: clamp(2.2rem, 9vw, 4.6rem); font-weight: 800; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 1.1rem; color: #d7d8dc; max-width: 46ch; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }

/* Sections --------------------------------------------------------------- */
.section { padding: 72px 0; }
.section-alt { background: #0e0f12; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 36px; max-width: 640px; }
.section-head h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* Services / info -------------------------------------------------------- */
.cards { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(245,165,36,.12); color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.3rem; }
.card p { color: var(--muted); }
.brands { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; }
.brands li {
  font-size: .8rem; font-weight: 600; color: #cfd1d6;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 40px; }
.stat { border-top: 2px solid var(--accent); padding-top: 14px; }
.stat strong { display: block; font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .9rem; }

/* Gallery ---------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; grid-auto-flow: dense; }
.gallery button {
  position: relative; padding: 0; border: 0; background: var(--surface);
  border-radius: 10px; overflow: hidden; cursor: zoom-in;
  aspect-ratio: 1 / 1;
}
.gallery img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease, opacity .3s ease;
}
.gallery button:hover img { transform: scale(1.04); }
.gallery .wide { grid-column: span 2; aspect-ratio: 2 / 1; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  margin: 0; padding: 0; border: 0;
  background: rgba(6,7,9,.96); color: var(--text);
}
.lightbox::backdrop { background: rgba(0,0,0,.7); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; padding: 64px 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 160px); border-radius: 8px; object-fit: contain; }
.lightbox figcaption { color: var(--muted); font-size: .9rem; text-align: center; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(20,22,27,.8); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; bottom: 16px; }
.lb-next { right: 12px; bottom: 16px; }
.lb-count { position: absolute; top: 24px; left: 20px; font-size: .9rem; color: var(--muted); }

/* Ljusa sektioner -------------------------------------------------------- */
.section-light {
  --text: #16171a;
  --muted: #5b5f68;
  --line: #e4e2dd;
  --surface: #f7f7f7;
  background: #fff; color: var(--text);
}
.section-light .eyebrow { color: #f5a524; }
.section-light .card { background: #f1f2f5; border-color: var(--line); }
.section-light .card-icon { background: #16171a; color: var(--accent); }
.section-light .brands li { color: #33363c; background: #fff; border-color: #dcd9d2; }
.section-light .stat { border-top-color: #16171a; }
.section-light .stat strong { color: #16171a; }

/* Kontaktsidan på ljus bakgrund */
.contact-section { padding-top: 56px; }
.contact-section .contact-grid { padding-bottom: 0; }
.section-light .contact-item { background: var(--surface); }
.section-light a.contact-item:hover { border-color: #16171a; }
.section-light .form-card { background: #fff; box-shadow: 0 10px 40px rgba(20,20,25,.06); }
.section-light .field input,
.section-light .field textarea { background: var(--surface); color: var(--text); border-color: #dcd9d2; }
.section-light .field input:focus,
.section-light .field textarea:focus { background: #fff; border-color: #16171a; }
.section-light .alert-ok { background: #e6f5ea; border-color: #86c79b; color: #14532d; }
.section-light .alert-err { background: #fbe8e8; border-color: #e4a0a0; color: #7f1d1d; }

/* CTA-band --------------------------------------------------------------- */
.cta-band { display: grid; background: var(--bg); border-top: 1px solid var(--line); }
.cta-img { position: relative; min-height: 200px; overflow: hidden; }
.cta-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.5) brightness(.75); }
.cta-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--bg)); }
.cta-body { padding: 36px var(--gutter) 64px; }
.cta-body h2 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); max-width: 22ch; margin-bottom: 1.3em; }
.cta-band .cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.btn svg { width: 16px; height: 16px; flex: none; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.text-link:hover { color: var(--accent); }

/* Page header (kontakt) -------------------------------------------------- */
.page-head { padding: 56px 0 24px; }
.page-head h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }
.page-head p { color: var(--muted); font-size: 1.1rem; max-width: 52ch; }

/* Header med tonad bild – samma toning som heron på startsidan */
.page-head-media { position: relative; overflow: hidden; isolation: isolate; }
.page-head-img { position: absolute; inset: 0; z-index: -2; }
.page-head-img img { width: 100%; height: 100%; object-fit: cover; }
.page-head-media::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(270deg, rgba(14,15,18,0) 0%, rgba(14,15,18,.35) 45%, rgba(14,15,18,.85) 100%),
    linear-gradient(180deg, rgba(14,15,18,.2) 0%, rgba(14,15,18,.4) 50%, var(--bg) 100%);
}
.page-head-media p { color: #d7d8dc; }

/* Så går det till -------------------------------------------------------- */
.steps { list-style: none; margin: 0 0 56px; padding: 0; display: grid; gap: 16px; }
.step {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
}
.step-num {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: #16171a; color: var(--accent);
  font-weight: 800; font-size: 1.1rem; margin-bottom: 14px;
}
.step h3 { font-size: 1.2rem; margin-bottom: .35em; }
.step p { color: var(--muted); margin: 0; }

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; gap: 24px; padding-bottom: 72px; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; text-decoration: none;
}
a.contact-item:hover { border-color: var(--accent); }
.contact-item .card-icon { margin: 0; flex: none; width: 44px; height: 44px; }
.contact-item small { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.contact-item strong { font-weight: 600; font-size: 1.05rem; }
.contact-item address { font-style: normal; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; }
.form-card h2 { font-size: 1.5rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* förhindrar zoom på iOS */
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent);}
.field-row { display: grid; gap: 0 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--muted); font-size: .85rem; margin-top: 12px; }
.form-card .btn { width: 100%; }

.alert { border-radius: 10px; padding: 14px 16px; margin-bottom: 18px; font-weight: 500; }
.alert[hidden] { display: none; }
.alert-ok { background: rgba(46,160,90,.15); border: 1px solid rgba(46,160,90,.5); color: #b9f0cc; }
.alert-err { background: rgba(220,70,70,.15); border: 1px solid rgba(220,70,70,.5); color: #ffc9c9; }

/* Footer ----------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; color: var(--muted); font-size: .95rem; }
.footer-grid { display: grid; gap: 28px; }
.site-footer h3 { color: var(--text); font-size: 1rem; margin-bottom: .6em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer address { font-style: normal; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; }

/* ==========================================================================
   Större skärmar
   ========================================================================== */
@media (min-width: 600px) {
  .hero-actions { flex-direction: row; }
  .gallery { gap: 10px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .lb-prev { left: 20px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .lb-next { right: 20px; bottom: auto; top: 50%; transform: translateY(-50%); }
}

@media (min-width: 860px) {
  :root { --gutter: 32px; }
  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; }
  .site-nav ul { display: flex; align-items: center; gap: 28px; padding: 0; }
  .site-nav a { border: 0; padding: 8px 0; font-size: .98rem; }
  .site-nav a:hover { color: var(--accent); }
  .site-nav .nav-cta { margin: 0; }
  .site-nav .nav-cta .btn { min-height: 42px; padding: 0 1.2em; }
  .site-nav .nav-cta a:hover { color: var(--accent-ink); }

  .hero { align-items: center; padding: 120px 0; }
  .hero::after {
    background:
      linear-gradient(270deg, rgba(14,15,18,0) 0%, rgba(14,15,18,.15) 25%, rgba(14,15,18,.6) 50%, rgba(14,15,18,.92) 75%, var(--bg) 100%),
      linear-gradient(180deg, rgba(14,15,18,.35) 0%, transparent 20%, transparent 70%, var(--bg) 100%);
  }
  .section { padding: 104px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .gallery { grid-auto-rows: 230px; }
  .gallery button, .gallery .wide { aspect-ratio: auto; }
  .gallery .tall { grid-row: span 2; }
  .gallery .wide-lg { grid-column: span 2; }
  .cta-band { grid-template-columns: 1fr 1.9fr; }
  .cta-img { min-height: 300px; }
  .cta-img::after { background: linear-gradient(90deg, transparent 45%, var(--bg)); }
  .cta-body { padding: 56px var(--gutter) 56px 24px; display: flex; align-items: center; justify-content: space-between; gap: 40px; max-width: 900px; }
  .cta-body h2 { margin: 0; }
  .cta-band .cta-actions { align-items: center; flex: none; }
  .contact-section { padding-top: 72px; }
  .contact-grid { grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
  .form-card { padding: 36px; }
  .form-card .btn { width: auto; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .page-head { padding: 88px 0 40px; }
  .page-head-media::after {
    background:
      linear-gradient(270deg, rgba(14,15,18,0) 0%, rgba(14,15,18,.15) 25%, rgba(14,15,18,.6) 50%, rgba(14,15,18,.92) 75%, var(--bg) 100%),
      linear-gradient(180deg, rgba(14,15,18,.35) 0%, transparent 20%, transparent 70%, var(--bg) 100%);
  }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 72px; }
  .step { padding: 28px 26px; }
  /* tunn linje som binder ihop stegen */
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 47px; right: -21px;
    width: 22px; height: 2px; background: var(--accent);
  }
}

/* Ultrawide (21:9 etc.): same look as normal desktop, but the CTA band stops growing at 1600px
   and the photo fades in from the left instead of stretching to the screen edge */
@media (min-width: 1601px) {
  .cta-band { padding-inline: calc((100% - 1600px) / 2); }
  .cta-img::after { background: linear-gradient(90deg, var(--bg), transparent 30%, transparent 45%, var(--bg)); }
}
