/* Tur Skoter – shared styles (both landing versions, ledkarta, integritet). */
:root {
  --night: #0b1626;
  --night-2: #12233a;
  --night-3: #1a3050;
  --snow: #f4f7fb;
  --snow-2: #e3eaf3;
  --ink: #0d1b2c;
  --muted: #5d6f86;
  --line: rgba(13, 27, 44, .1);
  --trail: #2f7cf6;
  --road: #ff9f1c;
  --terrain: #e5484d;
  --green: #2fbf71;
  --purple: #8b5cf6;
  --aurora: #5ef2c2;
  --radius: 24px;
  --max: 1160px;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--snow); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--trail); }
h1, h2, h3 { line-height: 1.04; letter-spacing: -.03em; margin: 0 0 .45em; font-weight: 800; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 40ch; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--trail); margin-bottom: 14px; }
.kicker::before { content: ""; width: 18px; height: 4px; border-radius: 2px; background: currentColor; }

/* Headline word reveal (splitWords) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w > span { display: inline-block; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line);
  transition: background .25s, border-color .25s; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.brand img { border-radius: 8px; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav ul a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; }
.nav ul a:hover { color: var(--ink); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.nav.on-dark { background: transparent; border-color: transparent; }
.nav.on-dark .brand { color: #fff; }
.nav.on-dark ul a { color: rgba(255,255,255,.78); }
.nav.on-dark ul a:hover { color: #fff; }
@media (max-width: 860px) { .nav ul { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--trail); color: #fff; }
.btn-primary:hover { background: #1f6be0; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-quiet { background: var(--snow-2); color: var(--ink); }
.btn-quiet:hover { background: #d3dde9; }
.btn-small { padding: 9px 16px; font-size: .9rem; }
.store { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; border-radius: 14px; padding: 9px 18px 9px 14px;
  text-decoration: none; border: 1px solid rgba(255,255,255,.22); line-height: 1.1; }
.store svg { width: 22px; height: 22px; }
.store small { display: block; font-size: .7rem; opacity: .8; font-weight: 600; }
.store b { font-size: 1.05rem; letter-spacing: -.01em; }

/* ---------- Phone frame + drive mode ---------- */
.phone { width: min(300px, 78vw); aspect-ratio: 9 / 19.2; margin-inline: auto; border-radius: 46px; background: #0a0f18;
  padding: 11px; box-shadow: 0 40px 90px rgba(0,0,0,.4), inset 0 0 0 2px #2b3440; position: relative; }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 84px; height: 24px; margin-left: -42px;
  background: #0a0f18; border-radius: 14px; z-index: 10; }
.phone .screen { width: 100%; height: 100%; border-radius: 36px; overflow: hidden; position: relative; background: #eef2ee; }
.phone svg.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone .instr { position: absolute; top: 52px; left: 10px; right: 10px; background: #12643a; color: #fff;
  border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; z-index: 2; }
.phone .instr .arrow { width: 38px; height: 38px; flex: none; }
.phone .instr b { font-size: 1.45rem; display: block; line-height: 1; }
.phone .instr small { opacity: .85; font-size: .8rem; }
.phone .bottom { position: absolute; left: 10px; right: 10px; bottom: 12px; background: #fff; border-radius: 18px; color: var(--ink);
  padding: 12px 14px; display: flex; justify-content: space-between; z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.phone .bottom div { text-align: center; }
.phone .bottom b { display: block; font-size: 1.1rem; }
.phone .bottom small { color: var(--muted); font-size: .7rem; }
.phone .speed { position: absolute; left: 14px; bottom: 100px; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--ink);
  display: grid; place-items: center; text-align: center; font-weight: 800; line-height: 1; z-index: 2; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.phone .speed small { display: block; font-size: .55rem; font-weight: 600; color: var(--muted); }

/* Search bar and bottom sheet in the story phone */
.ap-search { position: absolute; top: 52px; left: 12px; right: 12px; height: 42px; background: #fff; border-radius: 14px;
  display: flex; align-items: center; gap: 8px; padding: 0 12px; box-shadow: 0 6px 18px rgba(13,27,44,.14); font-weight: 700; color: var(--ink); z-index: 2; }
.ap-search svg { width: 18px; height: 18px; flex: none; }
.ap-q:empty::before { content: "Sök plats"; color: #9aa8b8; font-weight: 500; }
.ap-caret { width: 2px; height: 18px; background: var(--trail); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ap-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 24px 24px 0 0; padding: 10px 18px 22px;
  box-shadow: 0 -10px 30px rgba(13,27,44,.14); color: var(--ink); transform: translateY(110%); z-index: 2; }
.ap-grab { display: block; width: 38px; height: 5px; border-radius: 3px; background: #d6dee8; margin: 0 auto 10px; }
.ap-sheet small { color: var(--muted); font-weight: 600; }
.ap-row { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 10px; flex-wrap: wrap; }
.ap-row b { font-size: 1.7rem; letter-spacing: -.02em; }
.ap-row span { color: var(--muted); font-size: .8rem; }
.ap-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.ap-go { background: var(--green); color: #fff; text-align: center; font-weight: 800; padding: 13px; border-radius: 14px; font-size: 1.05rem; }

/* ---------- Widgets ---------- */


.fw { padding: 22px; }
.fw svg { width: 100%; height: auto; overflow: visible; }
.fw-tank { margin-top: 14px; }
.fw-row { display: flex; justify-content: space-between; align-items: baseline; }
.fw-row b.fw-l { font-size: 1.4rem; }
.fw-note { color: var(--muted); font-size: .85rem; }
.fuel-gauge { height: 14px; background: var(--snow-2); border-radius: 7px; overflow: hidden; margin: 10px 0 6px; }
.fuel-gauge .fw-bar { height: 100%; width: 100%; border-radius: 7px; background: linear-gradient(90deg, #ff9f1c, var(--green)); }

.friends-map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(13,27,44,.08); background: #eef3f8; }
.friends-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.ow { overflow: hidden; }
.ow-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: .9rem; }
.ow-sig { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.ow-sig i { width: 4px; background: var(--ink); border-radius: 1px; }
.ow-sig i:nth-child(1) { height: 4px; } .ow-sig i:nth-child(2) { height: 6px; } .ow-sig i:nth-child(3) { height: 9px; } .ow-sig i:nth-child(4) { height: 12px; }
.ow-none { margin-left: auto; background: #fff1df; color: #8a4b00; font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 99px; opacity: 0; }
.ow.off .ow-none { opacity: 1; }
.ow svg { width: 100%; height: auto; }
.ow-list { display: flex; gap: 10px; list-style: none; margin: 0; padding: 14px 18px 18px; flex-wrap: wrap; }
.ow-list li { background: #e3f7ec; color: #11683b; font-weight: 700; font-size: .85rem; padding: 6px 12px 6px 10px; border-radius: 99px; opacity: .3; }
.ow-list li::before { content: "✓ "; }
.ow.off .ow-list li { opacity: 1; }

/* ---------- Footer, FAQ, docs ---------- */
footer { background: var(--night); color: rgba(255,255,255,.6); padding: 40px 0; font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { color: rgba(255,255,255,.85); }

.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--trail); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 10px 0 0; max-width: 62ch; }

.doc { max-width: 720px; padding: 56px 0 88px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2em; letter-spacing: -.01em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .5em; }
.doc .meta { color: var(--muted); }

/* Elements revealed by JS start hidden (only when JS runs). */
.js [data-reveal] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; }
}

/* Fuel widget: header, warning, low state */
.fw-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; min-height: 30px; }
.fw-head small { color: var(--muted); font-weight: 700; }
.fw-warn { background: #fff1df; color: #8a4b00; font-weight: 800; font-size: .8rem; padding: 6px 10px; border-radius: 99px; opacity: 0; }
.fuel-gauge { position: relative; }
.fuel-gauge .fw-bar.low { background: var(--terrain); }
.fw-low { position: absolute; left: 25%; top: 0; bottom: 0; width: 2px; background: rgba(13,27,44,.25); }

/* Phones: keep the small map labels readable */
@media (max-width: 600px) {
  .fw svg text { font-size: 19px; font-weight: 700; }
  .friends-map { aspect-ratio: 1 / 1; }
}

/* Drive mode: ice prompt */
.phone .instr.ice { background: #1d4f86; }

/* Ice widget */
.iw-map { position: relative; }
.iw-map svg { width: 100%; height: auto; border-radius: 20px 20px 0 0; }
.iw-bubble { position: absolute; left: 50%; top: 10px; transform: translate(-50%, -6px); background: #1d4f86; color: #fff; font-weight: 800;
  font-size: .85rem; padding: 8px 12px; border-radius: 12px; box-shadow: 0 8px 20px rgba(13,27,44,.25); opacity: 0; transition: opacity .3s, transform .3s; white-space: nowrap; }
.iw-bubble.on { opacity: 1; transform: translate(-50%, 0); }
.iw-sum { padding: 16px 20px 20px; }
.iw-sum b { display: block; margin-bottom: 10px; }
.iw-sum b::before { content: "❄ "; }
.iw-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.iw-chips span { background: #e6f0fb; color: #1d4f86; font-weight: 700; font-size: .85rem; padding: 6px 11px; border-radius: 99px; opacity: 0; }
.iw-chips span.warn { background: #fff1df; color: #8a4b00; }
.iw-sum small { color: var(--muted); font-size: .85rem; }
@media (prefers-reduced-motion: reduce) { .iw-chips span { opacity: 1; } }

/* Terrain (3D) widget */
.tw { display: block; width: 100%; height: 100%; }
.terrain-frame { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 5 / 3; background: #f2f5f3;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.08); }
.terrain-frame .w-terrain { position: absolute; inset: 0; }
.terrain-hint { pointer-events: none; position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 4px 14px rgba(13,27,44,.12); font-weight: 700; font-size: .8rem;
  padding: 7px 12px; border-radius: 99px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (max-width: 600px) { .terrain-frame { aspect-ratio: 4 / 5; } }
