/* Vidsidan 2.0: kvällen efter jobbet. Mörk hero med varmt lampsken, ljusa innehållsytor.
   Layout: bred hero i två kolumner, kortrutnät för guider, smal läsbar spalt i artiklar. */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --ink: #161b2b;
  --muted: #5b6172;
  --line: #e4e1da;
  --lamp: #f2a33a;
  --lamp-deep: #b8690f;
  --lamp-soft: #fdf0dc;
  --night: #121a30;
  --night-2: #1d2747;
  --violet: #7c83ff;
  --good: #1f8a5b;
  --good-soft: #e3f4ec;
  --on-night: #f3efe6;
  --on-night-muted: #a9b0c6;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22, 27, 43, .05), 0 12px 32px -12px rgba(22, 27, 43, .18);
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1322; --surface: #161d31; --surface-2: #1b2339; --ink: #eceae4; --muted: #a3a9ba;
    --line: #273050; --lamp: #f5ad4a; --lamp-deep: #f5ad4a; --lamp-soft: #2e2618; --night: #0a0f1d; --night-2: #172042;
    --violet: #9aa0ff; --good: #5fd39a; --good-soft: #15302a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1322; --surface: #161d31; --surface-2: #1b2339; --ink: #eceae4; --muted: #a3a9ba;
  --line: #273050; --lamp: #f5ad4a; --lamp-deep: #f5ad4a; --lamp-soft: #2e2618; --night: #0a0f1d; --night-2: #172042;
  --violet: #9aa0ff; --good: #5fd39a; --good-soft: #15302a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--night); }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

