/* Flokks – nettsiden (variant 3b «Myke kort, forbedret») */

/* Plus Jakarta Sans (SIL Open Font License, skrift/OFL.txt), latinsk utvalg, variabel 400–800 – ligger på egen server så ingen andre ser besøkene */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("skrift/plus-jakarta-sans.woff2") format("woff2");
}

:root {
  --bg: #FBFAFD;
  --ink: #302A42;
  --muted: #5E5670;
  --surface: #FFFFFF;
  --line: #ECE6F3;
  --soft: #F6F2FB;
  --tint: #EFE9F7;
  --accent: #6B50A1;
  --accent-hover: #4E3880;
  --lilac: #CCB5FF;
  --on-lilac: #302046;
  --night: #302A42;
  --night-row: #3D3651;
  --night-ink: #F4EFFF;
  --night-muted: #C9C0D8;
  --shadow-card: 0 2px 4px rgba(68, 44, 110, .05), 0 18px 40px rgba(68, 44, 110, .12);
  --shadow-dark: 0 2px 4px rgba(68, 44, 110, .08), 0 18px 40px rgba(68, 44, 110, .22);
  --shadow-phone: 0 2px 6px rgba(68, 44, 110, .08), 0 40px 80px rgba(68, 44, 110, .22);
  --max: 1200px;
  --gutter: 24px;
  color-scheme: light;
}

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

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

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

