/* ─────────────────────────────────────────────────────────────────────────
   Spisas webbplats

   Samma designtokens som appen (lib/theme.ts): vit sida, varmbrun ink,
   amber accent. Ljust läge med flit — appen har ingen mörk variant, och
   sidan ska läsa som en förlängning av appen, inte som en annan produkt.

   Delad av index.html, support.html och integritetspolicy.html.
   ───────────────────────────────────────────────────────────────────────── */

/* Plus Jakarta Sans — SJÄLVHOSTAD, inte hämtad från Google.
   Integritetspolicyn lovar att sidan inte skickar något vidare om besöket,
   och ett <link> till fonts.googleapis.com hade skickat besökarens IP till
   Google vid varje sidvisning. Det är en variabel font: en fil per subset
   täcker hela vikt­spannet, totalt 48 KB. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/jakarta-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/jakarta-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Ytor */
  --page: #ffffff;
  --card: #fbfaf8;
  --sunken: #f4f2f0;
  --divider: #ece9e6;
  --stroke: #e0dcd7;

  /* Text — hierarkin görs med FÄRG, inte med tre textstorlekar */
  --ink-900: #221c11;
  --ink-700: #463c27;
  --ink-500: #7a6d56;
  --ink-300: #a89880;

  /* Amber */
  --primary: #fa975b;
  --primary-700: #8a4212;
  --primary-200: #f7d0ac;
  --primary-100: #fbe8d6;
  --primary-50: #fef7f0;
  --accent: #ebba6f;

  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 14px;

  --shadow-soft: 0 1px 2px rgb(34 28 17 / 4%), 0 8px 24px -12px rgb(34 28 17 / 12%);
  --shadow-phone: 0 40px 80px -32px rgb(34 28 17 / 28%), 0 12px 32px -16px rgb(34 28 17 / 14%);

  --wrap: 1120px;
  --prose: 680px;
  --gutter: 22px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink-900);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* height: auto är INTE valfritt. Bilderna bär width/height som HTML-attribut
   (så layouten inte hoppar medan de laddas), och sätter CSS bara bredden
   använder webbläsaren attributets höjd rakt av — telefonmockuperna blev
   390 px breda och 1778 px höga. */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

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

.prose {
  max-width: var(--prose);
}

/* ── Typografi ───────────────────────────────────────────────────────────
   Rubrikerna är tajta i både spårning och radavstånd. Det är det enskilt
   största som skiljer en 2026-sida från en 2016-sida.                     */

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 6.4vw, 4.15rem);
}

h2 {
  font-size: clamp(1.95rem, 4.6vw, 3rem);
}

h3 {
  font-size: clamp(1.15rem, 2.1vw, 1.35rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.lead {
  font-size: clamp(1.06rem, 1.9vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-500);
}

.muted {
  color: var(--ink-500);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary-700);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

/* ── Sidhuvud ─────────────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 76%);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.site-head.is-stuck {
  border-bottom-color: var(--divider);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

/* Kastrullen till vänster om ordbilden. Egen klass, inte `.brand img` —
   annars träffar måtten ordbilden också och klämmer ihop den. */
.mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
}

/* Ordbilden, inte app-ikonen. Höjd sätts, bredd följer av
   bildförhållandet 2,36:1 — den får ALDRIG en fast bredd också. */
.wordmark {
  height: 30px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.97rem;
  color: var(--ink-500);
}

.nav-links a {
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink-900);
}

/* ── Knappar ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    background-color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.btn-primary {
  background: var(--ink-900);
  color: #fff;
  box-shadow: 0 1px 2px rgb(34 28 17 / 20%), 0 10px 24px -12px rgb(34 28 17 / 45%);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgb(34 28 17 / 22%), 0 16px 30px -14px rgb(34 28 17 / 50%);
}

.btn-primary:active {
  transform: translateY(0) scale(0.985);
}

.btn-ghost {
  background: var(--page);
  color: var(--ink-900);
  border-color: var(--stroke);
}

.btn-ghost:hover {
  background: var(--card);
  border-color: var(--ink-300);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.93rem;
}

/* ── Hero ────────────────────────────────────────────────────────────────
   Bakgrunden är två mjuka radialer i amber, inte en platt färgruta. Det är
   det som gör att sidan känns "varm" utan att bli beige.                  */

.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 104px) 0;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto -20%;
  height: 900px;
  background:
    radial-gradient(48% 42% at 22% 18%, rgb(250 151 91 / 20%) 0%, transparent 68%),
    radial-gradient(44% 40% at 82% 8%, rgb(235 186 111 / 24%) 0%, transparent 66%);
  pointer-events: none;
}