/* Sidhuvud */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(18, 26, 48, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); color: var(--on-night); border-bottom: 1px solid rgba(255,255,255,.07); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; text-decoration: none; color: var(--on-night); }
.logo svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.95rem; font-weight: 500; }
.nav a { text-decoration: none; color: var(--on-night-muted); padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.nav a:hover { color: var(--on-night); background: rgba(255,255,255,.07); }
.nav .nav-cta { background: var(--lamp); color: #1d1405; font-weight: 600; }
.nav .nav-cta:hover { background: #ffb85a; color: #1d1405; }

/* Typografi */
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 700; margin: 0 0 20px; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 650; margin: 2em 0 0.55em; }
h3 { font-size: 1.22rem; font-weight: 650; margin: 1.6em 0 0.4em; }
p { margin: 0 0 1em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--lamp-deep); margin: 0 0 14px; }
.lede { font-size: 1.22rem; color: var(--muted); max-width: 54ch; }

.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-weight: 650; padding: 13px 22px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; font-size: 1rem; transition: transform .2s, box-shadow .2s, background .2s; }
.btn-lamp { background: var(--lamp); color: #1d1405; box-shadow: 0 8px 24px -8px rgba(242, 163, 58, .7); }
.btn-lamp:hover { transform: translateY(-1px); background: #ffb85a; }
.btn-ghost { color: var(--on-night); border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--night); color: var(--on-night); }
.hero::before { content: ""; position: absolute; width: 760px; height: 760px; right: -180px; top: -260px; background: radial-gradient(circle, rgba(242,163,58,.38), rgba(242,163,58,0) 62%); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 640px; height: 640px; left: -260px; bottom: -380px; background: radial-gradient(circle, rgba(124,131,255,.28), rgba(124,131,255,0) 65%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding-block: clamp(48px, 8vw, 96px); }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #ffc46e, #f2a33a 60%, #ff8a5c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { color: var(--on-night-muted); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); font-size: 0.88rem; color: var(--on-night-muted); margin-bottom: 22px; }
.pill b { background: var(--lamp); color: #1d1405; border-radius: 999px; padding: 2px 9px; font-weight: 650; font-family: var(--mono); font-size: 0.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: 0.9rem; color: var(--on-night-muted); list-style: none; padding: 0; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 16px; height: 16px; color: var(--lamp); flex: none; }

.preview-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; padding: 24px; backdrop-filter: blur(10px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); transform: rotate(1.2deg); }
.preview-card .pc-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--on-night-muted); margin-bottom: 14px; }
.preview-card .pc-top span:last-child { font-family: var(--mono); background: rgba(255,255,255,.08); padding: 3px 10px; border-radius: 999px; }
.preview-card .pc-big { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; line-height: 1; color: #7be0a9; font-variant-numeric: tabular-nums; }
.preview-card .pc-sub { color: var(--on-night-muted); font-size: 0.92rem; margin: 6px 0 18px; }
.preview-card .bar { background: rgba(255,255,255,.1); }
.pc-rows { display: grid; gap: 10px; margin-top: 18px; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.pc-rows div { display: flex; justify-content: space-between; gap: 12px; }
.pc-rows i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.pc-rows .sum { border-top: 1px solid rgba(255,255,255,.12); padding-top: 10px; color: var(--on-night); font-weight: 650; }

/* Sektioner */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 42ch; }

.guides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.guide { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s; }
.guide:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.icon-tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; }
.icon-tile svg { width: 24px; height: 24px; }
.t-lamp { background: var(--lamp-soft); color: var(--lamp-deep); }
.t-good { background: var(--good-soft); color: var(--good); }
.t-violet { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
.guide .time { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.guide h3 { margin: 0; font-size: 1.3rem; }
.guide p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.guide .go { margin-top: auto; padding-top: 10px; font-weight: 650; color: var(--lamp-deep); display: inline-flex; gap: 6px; align-items: center; }
.guide .go span { transition: transform .2s; }
.guide:hover .go span { transform: translateX(4px); }

.steps-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.steps-strip > div { padding: 24px; border-radius: var(--radius); background: var(--surface-2); }
.steps-strip h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.steps-strip p { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.6; }
.steps-strip .n { counter-increment: s; font-family: var(--mono); font-size: 0.85rem; color: var(--lamp-deep); }
.steps-strip .n::before { content: "Steg " counter(s); }

.upcoming { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.upcoming li { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px dashed var(--line); border-radius: 14px; font-weight: 550; line-height: 1.4; }
.upcoming li span { font-size: 0.78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.cta-band { margin-block: 0 clamp(56px, 8vw, 96px); }
.cta-band .inner { position: relative; overflow: hidden; border-radius: 26px; background: var(--night-2); color: var(--on-night); padding: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 24px; align-items: center; }
.cta-band .inner::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -200px; background: radial-gradient(circle, rgba(242,163,58,.35), transparent 65%); }
.cta-band h2 { margin: 0 0 8px; position: relative; }
.cta-band p { margin: 0; color: var(--on-night-muted); position: relative; }
.cta-band .btn { position: relative; }

/* Artikel */
.article { padding-block: 0 48px; }
.article-head { position: relative; isolation: isolate; margin: 0 0 40px; padding-block: clamp(36px, 6vw, 64px) 32px; border-bottom: 1px solid var(--line); }
.article-head::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 260px at 85% 0%, var(--lamp-soft), transparent 70%); z-index: -1; }
.article-head h1, .article-head .lede { max-width: 22ch; }
.article-head .lede { max-width: 58ch; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.meta span { font-size: 0.85rem; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { font-weight: 650; }
.prose a { text-decoration-color: var(--lamp); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--lamp-deep); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin: 0 0 32px; }
.toc p { margin: 0 0 8px; font-weight: 650; font-family: var(--display); }
.toc ol { margin: 0; padding-left: 1.2em; color: var(--muted); }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--lamp-deep); }
.note { background: var(--lamp-soft); border-radius: 16px; padding: 18px 22px; margin: 1.6em 0; }
.note p:last-child { margin-bottom: 0; }
.note b { font-family: var(--display); }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding: 20px 22px 6px 76px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.steps > li::before { content: counter(step); position: absolute; left: 22px; top: 20px; width: 36px; height: 36px; border-radius: 12px; background: var(--lamp-soft); color: var(--lamp-deep); display: grid; place-items: center; font-family: var(--display); font-weight: 700; }
.steps h3 { margin: 4px 0 6px; }
.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--display); font-weight: 650; background: var(--surface-2); }
.sources { font-size: 0.93rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 44px; }
.sources ul { padding-left: 1.2em; }
.next { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.next a { font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; text-decoration: none; background: var(--surface); transition: border-color .2s, color .2s; }
.next a:hover { border-color: var(--lamp); color: var(--lamp-deep); }

/* Kalkylator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 4vw, 32px); margin: 0 0 2.4em; max-width: 820px; box-shadow: var(--shadow); }
.calc h2 { margin-top: 0; }
.calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 650; font-size: 0.92rem; }
.field small { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.field input { font-family: var(--mono); font-size: 1.05rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); width: 100%; min-width: 0; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--lamp); box-shadow: 0 0 0 4px var(--lamp-soft); outline: none; }
.result { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; padding: 22px; border-radius: 16px; background: var(--surface-2); }
.big .label { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.big .value { font-family: var(--display); font-size: clamp(2.2rem, 6vw, 3rem); font-weight: 700; color: var(--good); font-variant-numeric: tabular-nums; line-height: 1.1; }
.big .sub { font-size: 0.95rem; color: var(--muted); margin-top: 6px; }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 16px 0 0; background: var(--line); }
.bar span { display: block; height: 100%; transition: width 0.35s ease; }
.breakdown { font-size: 0.95rem; display: grid; gap: 9px; font-variant-numeric: tabular-nums; }
.breakdown div { display: flex; justify-content: space-between; gap: 12px; }
.breakdown span:last-child { font-family: var(--mono); }
.breakdown i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.breakdown .tot { border-top: 1px solid var(--line); padding-top: 9px; font-weight: 650; }
.calc .fine { font-size: 0.85rem; color: var(--muted); margin: 18px 0 0; }

/* Sidfot */
.site-foot { background: var(--night); color: var(--on-night-muted); margin-top: 24px; }
.site-foot .wrap { padding-block: 44px 52px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; font-size: 0.93rem; }
.site-foot .logo { margin-bottom: 12px; }
.site-foot p { margin: 0 0 10px; max-width: 56ch; }
.site-foot nav { display: grid; gap: 8px; align-content: start; }
.site-foot nav a { color: var(--on-night); text-decoration: none; }
.site-foot nav a:hover { color: var(--lamp); }
.site-foot .small { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; font-size: 0.85rem; }

@media (max-width: 860px) {
  .hero .wrap, .cta-band .inner, .site-foot .wrap { grid-template-columns: 1fr; }
  .preview-card { transform: none; }
  .guides, .steps-strip, .upcoming { grid-template-columns: 1fr; }
  .calc-grid, .result { grid-template-columns: 1fr; }
  .nav a:not(.nav-cta) { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Hero-kalkylator */
.sliders { display: grid; gap: 8px; margin-top: 18px; }
.sliders label { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; color: var(--on-night-muted); }
.sliders output { font-family: var(--mono); color: var(--on-night); }
.sliders input[type=range] { width: 100%; accent-color: var(--lamp); margin: 0 0 8px; }
.pc-link { display: inline-block; margin-top: 16px; font-size: 0.9rem; font-weight: 600; color: #ffc46e; text-decoration: none; }
.pc-link:hover { text-decoration: underline; }

/* Varför Vidsidan */
.section-head h2 em, .why h2 em { font-style: normal; color: var(--lamp-deep); }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.why-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.why-card p { margin: 0 0 10px; font-size: 0.98rem; line-height: 1.55; color: var(--muted); }
.why-card p:last-child { margin: 0; color: var(--ink); font-weight: 500; }
.why-them, .why-us { font-size: 0.75rem !important; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.why-us { color: var(--good) !important; margin-top: 16px !important; padding-top: 14px; border-top: 1px dashed var(--line); }

/* Verktyg */
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tool { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: start; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .25s, box-shadow .25s; }
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tool h3 { margin: 0 0 4px; }
.tool p { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.55; }
.tool .go { grid-column: 2; margin-top: 10px; font-weight: 650; color: var(--lamp-deep); }
.tool .go span { display: inline-block; transition: transform .2s; }
.tool:hover .go span { transform: translateX(4px); }
p.note[hidden] { display: none; }
@media (max-width: 860px) { .why-grid, .tools { grid-template-columns: 1fr; } }