img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--night); color: var(--night-ink); padding: 10px 16px; border-radius: 12px;
  text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; color: var(--night-ink); }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.time { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Topp ---------- */

.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.4px;
}
.brand:hover { color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.menu > a {
  color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
}
.menu > a:hover { background: var(--tint); color: var(--ink); }
.menu > a[aria-current="page"] { background: var(--tint); }

.lang {
  display: inline-flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; margin-left: 4px;
}
.lang a {
  text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; line-height: 1.2;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { color: #FFFFFF; background: var(--night); }

@media (max-width: 560px) {
  .top { flex-wrap: nowrap; }
  .menu { flex-wrap: nowrap; }
  .menu > a { padding: 10px; }
  .menu > a.optional { display: none; }
}

/* ---------- Forsiden: toppen ---------- */

.hero { padding-top: 56px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px; font-size: 14px; color: var(--muted); font-weight: 500;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

h1 {
  margin: 24px auto 18px; max-width: 14ch;
  font-weight: 800; font-size: clamp(40px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -.03em;
  text-wrap: balance;
}
.lead { margin: 0 auto 32px; max-width: 40ch; font-size: 20px; color: var(--muted); text-wrap: pretty; }

.button {
  display: inline-block; background: var(--accent); color: #FFFFFF; text-decoration: none;
  padding: 17px 32px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(107, 80, 161, .28);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { color: #FFFFFF; background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(107, 80, 161, .32); }
.button.light { background: var(--lilac); color: var(--on-lilac); box-shadow: none; padding: 15px 24px; }
.button.light:hover { background: #DCCBFF; color: var(--on-lilac); }

/* ---------- Scenen med telefonen ---------- */

.stage-wrap { padding-top: 64px; }
.stage {
  background: radial-gradient(ellipse 55% 60% at 50% 62%, #FAF7FE 0%, var(--tint) 70%);
  border-radius: 48px; padding: 64px 24px 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px;
  overflow: hidden;
}
.stage .side { flex: 1 1 260px; max-width: 320px; display: flex; flex-direction: column; gap: 18px; padding-bottom: 64px; }

.card {
  background: var(--surface); border-radius: 24px; padding: 16px 20px 16px 16px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-card);
}
.card img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.card .name { flex: 1; font-weight: 600; }
.card .when { text-align: right; }
.card .when strong { display: block; font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.card .when small { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.card.changed .when strong { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.card.changed .when small { color: var(--accent); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.card.dark { background: var(--night); color: var(--night-ink); box-shadow: var(--shadow-dark); }
.card.dark .when small { color: var(--lilac); }

.tilt-a { rotate: -2deg; }
.tilt-b { rotate: 1.5deg; margin-left: 28px; }
.tilt-c { rotate: 2deg; }
.tilt-d { rotate: -1.5deg; margin-right: 28px; }

.float-a { animation: float 7s ease-in-out infinite; }
.float-b { animation: float 8s ease-in-out -2s infinite; }
.float-c { animation: float 7.5s ease-in-out -4s infinite; }
.float-d { animation: float 8.5s ease-in-out -1s infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) {
  .float-a, .float-b, .float-c, .float-d { animation: none; }
}

/* Skjermbildet med hvit kant (variant 3b). Apples iPhone-ramme kan brukes først når
   appen ligger i App Store – da uendret, uten skygge eller beskjæring, og med varemerkelinje. */
.phone {
  flex: 0 0 auto; align-self: flex-start; position: relative; width: min(280px, 68vw); aspect-ratio: 804 / 1748; margin: 0 0 -120px;
  border: 8px solid #fff; border-radius: 46px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 60px rgba(68, 44, 110, .22), 0 2px 6px rgba(68, 44, 110, .08), 0 0 0 1px rgba(68, 44, 110, .06);
}
.phone .screen { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 38px; }

@media (max-width: 760px) {
  .wide-only { display: none !important; }
  .stage { padding-top: 32px; border-radius: 36px; }
  .stage .side { padding-bottom: 32px; }
  .tilt-d { margin-right: 0; }
}

/* ---------- Funksjoner ---------- */

section.block { padding-top: 128px; }
@media (max-width: 760px) { section.block { padding-top: 88px; } }

h2 {
  font-weight: 800; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -.028em; line-height: 1.08;
  text-wrap: balance;
}
.center-title { margin: 0 auto 40px; max-width: 18ch; text-align: center; }

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento > .span2 { grid-column: span 2; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento > .span2 { grid-column: auto; }
}

.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 32px; }
.feature h3 { margin: 0 0 8px; font-size: 24px; letter-spacing: -.5px; line-height: 1.25; }
.feature p { margin: 0; color: var(--muted); }
.feature p + .demo { margin-top: 20px; }
.feature.wide { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.feature.wide > div { flex: 1 1 240px; min-width: 0; }
.icon { width: 52px; height: 52px; border-radius: 16px; background: var(--tint); display: grid; place-items: center; margin-bottom: 20px; }

.times { flex: 1 1 280px; min-width: 0; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.times li { background: var(--soft); border-radius: 16px; padding: 12px 16px; }
.times strong { display: block; font-size: 26px; line-height: 1.1; }
.times strong.none { font-size: 22px; line-height: 1.25; color: var(--muted); }
.times span { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--soft); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.chips span.on { background: var(--accent); color: #FFFFFF; }

.weeks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; max-width: 260px; }
.weeks span { height: 22px; border-radius: 7px; background: var(--soft); }
.weeks span.h { background: var(--lilac); }
.weeks span.w { background: var(--line); }

.faces { display: flex; align-items: center; }
.faces img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); }
.faces img + img { margin-left: -12px; }
.faces span { margin-left: 12px; font-size: 14px; color: var(--muted); font-weight: 600; }

/* ---------- Widget ---------- */

.widget-band {
  background: var(--tint); border-radius: 48px; padding: clamp(32px, 5vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
}
.widget-band > div:first-child { flex: 1 1 300px; min-width: 0; }
.widget-band h2 { margin: 0 0 12px; }
.widget-band p { margin: 0; color: var(--muted); max-width: 36ch; }
.widgets { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 20px; }

.home-widget {
  width: min(100%, 360px); background: var(--surface); border-radius: 28px; padding: 20px 16px;
  box-shadow: 0 18px 40px rgba(68, 44, 110, .14);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center;
}
.home-widget img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.home-widget strong { display: flex; justify-content: center; align-items: center; gap: 5px; font-size: 26px; line-height: 1.2; margin-top: 6px; }
.home-widget .changed { color: var(--accent); }
.home-widget .changed .dot { width: 6px; height: 6px; }
.home-widget span.n { font-size: 13px; color: var(--muted); }

.lock-widget {
  width: min(100%, 220px); background: var(--night); color: var(--night-ink); border-radius: 20px;
  padding: 12px 18px; font-size: 15px; line-height: 1.45; box-shadow: 0 18px 40px rgba(68, 44, 110, .18);
}
.lock-widget div { display: flex; justify-content: space-between; }

/* ---------- Vil dere teste? ---------- */

.test { padding-top: 96px; padding-bottom: 96px; scroll-margin-top: 8px; }
.test-band {
  background: var(--night); color: var(--night-ink); border-radius: 40px; padding: clamp(32px, 5vw, 64px);
  display: flex; flex-wrap: wrap; gap: 40px;
}
.test-band > div { flex: 1 1 300px; min-width: 0; }
.test-band h2 { margin: 0 0 12px; font-size: clamp(32px, 4vw, 48px); line-height: 1.05; }
.test-band p { margin: 0 0 24px; color: var(--night-muted); }
.steps { flex: 2 1 420px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.steps li {
  display: flex; gap: 16px; align-items: center; background: var(--night-row);
  border-radius: 20px; padding: 14px 18px; counter-increment: step;
}
.steps li::before {
  content: counter(step); flex: 0 0 36px; height: 36px; border-radius: 50%;
  background: var(--lilac); color: var(--on-lilac); display: grid; place-items: center; font-weight: 800;
}
.steps li span { color: var(--night-muted); }

/* ---------- Hvem står bak ---------- */

.about { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter) 96px; text-align: center; }
.about h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.5px; }
.about p { margin: 0; color: var(--muted); }
.about p + p { margin-top: 12px; }
.about .tagline { color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.3px; }

/* ---------- Bunn ---------- */

footer { border-top: 1px solid var(--line); }
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 28px; padding-bottom: 48px; color: var(--muted); font-size: 14px;
}
.foot > span { display: flex; align-items: center; gap: 10px; }
.foot img { width: 24px; height: 24px; border-radius: 7px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* ---------- Tekstsider (personvern) ---------- */

.page { max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.page h1 { margin: 0 0 12px; max-width: none; font-size: clamp(36px, 5vw, 56px); text-align: left; }
.page .updated { margin: 0 0 40px; color: var(--muted); }
.page .intro { font-size: 20px; margin: 0 0 40px; text-wrap: pretty; }
.page section {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: 28px 32px; margin-bottom: 16px;
}
.page h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.5px; }
.page ul { margin: 0; padding-left: 1.2em; }
.page li { margin: 0 0 10px; color: var(--muted); }
.page li:last-child { margin-bottom: 0; }
.page li strong { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .page section { padding: 24px 20px; } }

/* ---------- Slik tester du ---------- */

.page section > p { margin: 0 0 16px; color: var(--muted); }
.page .guide { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.page .guide li { position: relative; padding-left: 52px; counter-increment: step; min-height: 36px; }
.page .guide li::before {
  content: counter(step); position: absolute; left: 0; top: -4px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--lilac); color: var(--on-lilac); display: grid; place-items: center; font-weight: 800;
}
.page .guide p { margin: 0; color: var(--muted); }
.page .guide strong { color: var(--ink); font-weight: 700; }
.page .guide .tip { margin-top: 10px; padding: 12px 16px; border-radius: 16px; background: var(--tint); color: var(--ink); font-size: 15px; }
.more { margin: 20px 0 0; text-align: center; }
.more a { color: var(--accent); font-weight: 700; }
