/* Blund: Skumring-temaet fra appen. Lavendel og fersken om dagen, natthimmel i mørk modus. */
:root {
  --bg: #f3f0fa;
  --card: #ffffff;
  --text: #3b3561;
  --muted: #6f6894;
  --accent: #8b7fd1;
  --on-accent: #ffffff;
  --wake: #f2b49b;
  --on-wake: #5c2e1c;
  --star: #c9c1f0;
  --line: rgba(59, 53, 97, 0.1);
  --night: #2e2950;
  --shadow: 0 10px 30px rgba(59, 53, 97, 0.08);
  --radius: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1730;
    --card: #262242;
    --text: #e9e5fa;
    --muted: #a49dc8;
    --accent: #9c91e0;
    --on-accent: #1a1730;
    --wake: #d99a82;
    --on-wake: #3a1c10;
    --star: #8f86c9;
    --line: rgba(233, 229, 250, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topp og bunn */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav {
  display: flex;
  gap: 20px;
  white-space: nowrap;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  text-decoration: underline;
}

.nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.foot {
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* Forsiden: bare toppen, ikonet og knappen, så alt får plass uten å scrolle. */

.home .wrap {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.home main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home .hero {
  padding: 16px 0 32px;
}

.hero {
  position: relative;
  text-align: center;
  padding: 56px 0 40px;
}

/* Stjernene står rundt ikonet, så de aldri havner oppå teksten uansett skjermbredde. */
.icon-wrap {
  position: relative;
  display: inline-block;
  vertical-align: top;
}

.hero .icon {
  display: block;

  width: 132px;
  height: 132px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(44px, 9vw, 72px);
  line-height: 1.05;
  margin: 24px 0 12px;
  letter-spacing: -0.02em;
}

.lead {
  font-size: clamp(19px, 3.2vw, 23px);
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}

.store[aria-disabled="true"] {
  cursor: default;
}

.store-note {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.sparkle {
  position: absolute;
  width: 22px;
  height: 22px;
  color: var(--star);
  pointer-events: none;
}

.sparkle-1 {
  top: 6px;
  left: -78px;
}

.sparkle-2 {
  top: 78px;
  right: -88px;
  width: 30px;
  height: 30px;
}

.sparkle-3 {
  top: -30px;
  right: -46px;
  width: 16px;
  height: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  .sparkle {
    animation: twinkle 3.2s ease-in-out infinite;
  }
  .sparkle:nth-of-type(2) {
    animation-delay: 1.1s;
  }
  .sparkle:nth-of-type(3) {
    animation-delay: 2.2s;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.screens {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 24px 0 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.screens figure {
  margin: 0;
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
}

.screens img {
  width: 240px;
  height: auto;
  border-radius: 34px;
  border: 6px solid var(--card);
  box-shadow: var(--shadow);
  display: block;
}

.screens figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 5vw, 38px);
  margin: 64px 0 8px;
}

.section-lead {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 560px;
}

.page-title {
  margin-top: 24px;
}

.about {
  padding-bottom: 64px;
}

.features {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.feature .badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  margin-bottom: 12px;
}

.feature .badge svg {
  width: 24px;
  height: 24px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.promise {
  margin-top: 64px;
  background: var(--night);
  color: #e9e5fa;
  border-radius: 32px;
  padding: 40px 28px;
  text-align: center;
}

.promise h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 32px);
}

.promise p {
  margin: 0 auto;
  max-width: 560px;
  color: #c9c1f0;
}

.promise a {
  color: #f2b49b;
}

/* Tekstsider */

.prose {
  max-width: 720px;
  margin: 24px auto 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.prose h1 {
  margin-top: 0;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.15;
}

.prose h2 {
  margin-top: 32px;
  font-size: 22px;
}

.prose li {
  margin: 4px 0;
}

.prose .updated {
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 380px) {
  .wrap {
    padding: 0 16px;
  }
  .brand {
    font-size: 18px;
  }
  .nav {
    gap: 12px;
    font-size: 15px;
  }
  .store {
    padding: 14px 20px;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .prose {
    padding: 24px 20px;
  }
  .screens {
    justify-content: flex-start;
  }
  .screens img {
    width: 210px;
  }
}
