/*
Theme Name: Zilvis Bygg & Måleri
Theme URI: https://www.zilvis.se/
Author: Ekodas
Author URI: https://ekodas.com/
Description: 1:1 tema Zilvis Bygg & Måleri svetainei (Stokholmas). Snickeri, måleri, tapetsering, byggnation.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zilvis
Tags: custom-theme, one-page, portfolio
*/

/* ============================================================
   ZILVIS BYGG & MÅLERI - 2026
   Premium bygg- & måleritjänster i Stockholm
   ============================================================ */

/* Fonts load via a <link> enqueued in functions.php (handle: zilvis-fonts).
   An @import here would only begin downloading after this file is parsed,
   adding a round trip to the critical rendering path. */

:root {
  /* Colours - from Zilvis logotype (navy blue + cream + espresso) */
  --ink:        #1C130B;
  --ink-2:      #261A10;
  --ink-soft:   #33251A;
  --paper:      #EDE6D8;
  --paper-2:    #E2D8C6;
  --sand:       #CFC3AD;
  --muted:      #8A7D69;
  --line:       rgba(28, 19, 11, .10);
  --line-dark:  rgba(237, 230, 216, .12);

  /* Accent - logotype blue */
  --amber:      #2E7BA6;   /* accent blue */
  --amber-2:    #164663;   /* deep logo blue */
  --copper:     #3E92C4;   /* bright blue */
  --amber-soft: rgba(46, 123, 166, .13);

  --white:      #FFFFFF;

  /* Type */
  --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Rhythm */
  --container: 1200px;
  --radius: 18px;
  --radius-lg: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; font-weight: 700; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600;
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--amber-2);
}
.eyebrow::before { content: ''; width: 26px; height: 1.5px; background: var(--amber); display: inline-block; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 100px;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  cursor: pointer; border: none; transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--amber); color: var(--white); box-shadow: 0 10px 30px -10px rgba(46,123,166,.6); }
.btn-primary:hover { background: var(--amber-2); transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(46,123,166,.7); }
.btn-ghost { background: transparent; color: var(--paper); border: 1.5px solid var(--line-dark); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-3px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-soft); transform: translateY(-3px); }

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
  padding: 22px 0;
}
header.scrolled {
  background: rgba(24, 16, 9, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--line-dark);
}
.nav { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.brand .mark {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--paper);
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 8px 20px -10px rgba(0,0,0,.5);
}
.brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.brand .name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; line-height: 1; }
.brand .name span { display: block; font-family: var(--font-body); font-weight: 500; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { color: var(--paper); font-weight: 500; font-size: .95rem; opacity: .85; transition: opacity .25s, color .25s; }
.nav-links a:hover { opacity: 1; color: var(--amber); }
/* current page marker - nav must show where you are */
.nav-links a[aria-current="page"] { opacity: 1; color: var(--amber); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone { color: var(--paper); font-family: var(--font-display); font-weight: 600; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
.nav-phone svg { width: 17px; height: 17px; color: var(--amber); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { width: 26px; height: 2px; background: var(--paper); border-radius: 2px; transition: .3s var(--ease); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  background: radial-gradient(120% 90% at 80% 0%, #12303d 0%, var(--ink) 55%);
  color: var(--paper); overflow: hidden; padding: 112px 0 96px;
}
/* Video fades up from the dark base gradient instead of popping in.
   Pure CSS so it still works if script.js never runs; the reduced-motion
   rule below kills the animation, which leaves opacity at its default 1. */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
  animation: heroFade 1.5s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes heroFade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
/* Symmetric vignette - keeps centred text readable from both sides */
.hero-overlay { position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(20,14,8,.72) 0%, rgba(20,14,8,.6) 38%, rgba(20,14,8,.92) 100%),
    radial-gradient(ellipse 78% 68% at 50% 48%, rgba(20,14,8,.45) 0%, rgba(20,14,8,.82) 100%); }
.hero-glow { position: absolute; z-index: 1; width: 620px; height: 620px; right: -160px; top: -140px;
  background: radial-gradient(circle, rgba(46,123,166,.35), transparent 65%); filter: blur(30px); pointer-events: none; }

.hero .container { position: relative; z-index: 2; }
.hero-text { max-width: 720px; }

.hero-scroll { position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-dark);
  background: rgba(20,14,8,.4); backdrop-filter: blur(6px); display: grid; place-items: center;
  color: var(--paper); animation: bob 2.2s var(--ease) infinite; }
.hero-scroll svg { width: 20px; height: 20px; }
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,7px); } }