/* Innehållet ovanpå dekorationen — inte dekorationen bakom sidbakgrunden.
   z-index: -1 hade fungerat bara så länge body-bakgrunden propagerar till
   canvas, och det är en regel man inte ska bygga en layout på. */
.hero > .wrap {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: center;
}

.hero-copy h1 {
  margin-bottom: 20px;
}

.hero-copy .lead {
  max-width: 34ch;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--ink-300);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}

.hero-art img {
  width: min(330px, 78vw);
  filter: drop-shadow(0 40px 60px rgb(34 28 17 / 24%));
}

/* Roterad platta bakom telefonen — ger djup utan att lägga på en ruta */
.hero-art::before {
  content: "";
  position: absolute;
  width: min(300px, 70vw);
  height: 68%;
  border-radius: 48px;
  background: linear-gradient(150deg, var(--primary-100), var(--primary-50));
  transform: rotate(-7deg);
}

.hero-art img {
  position: relative;
}

/* ── Källogotyper ─────────────────────────────────────────────────────── */

.sources {
  padding-block: clamp(46px, 7vw, 76px);
}

.sources-label {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-300);
  margin-bottom: 22px;
}

.sources-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 30px;
}

.sources-row img {
  height: 34px;
  width: auto;
  object-fit: contain;
  opacity: 0.72;
  filter: grayscale(1);
  transition: opacity 0.25s, filter 0.25s;
}

.sources-row img:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* ── Funktionssektioner ──────────────────────────────────────────────── */

.feature {
  padding-block: clamp(56px, 8vw, 104px);
}

.feature + .feature {
  padding-top: 0;
}

.feature-inner {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.feature-copy h2 {
  margin: 14px 0 18px;
}

.feature-copy .lead {
  max-width: 44ch;
}

.feature-art {
  display: grid;
  place-items: center;
  position: relative;
}

.feature-art img {
  width: min(300px, 72vw);
  filter: drop-shadow(0 34px 52px rgb(34 28 17 / 20%));
}

/* Mjuk platta bakom — samma trick som i hero, dämpat */
.feature-art::before {
  content: "";
  position: absolute;
  inset: 12% -6% 6%;
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.feature-art img {
  position: relative;
}

.feature--tinted .feature-art::before {
  background: linear-gradient(160deg, var(--primary-100), var(--primary-50));
}

/* Punktlista med bockar — inte en <ul> med prickar */
.checks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--ink-700);
  font-size: 1rem;
}

.checks svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--primary-700);
}

/* Butiksbrickor i extrapris-sektionen */
.store-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.store-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: var(--page);
  border: 1px solid var(--stroke);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
}

.store-chip img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: contain;
}

/* ── Rutnät av mindre funktioner ─────────────────────────────────────── */

.grid-section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section-head {
  max-width: var(--prose);
  margin-bottom: clamp(32px, 4vw, 52px);
}

.section-head h2 {
  margin: 14px 0 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 14px;
}

/* EN ram ELLER en yta — aldrig båda plus skugga. Hårfin kant mot en
   nästan omärkligt avvikande yta, ingen skugga.                          */
.card {
  padding: 26px 24px 28px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-200);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.card-icon svg {
  width: 21px;
  height: 21px;
  color: var(--primary-700);
}

.card h3 {
  margin-bottom: 7px;
}

.card p {
  color: var(--ink-500);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* ── FAQ ─────────────────────────────────────────────────────────────── */

.faq {
  padding-block: clamp(56px, 8vw, 96px);
}

.faq-list {
  max-width: var(--prose);
  border-top: 1px solid var(--divider);
}

details {
  border-bottom: 1px solid var(--divider);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.015em;
  list-style: none;
  transition: color 0.2s;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  color: var(--primary-700);
}

summary::after {
  content: "";
  width: 11px;
  height: 11px;
  flex: none;
  border-right: 2px solid var(--ink-300);
  border-bottom: 2px solid var(--ink-300);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.28s var(--ease);
}

details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

details > .answer {
  padding-bottom: 24px;
  color: var(--ink-500);
  max-width: 62ch;
}

details > .answer a {
  color: var(--primary-700);
}

/* ── Avslutande CTA ──────────────────────────────────────────────────── */

.cta {
  padding-block: clamp(56px, 8vw, 96px);
}

.cta-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #2a2216 0%, #221c11 55%, #2f2313 100%);
  color: #fff;
  padding: clamp(40px, 6vw, 72px) clamp(26px, 5vw, 64px);
  text-align: center;
}

.cta-box::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 420px;
  background: radial-gradient(50% 60% at 50% 100%, rgb(250 151 91 / 34%), transparent 70%);
  pointer-events: none;
}

