/*
 * Landningssidans stil. Samma färger och typsnitt som appen (apps/mobile/src/theme.ts):
 * varm ljus bakgrund, korall sparad till det viktigaste, Familjen Grotesk i rubriker.
 */
:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --raised: #efebe5;
  --border: #e6e1da;
  --text: #1b1714;
  --muted: #70675e;
  --primary: #e8543f;
  --primary-ink: #ffffff;
  --tint: #fcebe7;
  --accent: #2a211b;
  --positive: #2e7d57;
  --radius: 18px;
  --display: 'Familjen Grotesk', system-ui, sans-serif;
  /* Alltid ljus, oavsett telefonens mörka läge: varumärket ska se likadant ut för alla. */
  color-scheme: light;
  --body: 'Instrument Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* --- Sidhuvud ------------------------------------------------------------ */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { height: 22px; width: auto; }
.top nav { display: flex; align-items: center; gap: 22px; }
.top nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.top nav a:hover { color: var(--text); }
@media (max-width: 720px) { .top nav .hide-sm { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font: 600 16px/1 var(--body); text-decoration: none; border: 0; cursor: pointer;
  background: var(--primary); color: var(--primary-ink) !important;
}
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: var(--raised); color: var(--text) !important; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 11px; }

/* --- Hjälte -------------------------------------------------------------- */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } .hero { padding-top: 40px; } }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--primary); background: var(--tint); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.08; }
h3 { font-size: 21px; line-height: 1.2; }
.lead { font-size: 19px; color: var(--muted); margin: 20px 0 30px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* --- Sektioner ----------------------------------------------------------- */
section { padding: 64px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin: 12px 0 0; font-size: 18px; }

/* --- Tre sätt att jobba --------------------------------------------------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .ways { grid-template-columns: 1fr; } }
.way { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; }
.way .tag { font-size: 13px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.04em; }
.way h3 { margin: 8px 0 18px; font-size: 23px; }
.way dl { margin: auto 0 0; display: grid; gap: 4px; border-top: 1px solid var(--border); padding-top: 16px; }
.way dt { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.way dd { margin: 0 0 10px; font-size: 16px; }
.way dd:last-child { margin-bottom: 0; }

.assurances { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; color: var(--muted); font-size: 15px; font-weight: 500; }
.assurances li { display: flex; align-items: center; gap: 8px; }
.assurances .icon { color: var(--positive); flex: none; }

/* --- Telefonen i hjälten --------------------------------------------------- */
.phone-stage { position: relative; display: flex; justify-content: center; padding: 10px 0 20px; }
.phone-stage::before {
  content: ''; position: absolute; inset: 8% 4% 4%; border-radius: 48px; z-index: 0;
  background: radial-gradient(closest-side, var(--tint), transparent);
}
.phone {
  position: relative; z-index: 1; width: 300px; height: 610px; border-radius: 46px; padding: 10px;
  background: #1b1714; box-shadow: 0 40px 80px -36px rgba(42, 33, 27, 0.55), inset 0 0 0 2px #3a322c;
}
.phone-screen { height: 100%; border-radius: 37px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.phone-status { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px 4px; font-size: 12px; font-weight: 600; }
.phone-status span:last-child { letter-spacing: -1px; font-size: 9px; }
.phone-island { width: 82px; height: 22px; border-radius: 12px; background: #1b1714; }
.phone-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 10px; }
.phone-head img { height: 13px; width: auto; }
.phone-head span { font: 700 15px/1 var(--display); }
.deck { position: relative; flex: 1; margin: 0 14px 20px; }
.dcard {
  position: absolute; inset: 0; border-radius: 20px; overflow: hidden; background: var(--surface);
  border: 2px solid var(--surface); display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(35, 28, 24, 0.06), 0 12px 28px -14px rgba(35, 28, 24, 0.28);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.4s;
}
.dcard[data-pos="0"] { z-index: 3; }
.dcard[data-pos="1"] { z-index: 2; transform: translateY(20px) scale(0.93); }
.dcard[data-pos="1"] > * { opacity: 0; }
.dcard[data-pos="1"] { background: var(--raised); border-color: var(--raised); box-shadow: none; }
.dcard[data-pos="2"] { z-index: 1; transform: translateY(20px) scale(0.93); opacity: 0; }
.dcard > * { transition: opacity 0.3s; }
.dcard.out { transform: translateX(135%) rotate(18deg); }
.dcard.still, .dcard.still > * { transition: none; }
.dphoto { position: relative; flex: 1; min-height: 0; background-size: cover; background-position: center; }
.demoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 88px; }
.dkind {
  position: absolute; left: 10px; top: 10px; background: rgba(255, 255, 255, 0.94); color: var(--text);
  font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 999px;
}
.dstamp {
  position: absolute; left: 14px; top: 46px; transform: rotate(-10deg); opacity: 0; transition: opacity 0.25s;
  border: 3px solid var(--positive); color: var(--positive); background: var(--bg); border-radius: 12px;
  padding: 6px 10px; font: 700 18px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase;
}
.dcard.liking .dstamp { opacity: 1; }
.dvenue { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; font-size: 12px; color: var(--muted); }
.dvenue i, .toast i, .founder i, .ms-creator i {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%; font-style: normal; font-weight: 700; color: #fff;
}
.dvenue i { width: 24px; height: 24px; background: var(--accent); font-size: 10px; }
.dvenue b { color: var(--text); }
.dbody { padding: 6px 12px 0; }
.dtitle { font: 700 16px/1.2 var(--display); }
.damount { font: 700 19px/1.2 var(--display); color: var(--primary); margin-top: 6px; }
.dsuffix { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dfoot { font-size: 11px; color: var(--muted); padding: 8px 12px 12px; border-top: 1px solid var(--border); margin-top: 10px; }
.dtrust { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: var(--muted); padding: 4px 12px; }
.dtrust .icon { width: 13px; height: 13px; color: var(--positive); }
.dactions { display: flex; justify-content: center; gap: 34px; padding: 6px 0 18px; font-size: 11px; color: var(--muted); }
.dactions > div { display: grid; justify-items: center; gap: 4px; }
.dactions b { color: var(--text); font-weight: 600; }
.dskip, .dlike { display: grid; place-items: center; border-radius: 50%; }
.dskip { width: 46px; height: 46px; background: var(--surface); border: 1px solid var(--border); }
.dlike { width: 54px; height: 54px; background: var(--primary); color: #fff; transition: transform 0.2s; }
.dlike.pulse { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(232, 84, 63, 0.18); }
.toast {
  position: absolute; z-index: 2; right: 50%; bottom: 120px; transform: translate(calc(50% + 150px), 12px);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px;
  box-shadow: 0 18px 40px -18px rgba(42, 33, 27, 0.45); font-size: 13px; line-height: 1.35;
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translate(calc(50% + 150px), 0); }
.toast i { width: 30px; height: 30px; background: var(--positive); }
.toast i .icon { width: 16px; height: 16px; }
.toast b { display: block; }
.toast span span { color: var(--muted); }
@media (max-width: 860px) {
  .toast, .toast.show { right: 50%; transform: translate(50%, 0); bottom: 96px; }
  .toast { transform: translate(50%, 12px); }
}
@media (prefers-reduced-motion: reduce) { .dcard, .toast { transition: none; } }

/* --- Stegen som små skärmar ----------------------------------------------- */
.mini-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) {
  .mini-steps {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 220px;
    overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 4px 20px 16px;
  }
  .mini-step { scroll-snap-align: start; }
}
.mini-step h3 { font-size: 18px; margin-top: 16px; }
.mini-step h3::before {
  counter-increment: step; content: counter(step); display: inline-grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%; margin-right: 8px; vertical-align: 2px;
  background: var(--primary); color: var(--primary-ink); font: 700 13px/1 var(--display);
}
.mini-steps { counter-reset: step; }
.mini-step p { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.mini { background: #1b1714; border-radius: 30px; padding: 7px; box-shadow: 0 24px 50px -30px rgba(42, 33, 27, 0.5); }
.mini-screen {
  height: 360px; border-radius: 24px; background: var(--bg); overflow: hidden; padding: 22px 14px 14px;
  display: flex; flex-direction: column; gap: 8px; font-size: 12px;
}
.ms-title { font: 700 16px/1.2 var(--display); margin-bottom: 4px; }
.ms-prompt { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; font-style: italic; }
.ms-ai { display: flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 11px; }
.ms-ai .icon { width: 14px; height: 14px; }
.ms-row { display: flex; justify-content: space-between; background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.ms-row span { color: var(--muted); }
.ms-btn { margin-top: auto; background: var(--primary); color: #fff; text-align: center; border-radius: 11px; padding: 10px; font-weight: 600; }
.ms-creator { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 12px; padding: 8px; }
.ms-creator i { width: 32px; height: 32px; font-size: 11px; }
.ms-creator span { flex: 1; display: grid; }
.ms-creator small { color: var(--muted); font-size: 10.5px; }
.ms-creator em { font-style: normal; font-weight: 600; font-size: 11px; border-radius: 8px; padding: 5px 9px; background: var(--raised); }
.ms-creator em.on { background: var(--primary); color: #fff; }
.ms-note { margin-top: auto; color: var(--muted); font-size: 11px; text-align: center; }
.ms-ticket {
  margin: auto 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px;
  display: grid; gap: 2px; text-align: left; box-shadow: 0 14px 30px -20px rgba(42, 33, 27, 0.4);
}
.ms-ticket img { height: 11px; width: auto; justify-self: center; margin-bottom: 6px; }
.ms-tname { text-align: center; font: 700 15px/1.2 var(--display); }
.ms-when { background: var(--tint); border-radius: 10px; text-align: center; padding: 8px; margin: 8px 0 2px; }
.ms-when b { display: block; font: 700 16px/1.1 var(--display); }
.ms-when span, .ms-ticket small { color: var(--muted); font-size: 10.5px; }
.ms-perf { border-top: 2px dashed var(--border); margin: 8px -14px; }
.ms-value { color: var(--primary); font-size: 11px; }
.ms-code { text-align: center; letter-spacing: 0.08em; }
.ms-video {
  position: relative; flex: 1; border-radius: 16px; background: #8a6a4a center / cover;
  display: grid; place-items: center; color: #fff;
}
.ms-video::after { content: ''; position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.35)); }
.ms-play { position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); display: grid; place-items: center; }
.ms-ok {
  position: absolute; z-index: 1; left: 10px; top: 10px; display: flex; align-items: center; gap: 5px;
  background: var(--positive); color: #fff; font-weight: 700; font-size: 11px; border-radius: 999px; padding: 5px 9px 5px 6px;
}
.ms-ok .icon { width: 14px; height: 14px; }
.ms-pub { display: grid; padding: 2px 2px 0; }
.ms-pub small { color: var(--muted); }

/* --- Grundarna ------------------------------------------------------------- */
.founders { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .founders { grid-template-columns: 1fr; gap: 8px; } }
.founders .section-head { margin-bottom: 0; }
.founder-cards { display: grid; gap: 12px; }
.founder { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; }
.founder i { width: 56px; height: 56px; font: 700 20px/1 var(--display); }
.founder div { display: grid; }
.founder b { font: 700 20px/1.2 var(--display); }
.founder span { color: var(--muted); font-size: 15px; }

/* --- Räkneexempel --------------------------------------------------------- */
.growth { display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: stretch; }
@media (max-width: 860px) { .growth { grid-template-columns: 1fr; } }
.chart-card { margin: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 22px; padding: 22px; min-width: 0; }
.chart-card figcaption { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.chart-card h3 { font-size: 18px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i, .chart-tip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.chart { position: relative; width: 100%; min-height: 260px; touch-action: pan-y; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { stroke: #cfc8bf; stroke-width: 1; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .tick { fill: var(--muted); font: 500 12px/1 var(--body); }
.chart .end { fill: var(--text); font: 700 14px/1 var(--display); }
.chart-tip {
  position: absolute; pointer-events: none; min-width: 168px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 30px -14px rgba(42, 33, 27, 0.35); padding: 10px 12px; font-size: 14px;
}
.chart-tip strong { display: block; margin-bottom: 4px; }
.chart-tip div { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.chart-tip b { margin-left: auto; padding-left: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-table { margin-top: 10px; font-size: 14px; }
.chart-table summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.table-scroll { overflow-x: auto; }
.chart-table table { border-collapse: collapse; width: 100%; margin-top: 10px; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.chart-table th:first-child { text-align: left; }
.chart-table thead th { color: var(--muted); font-weight: 600; }
.tiles { display: grid; gap: 12px; }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; display: grid; gap: 4px; align-content: center; }
.tile b { font: 700 30px/1.1 var(--display); letter-spacing: -0.02em; }
.tile span { color: var(--muted); font-size: 15px; }
.fineprint.growth-note { margin-top: 18px; max-width: 46em; }

/* --- Formulär ------------------------------------------------------------ */
.signup { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .signup { grid-template-columns: 1fr; gap: 28px; } }
form { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 26px; display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
label small { font-weight: 400; color: var(--muted); }
input, textarea, select {
  font: 400 16px/1.4 var(--body); color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 96px; resize: vertical; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; padding: 0; margin: 0; }
.roles legend { font-weight: 600; font-size: 15px; margin-bottom: 6px; padding: 0; }
.roles label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg); font-weight: 600;
}
.roles input { width: auto; accent-color: var(--primary); }
.roles label:has(input:checked) { border-color: var(--primary); background: var(--tint); }
.fineprint { font-size: 13px; color: var(--muted); margin: 0; }
.hidden { position: absolute; left: -9999px; }
section.alt form { background: var(--bg); }
section.alt form input, section.alt form textarea, section.alt .roles label { background: var(--surface); }
section.alt .roles label:has(input:checked) { background: var(--tint); }

/* --- Sidfot -------------------------------------------------------------- */
footer { padding: 40px 0 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* --- Juridiska sidor ----------------------------------------------------- */
.doc { max-width: 720px; padding: 48px 20px 24px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); }
.doc .lead { margin: 16px 0 6px; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.doc h2 { font-size: 24px; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; display: grid; gap: 8px; }

.thanks { text-align: center; padding: 96px 20px; max-width: 560px; margin: 0 auto; }
.thanks p { color: var(--muted); font-size: 18px; margin: 14px 0 28px; }