/* Keep the whole hero inside the viewport on shorter screens */
@media (max-height: 900px) {
  .hero { padding: 92px 0 44px; }
  .hero-badge { margin-bottom: 14px; }
  .hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin-bottom: 14px; }
  .hero p.lead { font-size: 1.04rem; margin-bottom: 24px; }
  .hero-actions { margin-bottom: 26px; }
  .hero-stats { gap: 32px; }
  .hero-stats .stat b { font-size: 1.6rem; }
  .hero-scroll { bottom: 14px; width: 38px; height: 38px; }
}
@media (max-height: 660px) {
  .hero { padding: 84px 0 52px; }
  .hero-badge { display: none; }
  .hero p.lead { margin-bottom: 20px; }
  .hero-scroll { display: none; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 9px 16px; border-radius: 100px; background: var(--amber-soft);
  border: 1px solid rgba(46,123,166,.28); font-size: .82rem; font-weight: 500; color: var(--sand);
}
.hero-badge b { color: var(--amber); font-weight: 600; }

.hero h1 { font-size: clamp(2.7rem, 5.6vw, 4.6rem); font-weight: 800; margin-bottom: 24px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--amber), var(--copper));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 1.18rem; color: var(--sand); max-width: 540px; margin-bottom: 38px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 46px; }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats .stat b { font-family: var(--font-display); font-size: 2rem; font-weight: 700; display: block; color: var(--white); }
.hero-stats .stat span { font-size: .85rem; color: var(--muted); }

/* Hero visual photo */
.hero-visual { position: relative; }
.hero-photo { position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.75); border: 1px solid var(--line-dark); aspect-ratio: 4/5; }
.hero-photo > img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(20,17,14,.55)); }
.hero-float {
  position: absolute; left: 20px; bottom: 20px; right: 20px; z-index: 2;
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: rgba(20,17,14,.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-dark); border-radius: 16px;
}
.hero-float .hf-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--amber); display: grid; place-items: center; flex-shrink: 0; }
.hero-float .hf-ic svg { width: 22px; height: 22px; color: var(--white); }
.hero-float b { font-family: var(--font-display); color: var(--paper); font-size: 1.02rem; display: block; }
.hero-float span { color: var(--muted); font-size: .84rem; }

.hero-card {
  background: linear-gradient(160deg, var(--ink-2), var(--ink-soft));
  border: 1px solid var(--line-dark); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
}
.hero-card .hc-top { display: flex; align-items: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line-dark); margin-bottom: 22px; }
.hero-card .hc-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--amber-soft); display: grid; place-items: center; }
.hero-card .hc-icon svg { width: 26px; height: 26px; color: var(--amber); }
.hero-card .hc-top h4 { font-size: 1.05rem; color: var(--paper); }
.hero-card .hc-top p { font-size: .82rem; color: var(--muted); }
.hero-card ul li { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--sand); font-size: .95rem; }
.hero-card ul li svg { width: 20px; height: 20px; color: var(--amber); flex-shrink: 0; }
.hero-card .hc-foot { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-dark); display: flex; align-items: center; justify-content: space-between; }
.hero-card .hc-foot span { font-size: .82rem; color: var(--muted); }
.hero-card .hc-foot b { font-family: var(--font-display); color: var(--amber); font-size: 1.05rem; }