.cta-box > * {
  position: relative;
}

.cta-box h2 {
  margin-bottom: 16px;
}

.cta-box p {
  color: rgb(255 255 255 / 68%);
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 30px;
}

.cta-box .btn-primary {
  background: #fff;
  color: var(--ink-900);
}

.cta-icon {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  margin: 0 auto 24px;
  display: block;
}

/* ── Sidfot ──────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--divider);
  padding-block: 40px 56px;
  font-size: 0.95rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 26px 40px;
  align-items: flex-start;
  justify-content: space-between;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.foot-brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.foot-brand .wordmark {
  height: 26px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.foot-links a {
  color: var(--ink-500);
  text-decoration: none;
  transition: color 0.2s;
}

.foot-links a:hover {
  color: var(--ink-900);
}

.foot-legal {
  width: 100%;
  color: var(--ink-300);
  font-size: 0.87rem;
  margin-top: 8px;
}

/* ── Innehållssidor (support, integritetspolicy) ─────────────────────── */

.doc {
  padding-block: clamp(44px, 6vw, 76px) clamp(40px, 6vw, 72px);
}

.doc h1 {
  font-size: clamp(2.05rem, 5vw, 3rem);
  margin-bottom: 16px;
}

.doc .lead {
  margin-bottom: 8px;
}

.doc h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  margin: 48px 0 12px;
}

.doc h3 {
  margin: 30px 0 6px;
}

.doc p,
.doc ul {
  color: var(--ink-700);
  margin-bottom: 14px;
  max-width: var(--prose);
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 7px;
}

.doc a {
  color: var(--primary-700);
  text-underline-offset: 2px;
}

.doc a:hover {
  color: var(--ink-900);
}

.updated {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sunken);
  color: var(--ink-500);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Grupperade rader: EN ram runt gruppen, hårfin avdelare mellan raderna,
   och avdelaren börjar där texten börjar — inte vid kanten.              */
.group {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--card);
  max-width: var(--prose);
  margin: 20px 0 30px;
}

.group .row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 18px 20px;
}

.group .row + .row {
  border-top: 1px solid var(--divider);
}

.row-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  display: grid;
  place-items: center;
  flex: none;
}

.row-icon svg {
  width: 17px;
  height: 17px;
  color: var(--primary-700);
}

.row-body {
  min-width: 0;
}

.row-title {
  font-weight: 600;
  letter-spacing: -0.015em;
}

.row-text {
  color: var(--ink-500);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-top: 2px;
}

.row-text a {
  color: var(--primary-700);
}

/* Kontaktbricka */
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-900);
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.contact-pill:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.contact-pill svg {
  width: 18px;
  height: 18px;
  color: var(--primary-700);
  flex: none;
}

.table-scroll {
  overflow-x: auto;
  max-width: var(--prose);
  margin-bottom: 26px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 420px;
}

th,
td {
  text-align: left;
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--ink-900);
  width: 38%;
}

td {
  color: var(--ink-500);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  font-size: 0.95rem;
  color: var(--ink-500);
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink-900);
}

.back-link svg {
  width: 15px;
  height: 15px;
}

/* ── Rörelse ─────────────────────────────────────────────────────────────
   Innehåll far in underifrån när det kommer in i vyn. Lugn översväng, inte
   studs. .reveal sätts av JS först när IntersectionObserver finns, så
   innehållet aldrig kan bli osynligt om skriptet inte kör.               */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(26px);
}

.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-reveal .reveal,
  .js-reveal .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Bredare skärmar ─────────────────────────────────────────────────── */

@media (min-width: 860px) {
  .hero-inner {
    grid-template-columns: 1.04fr 0.96fr;
    padding-bottom: clamp(30px, 4vw, 60px);
  }

  .hero-art img {
    width: min(390px, 42vw);
  }

  .hero-art::before {
    width: min(350px, 38vw);
  }

  .feature-inner {
    grid-template-columns: 1fr 1fr;
  }

  /* Varannan sektion speglad — bilden växlar sida nedåt sidan */
  .feature--mirror .feature-copy {
    order: 2;
  }

  .feature-art img {
    width: min(330px, 34vw);
  }

  .sources-row {
    gap: 18px 46px;
  }

  .sources-row img {
    height: 38px;
  }
}

@media (max-width: 859px) {
  .nav-links {
    display: none;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy .lead {
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .feature-copy {
    text-align: center;
  }

  .feature-copy .lead {
    margin-inline: auto;
  }

  .eyebrow {
    justify-content: center;
  }

  .checks {
    display: inline-grid;
    text-align: left;
  }

  .store-chips {
    justify-content: center;
  }
}
