/* bokforax.se – bara startsidan (Mac-lanseringen 2026). Bygger på variablerna i site.css; inga nya färger på text utom de som
   WebbplatsKontrastTests räknar på (testet läser site.css och den här filen). site.css lämnas orörd så att de genererade
   sidorna i hjalp/ och utvecklare/ inte blir inaktuella. */

/* Menyn: fler val än på de andra sidorna, så de minst viktiga göms tidigare. */
@media (max-width: 1080px) { .nav a.wide { display: none; } }

/* ------------------------------------------------------------------ hjälten */
.hero-x { padding: 56px 0 36px; }
.hero-text { max-width: 860px; margin: 0 auto; text-align: center; }
.hero-text .lead { margin-left: auto; margin-right: auto; }
.hero-text .stores { justify-content: center; }
.hero-text .note { margin: 0; }
.store.mac svg { width: 30px; height: 30px; }

/* Enheterna: en Windows-dator, en Mac och en iPhone med riktiga skärmar ur programmen. Allt i procent av scenens bredd, så
   att bilden skalar som en enda illustration från telefon till stor skärm. */
.devices { position: relative; max-width: 1080px; margin: 46px auto 0; aspect-ratio: 100 / 46; }
.device { position: absolute; bottom: 0; margin: 0; }
.device figcaption { margin-top: 10px; text-align: center; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.device img { width: 100%; height: auto; }

.device.win { left: 0; width: 45%; z-index: 1; }
.device.mac { left: 33%; width: 56%; z-index: 2; }
.device.iphone { right: 0; width: 14.5%; z-index: 3; }

.laptop .screen { position: relative; padding: 2.4% 2.4% 3.2%; border-radius: 14px 14px 4px 4px; background: #0b0d0e;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 30px 60px -20px rgba(6, 63, 57, .35); }
.laptop .screen img { border-radius: 3px; background: #fff; }
.laptop .base { position: relative; height: 0; padding-bottom: 3.4%; margin: 0 -6.5%; border-radius: 0 0 14px 14px / 0 0 70% 70%; }
.laptop .base::before { content: ""; position: absolute; left: 50%; top: 0; width: 15%; height: 42%; transform: translateX(-50%);
  border-radius: 0 0 8px 8px; }

/* Mac: tunn ram med kameraskåra, aluminiumbotten med greppkant. */
.mac .screen::before { content: ""; position: absolute; left: 50%; top: 0; width: 9%; height: 2.6%; transform: translateX(-50%);
  background: #0b0d0e; border-radius: 0 0 6px 6px; z-index: 1; }
.mac .base { background: linear-gradient(#e4e7ea, #c3c8cd 55%, #9aa1a8); }
.mac .base::before { background: linear-gradient(#a9afb5, #c9ced3); }

/* Windows-datorn: grafitgrå, kameraprick i ramen och tjockare underkant. */
.win .screen { background: #15181b; padding: 2.6% 2.6% 4.2%; border-radius: 10px 10px 3px 3px; }
.win .screen::before { content: ""; position: absolute; left: 50%; top: 1%; width: .9%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: #2f3539; }
.win .base { background: linear-gradient(#4a5056, #2b2f33 60%, #1c1f22); padding-bottom: 3%; margin: 0 -4.5%; border-radius: 0 0 8px 8px / 0 0 60% 60%; }
.win .base::before { background: #1b1e21; width: 20%; height: 30%; }

/* iPhone: skärmbilden från App Store har redan statusraden och Dynamic Island. */
.iphone .screen { padding: 4%; border-radius: 16% / 7.4%; background: #0b0d0e;
  box-shadow: 0 0 0 1.5px #3a4046 inset, 0 30px 50px -18px rgba(6, 63, 57, .45); }
.iphone .screen img { border-radius: 12.5% / 5.8%; }

@media (prefers-color-scheme: dark) {
  .laptop .screen, .iphone .screen { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 30px 60px -20px rgba(0, 0, 0, .7); }
  .mac .base { background: linear-gradient(#b9bec3, #8f969d 55%, #6c737a); }
}

@media (max-width: 640px) {
  .devices { aspect-ratio: 100 / 54; margin-top: 34px; }
  .device.win { width: 47%; }
  .device.mac { left: 28%; width: 58%; }
  .device.iphone { width: 19%; }
  .device figcaption { font-size: .78rem; margin-top: 6px; }
  .laptop .screen { border-radius: 8px 8px 2px 2px; }
}

/* ------------------------------------------------------------------ gratis */
.free { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.free div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.free strong { display: block; font-size: 1.12rem; margin-bottom: 4px; }
.free p { margin: 0; color: var(--ink-soft); }
@media (max-width: 820px) { .free { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ så fungerar det */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: steg; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex;
  flex-direction: column; }
.step .shot { aspect-ratio: 4 / 3; overflow: hidden; display: flex; align-items: flex-start; justify-content: center;
  padding: 22px 22px 0; background: color-mix(in srgb, var(--brand) 10%, var(--bg)); border-bottom: 1px solid var(--line); }
.step .shot picture { display: block; width: 100%; }
.step .shot.phone picture { width: 62%; }
.step .shot img { width: 100%; border-radius: 10px 10px 0 0; box-shadow: var(--shadow); }
.step .shot.phone img { border-radius: 26px 26px 0 0; border: 6px solid #0b1715; border-bottom: 0; }
.step .text { padding: 20px 22px 22px; }
.step .text p { margin: 0; color: var(--ink-soft); }
.step h3 { display: flex; align-items: center; gap: 12px; }
.step-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem;
  font-weight: 750; background: var(--brand); color: #fff; }
/* I en kolumn (surfplatta, telefon) blir korten breda: utsnitten (520 och 400 px) visas då inte bredare än att de håller
   sig skarpa på en skärm med dubbel upplösning, och telefonen inte högre än kortet. */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .step .shot { aspect-ratio: auto; max-height: 340px; }
  .step .shot picture { max-width: 380px; }
  .step .shot.phone picture { max-width: 240px; }
  .shot-fig.narrow { max-width: 480px; margin: 0 auto; }
}

/* Mindre rörelse (WCAG 2.3.3): ingen mjuk rullning och inga lyft vid hovring. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .store:hover { transform: none; }
}

/* Skärmbilder i visningarna: vilket program bilden kommer från. */
.shot-fig { margin: 0; }
.shot-fig figcaption { margin-top: 10px; font-size: .9rem; color: var(--muted); text-align: center; }

/* ------------------------------------------------------------------ enheterna */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.platform { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.platform .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: color-mix(in srgb, var(--brand) 12%, var(--bg)); color: var(--brand-text); }
.platform .ic svg { width: 24px; height: 24px; }
.platform ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.platform li { margin-bottom: .35em; }
@media (max-width: 900px) { .platforms { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ ladda ner */
.download .dl { position: relative; }
.dl .flag { position: absolute; top: -12px; left: 22px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; }
.dl .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.soon { display: inline-block; align-self: flex-start; margin-top: 12px; padding: 4px 11px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  color: var(--ink-soft); background: var(--bg-soft); border: 1px dashed var(--field); }
.checks { list-style: none; padding: 0; margin: 0 0 14px; color: var(--ink-soft); font-size: .95rem; }
.checks li { padding-left: 24px; position: relative; margin-bottom: .3em; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-text); font-weight: 700; }

/* ------------------------------------------------------------------ nytt i versionen */
a.badge-link { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; margin-bottom: 14px; text-decoration: none;
  transition: border-color .15s ease, transform .15s ease; }
a.badge-link:hover { border-color: var(--brand); transform: translateY(-1px); }
.badge-new { padding: 2px 9px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .74rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; }
.badge-arrow { transition: transform .15s ease; }
a.badge-link:hover .badge-arrow { transform: translateX(3px); }

section.news-section { padding-top: 0; }
.release { position: relative; overflow: hidden; isolation: isolate; border-radius: 26px; padding: 48px; color: #fff;
  background: linear-gradient(140deg, var(--brand-deep) 0%, var(--brand-dark) 62%, #08695d 100%);
  box-shadow: 0 2px 4px rgba(6, 63, 57, .12), 0 24px 60px rgba(6, 63, 57, .22); }
.release::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(620px 340px at 100% 0%, rgba(102, 226, 196, .26), transparent 70%),
              radial-gradient(420px 260px at 0% 100%, rgba(102, 226, 196, .10), transparent 70%); }
.release-head { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; margin-bottom: 36px; }
.release-head h2 { color: #fff; margin-bottom: .35em; }
.release-head p { margin: 0; max-width: 40em; color: rgba(255, 255, 255, .86); font-size: 1.08rem; }
.release-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--mint); }
.release-date { font-weight: 600; letter-spacing: .02em; text-transform: none; color: rgba(255, 255, 255, .7); font-size: .9rem; }
.release-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.release .release-btn { background: #fff; color: var(--brand-deep); white-space: nowrap; }
.release .release-btn:hover { background: #e7f8f3; color: var(--brand-deep); }
.release-more { color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.release-more:hover { border-bottom-color: var(--mint); color: var(--mint); }
.release a:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.release-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.release-list li { padding: 22px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
  transition: background .15s ease, border-color .15s ease; }
.release-list li:hover { background: rgba(255, 255, 255, .1); border-color: rgba(102, 226, 196, .4); }
.release-list strong { display: block; font-size: 1.06rem; margin: 0 0 6px; color: #fff; }
.release-list p { margin: 0; color: rgba(255, 255, 255, .8); font-size: .96rem; }
.rl-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(102, 226, 196, .16); color: var(--mint); }
.rl-ic svg { width: 22px; height: 22px; }
@media (prefers-color-scheme: dark) {
  .release { border: 1px solid rgba(102, 226, 196, .18); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
}
@media (max-width: 900px) {
  .release { padding: 36px 28px; }
  .release-head { grid-template-columns: 1fr; align-items: start; }
  .release-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
  .release-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .release { padding: 28px 18px; border-radius: 20px; }
  .release-list { grid-template-columns: 1fr; gap: 12px; }
  .release-list li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; padding: 18px 16px; }
  .release-list .rl-ic { grid-row: span 2; margin: 0; }
  .badge-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  a.badge-link, .badge-arrow, .release-list li { transition: none; }
}