/* Marquee */
.marquee { background: var(--ink); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); overflow: hidden; padding: 20px 0; }
.marquee-track { display: flex; gap: 60px; width: max-content; animation: scroll 32s linear infinite; }
.marquee-track span { color: var(--sand); font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; display: flex; align-items: center; gap: 60px; opacity: .7; }
.marquee-track span::after { content: '✦'; color: var(--amber); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: clamp(64px, 8vw, 110px) 0; }
.section-head { max-width: 680px; margin-bottom: 62px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin: 18px 0 18px; }
.section-head p { font-size: 1.1rem; color: var(--muted); }

/* About */
.about { background: var(--paper); }
.about .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 70px; align-items: center; }
.about .about-visual { position: relative; }
.about-frame {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3;
  position: relative; box-shadow: 0 40px 80px -40px rgba(20,17,14,.5);
}
.about-frame img { width: 100%; height: 100%; object-fit: cover; }

.about-badge {
  position: absolute; bottom: -26px; right: -20px; background: var(--amber); color: var(--white);
  padding: 22px 26px; border-radius: var(--radius); box-shadow: 0 20px 40px -14px rgba(46,123,166,.6);
}
.about-badge b { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; display: block; }
.about-badge span { font-weight: 600; font-size: .88rem; }

.about-list { margin-top: 30px; display: grid; gap: 18px; }
.about-list li { display: flex; gap: 16px; align-items: flex-start; }
.about-list .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--amber-soft); display: grid; place-items: center; flex-shrink: 0; }
.about-list .ic svg { width: 22px; height: 22px; color: var(--amber-2); }
.about-list b { font-family: var(--font-display); font-size: 1.05rem; display: block; margin-bottom: 2px; }
.about-list p { color: var(--muted); font-size: .95rem; }

/* Services */
.services { background: var(--ink); color: var(--paper); }
.services .section-head h2 { color: var(--paper); }
.services .section-head p { color: var(--sand); }
/* Intrinsic grid: the cards decide how many fit, instead of a guessed
   breakpoint. min() keeps one card full-width rather than overflowing. */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 262px), 1fr)); gap: 18px; }
.service-card {
  background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius);
  transition: transform .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-8px); border-color: rgba(46,123,166,.4); background: var(--ink-soft); }
.sc-photo { position: relative; aspect-ratio: 16/11; overflow: hidden; }
.sc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.service-card:hover .sc-photo img { transform: scale(1.07); }
.sc-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20,17,14,.75)); }
.sc-photo .sc-num { position: absolute; top: 12px; right: 14px; z-index: 2; font-family: var(--font-display); font-weight: 700; font-size: .78rem; color: var(--white); background: var(--amber); padding: 4px 10px; border-radius: 100px; }
/* flex column + margin-top:auto on .sc-link keeps "Se galleri" bottom-aligned
   across cards even when the descriptions differ in length */
.sc-body { padding: 22px 24px 26px; position: relative; display: flex; flex-direction: column; flex: 1; }
.service-card .sc-ic { width: 48px; height: 48px; border-radius: 13px; background: var(--ink); border: 1px solid var(--line-dark); display: grid; place-items: center; margin: -46px 0 16px; position: relative; z-index: 2; transition: background .4s, border-color .4s; }
.service-card:hover .sc-ic { background: var(--amber); border-color: var(--amber); }
.service-card .sc-ic svg { width: 25px; height: 25px; color: var(--amber); transition: color .4s; }
.service-card:hover .sc-ic svg { color: var(--white); }
.service-card h3 { font-size: 1.15rem; color: var(--paper); margin-bottom: 8px; }
.service-card p { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.sc-link { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; align-self: flex-start;
  font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--amber); transition: gap .3s var(--ease); }
.sc-link svg { width: 16px; height: 16px; }
.service-card:hover .sc-link { gap: 12px; }

/* Process */
.process { background: var(--paper-2); }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 20px; }
.step { position: relative; }
.step .num {
  width: 58px; height: 58px; border-radius: 16px; background: var(--ink); color: var(--amber);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin-bottom: 22px;
}
.step h3 { font-size: 1.2rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .95rem; }
.step:not(:last-child) .num::after {
  content: ''; position: absolute; top: 29px; left: 70px; right: -14px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--sand) 0 6px, transparent 6px 12px);
}

/* Why choose us / values */
.values { background: var(--paper); }
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 26px; }
.value-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px 34px; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.value-card:hover { transform: translateY(-8px); box-shadow: 0 30px 60px -30px rgba(20,17,14,.28); }
.value-card .v-ic {
  width: 64px; height: 64px; border-radius: 18px; margin-bottom: 26px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--copper));
  box-shadow: 0 14px 30px -12px rgba(46,123,166,.55);
}
.value-card .v-ic svg { width: 32px; height: 32px; color: var(--white); }
.value-card h3 { font-size: 1.4rem; margin-bottom: 14px; }
.value-card p { color: var(--muted); }

/* CTA banner */
.cta {
  background: radial-gradient(120% 120% at 20% 0%, #12303d 0%, var(--ink) 60%);
  color: var(--paper); text-align: center; position: relative; overflow: hidden;
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 60px 60px; opacity: .4;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%);
}
.cta .container { position: relative; z-index: 2; }
.cta h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: 20px; }
.cta h2 .grad { background: linear-gradient(120deg, var(--amber), var(--copper)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cta p { font-size: 1.15rem; color: var(--sand); max-width: 560px; margin: 0 auto 38px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Contact */
.contact { background: var(--paper); }
/* stretch lets the left column match the form card's height, so the last
   contact card lines up with the bottom of the form */
.contact .grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: stretch; }
.contact .grid > div:first-child { display: flex; flex-direction: column; }
.contact-info { display: grid; grid-template-rows: repeat(3, 1fr); gap: 20px; margin-top: 34px; flex: 1; }
.contact-item { display: flex; gap: 18px; align-items: center; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s, transform .3s; }
.contact-item:hover { border-color: var(--amber); transform: translateX(4px); }
.contact-item .ci-ic { width: 50px; height: 50px; border-radius: 13px; background: var(--amber-soft); display: grid; place-items: center; flex-shrink: 0; }
.contact-item .ci-ic svg { width: 24px; height: 24px; color: var(--amber-2); }
.contact-item span { display: block; font-size: .8rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.contact-item b { font-family: var(--font-display); font-size: 1.1rem; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; box-shadow: 0 30px 60px -40px rgba(20,17,14,.3); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 18px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--font-body); font-size: .95rem; background: var(--paper); color: var(--ink); transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.form-success { display: none; text-align: center; padding: 20px; background: var(--amber-soft); border-radius: 12px; color: var(--amber-2); font-weight: 600; margin-top: 16px; }
.form-success.show { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
footer { background: var(--ink); color: var(--sand); padding: 80px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 50px; border-bottom: 1px solid var(--line-dark); }
footer .brand { margin-bottom: 20px; }
footer .f-about { color: var(--muted); font-size: .95rem; max-width: 300px; }
footer h4 { color: var(--paper); font-size: 1rem; margin-bottom: 20px; }
footer .f-col a, footer .f-col li { color: var(--muted); font-size: .95rem; padding: 6px 0; display: block; transition: color .25s; }
footer .f-col a:hover { color: var(--amber); }
.socials { display: flex; gap: 12px; margin-top: 20px; }
.socials a { width: 42px; height: 42px; border-radius: 11px; background: var(--ink-2); display: grid; place-items: center; transition: background .3s, transform .3s; }
.socials a:hover { background: var(--amber); transform: translateY(-3px); }
.socials a svg { width: 20px; height: 20px; color: var(--sand); transition: color .3s; }
.socials a:hover svg { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { color: var(--muted); font-size: .88rem; }
.footer-bottom .credit { color: var(--amber); font-weight: 600; transition: color .25s; }
.footer-bottom .credit:hover { color: var(--copper); text-decoration: underline; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* The card grids above are intrinsic (auto-fit + minmax), so they need no
   column rules here - they reflow on their own at every width. */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; gap: 46px; }
  .hero-visual { max-width: 460px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child) .num::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

/* Contact keeps its asymmetric 0.9/1.1 split only while the form column stays
   wide enough for a two-field row; below that the split costs more than it
   gives, so the form takes the full width instead. */
@media (max-width: 1024px) {
  .contact .grid { grid-template-columns: 1fr; gap: 50px; }
}
@media (max-width: 760px) {
  .nav-links, .nav-phone { display: none; }
  .burger { display: flex; }
  /* Compact header CTA - must stay on one line next to the burger */
  .nav-cta { gap: 10px; }
  .nav-cta .btn-primary { padding: 10px 16px; font-size: .82rem; white-space: nowrap; }
  .brand .mark { width: 40px; height: 40px; }
  .brand .name { font-size: 1rem; white-space: nowrap; }
  .brand .name span { font-size: .6rem; letter-spacing: .12em; white-space: nowrap; }
  /* Smaller eyebrow chip */
  .hero-badge { font-size: .74rem; padding: 7px 13px; gap: 7px; line-height: 1.45; }
  .nav-links.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--ink); padding: 24px 28px; gap: 18px; border-top: 1px solid var(--line-dark); box-shadow: 0 20px 40px -20px rgba(0,0,0,.6);
  }
  .about .grid { gap: 50px; }
  .about-visual { max-width: 400px; margin: 0 auto; }
  .hero-stats { gap: 28px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* Keep the chip to a single short line on narrow phones */
  .hb-tail { display: none; }
}
@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .process-grid { grid-template-columns: 1fr; }
  .form-card { padding: 26px; }
  .nav-cta .btn-primary { padding: 9px 14px; font-size: .78rem; }
  .brand .name { font-size: .95rem; }
  /* Keep the hero inside the viewport on narrow phones */
  .hero { padding-top: 84px; }
  .hero p.lead { font-size: .98rem; }
  .hero-actions { gap: 10px; margin-bottom: 22px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .hero-stats .stat b { font-size: 1.35rem; }
  .hero-stats .stat span { font-size: .72rem; }
}

/* ============================================================
   WORK / GALLERY PAGES (invandig-malning.html, terrasser.html, ...)
   ============================================================ */
.work-hero { position: relative; padding: 150px 0 70px; color: var(--paper); overflow: hidden;
  background: radial-gradient(120% 90% at 80% 0%, #12303d 0%, var(--ink) 55%); }
.work-hero::after { content: ''; position: absolute; inset: 0; background-image: var(--bg);
  background-size: cover; background-position: center; opacity: .22; z-index: 0; }
.work-hero .container { position: relative; z-index: 2; }
.back-link { display: flex; width: fit-content; align-items: center; gap: 8px; color: var(--sand); font-weight: 500;
  font-size: .92rem; margin-bottom: 24px; transition: gap .3s var(--ease), color .3s; }
.back-link:hover { color: var(--amber); gap: 12px; }
.back-link svg { width: 17px; height: 17px; }
.work-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; margin-bottom: 18px; }
.work-hero p.work-intro { max-width: 620px; color: var(--sand); font-size: 1.12rem; }
.work-meta { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.work-meta .m b { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); display: block; }
.work-meta .m span { font-size: .84rem; color: var(--muted); }

.gallery { background: var(--paper); padding: 80px 0 100px; }
.gallery-grid { columns: 3; column-gap: 22px; }
figure { break-inside: avoid; margin: 0 0 22px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 34px -24px rgba(28,19,11,.4);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
figure:hover { transform: translateY(-5px); box-shadow: 0 26px 50px -26px rgba(28,19,11,.5); }
figure .imgwrap { position: relative; cursor: zoom-in; overflow: hidden; }
figure img { width: 100%; display: block; transition: transform .6s var(--ease); }
figure:hover img { transform: scale(1.05); }
figure .num { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--amber); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem; padding: 4px 11px; border-radius: 100px; }
figcaption { padding: 16px 18px 20px; color: var(--ink); font-size: .95rem; line-height: 1.5; }

.other-works { background: var(--paper-2); padding: 70px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.chips a { padding: 11px 20px; border-radius: 100px; background: var(--white); border: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--ink); transition: .3s var(--ease); }
.chips a:hover, .chips a.active { background: var(--amber-2); color: #fff; border-color: var(--amber-2); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 2000; background: rgba(14,10,6,.94); display: none;
  align-items: center; justify-content: center; padding: 30px; }
.lb.open { display: flex; }
.lb figure { background: transparent; border: none; box-shadow: none; max-width: 1000px; width: 100%; text-align: center; }
.lb figure:hover { transform: none; }
.lb img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lb figcaption { color: var(--sand); padding-top: 16px; font-size: 1rem; }
.lb-close, .lb-nav { position: fixed; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: #fff; width: 50px; height: 50px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  transition: background .25s; }
.lb-close:hover, .lb-nav:hover { background: var(--amber); }
.lb-close { top: 22px; right: 22px; }
.lb-close svg, .lb-nav svg { width: 22px; height: 22px; }
.lb-nav.prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-nav.next { right: 20px; top: 50%; transform: translateY(-50%); }

@media (max-width: 900px) { .gallery-grid { columns: 2; } }
@media (max-width: 560px) {
  .gallery-grid { columns: 1; }
  .work-hero { padding: 120px 0 50px; }
  .work-meta { gap: 20px; }
  /* Both selectors must be as specific as the base .lb-nav.prev/.next rules,
     otherwise top/transform are not overridden and the arrows stay vertically
     centred on top of the photo. */
  .lb-nav.prev, .lb-nav.next { top: auto; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: none; }
  .lb-nav.prev { left: 24px; }
  .lb-nav.next { right: 24px; }
  .lb figure { max-height: calc(100dvh - 190px); }
  .lb img { max-height: calc(100dvh - 250px); }
}

/* ============================================================
   WORDPRESS COMPAT
   Fixed header must sit below the admin bar for logged-in users.
   Public (logged-out) rendering is byte-identical to the static site.
   ============================================================ */
body.admin-bar #header { top: 32px; }
body.admin-bar .hero { min-height: calc(100vh - 32px); min-height: calc(100svh - 32px); }
@media screen and (max-width: 782px) {
  body.admin-bar #header { top: 46px; }
  body.admin-bar .hero { min-height: calc(100vh - 46px); min-height: calc(100svh - 46px); }
}

/* Generic page content (privacy policy etc.) */
.zilvis-prose { color: var(--ink); font-size: 1.05rem; }
.zilvis-prose h2 { font-size: 1.7rem; margin: 32px 0 12px; }
.zilvis-prose h3 { font-size: 1.25rem; margin: 24px 0 10px; }
.zilvis-prose p { margin-bottom: 16px; color: var(--muted); }
.zilvis-prose a { color: var(--amber-2); text-decoration: underline; }
.zilvis-prose ul, .zilvis-prose ol { margin: 0 0 16px 20px; color: var(--muted); }
.zilvis-prose ul li { list-style: disc; padding: 4px 0; }
.zilvis-prose ol li { list-style: decimal; padding: 4px 0; }

/* Honeypot - visually gone but still fillable by bots. Uses the standard
   visually-hidden clip technique rather than a large negative offset, which
   can extend the layout box and cause horizontal scrolling. */
.zv-hp {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; white-space: nowrap;
  clip: rect(0 0 0 0); clip-path: inset(50%);
}

/* ============================================================
   TOUCH TARGETS & INPUT ERGONOMICS
   WCAG 2.2 SC 2.5.5 / Apple HIG 44pt / Material 48dp.
   Desktop sizing is unaffected - these only raise values that fall short.
   ============================================================ */
.btn { min-height: 44px; }
.burger { width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; }
.socials a { width: 44px; height: 44px; }
.chips a { min-height: 44px; display: inline-flex; align-items: center; }
.contact-item { min-height: 44px; }

/* Keyed to the input device AND to narrow viewports: a 1024px tablet is still
   a finger (coarse), and a phone stays covered even if pointer media queries
   are reported oddly by an in-app browser. */
@media (pointer: coarse), (max-width: 1024px) {
  /* Short words like "Hem" are only ~34px wide. The padding grows the hit
     area while the negative margin cancels its layout effect, so the menu
     spacing stays visually identical. */
  .nav-links a {
    min-height: 44px; display: flex; align-items: center;
    padding-inline: 10px; margin-inline: -10px;
  }
  .nav-phone { min-height: 44px; }
  footer .f-col a,
  footer .f-col li { min-height: 44px; display: flex; align-items: center; padding: 0; }
  .footer-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
  .brand { min-height: 44px; }
  .back-link { min-height: 44px; }
  .sc-link { min-height: 44px; }
}

/* 16px is the threshold below which iOS Safari zooms on focus, which then
   leaves the page horizontally scrolled. */
@media (max-width: 820px) {
  .field input, .field select, .field textarea { font-size: 16px; }
}

/* ============================================================
   FLUID TYPE & SPACING
   Values are capped at the current desktop sizes, so wide screens look
   exactly as before; narrow screens scale down smoothly instead of
   jumping at a breakpoint.
   ============================================================ */
.section-head { margin-bottom: clamp(36px, 5vw, 62px); }
.section-head h2 { font-size: clamp(1.75rem, 1.15rem + 2.4vw, 3.1rem); }
.section-head p { font-size: clamp(1rem, .95rem + .3vw, 1.1rem); }
.value-card { padding: clamp(28px, 3.5vw, 40px) clamp(24px, 3vw, 34px); }
.value-card h3 { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.4rem); }
.form-card { padding: clamp(26px, 3.5vw, 40px); }
.footer-grid { gap: clamp(28px, 4vw, 48px); }
footer { padding: clamp(56px, 7vw, 80px) 0 32px; }
.gallery { padding: clamp(56px, 7vw, 80px) 0 clamp(64px, 8vw, 100px); }
.other-works { padding: clamp(48px, 6vw, 70px) 0; }
.work-hero { padding: clamp(116px, 12vw, 150px) 0 clamp(48px, 6vw, 70px); }
.cta h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem); }

/* Long-form text stays inside a comfortable measure on very wide screens. */
.about-text p, .work-hero p.work-intro { max-width: 62ch; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs { background: var(--paper); padding: 18px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); }
.breadcrumbs a { color: var(--amber-2); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: var(--muted); opacity: .6; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }
@media (pointer: coarse), (max-width: 1024px) {
  .breadcrumbs a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ============================================================
   SERVICE AREAS
   ============================================================ */
.areas { background: var(--paper-2); }
.areas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 30px; }
.area-col h3 { font-size: 1.15rem; margin-bottom: 14px; color: var(--ink); }
.area-col ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.area-col li {
  font-size: .9rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 100px;
}
.areas .section-head a { color: var(--amber-2); font-weight: 600; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { background: var(--paper); }
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.faq-item[open] { border-color: rgba(46,123,166,.35); box-shadow: 0 18px 40px -30px rgba(28,19,11,.4); }
.faq-item summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--ink); padding: 20px 56px 20px 24px; position: relative;
  min-height: 44px; display: flex; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 24px; top: 50%;
  width: 11px; height: 11px; margin-top: -6px;
  border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber);
  transform: rotate(45deg); transition: transform .3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.faq-a { padding: 0 24px 22px; }
.faq-a p { color: var(--muted); font-size: 1rem; margin: 0; }
@media (max-width: 480px) {
  .faq-item summary { font-size: .98rem; padding: 18px 48px 18px 18px; }
  .faq-a { padding: 0 18px 18px; }
}

/* ============ A11Y: SKIP LINK ============ */
/* Off-screen until focused - keyboard users get it first, mouse users never
   see it. clip-path over the old clip() so it stays legible when focused. */
.skip-link{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:9999;
  padding:14px 22px;
  background:var(--amber,#e8a33d);
  color:#111;
  font-weight:700;
  text-decoration:none;
  border-radius:0 0 10px 0;
}
.skip-link:focus,
.skip-link:focus-visible{
  left:0;
  outline:3px solid #111;
  outline-offset:-3px;
}
/* The heading a skip link lands on must not hide under the sticky header. */
#innehall{scroll-margin-top:90px}
