/* ── Tokens ─────────────────────────────────────────────── */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-soft: #475467;
  --text-mute: #667085;
  --border: #e7e9ee;
  --border-strong: #d5d9e0;

  --accent: #1d4ed8;
  --accent-hover: #1b45bd;
  --accent-soft: #eef4ff;
  --accent-ring: rgba(29, 78, 216, 0.16);

  --radius: 14px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.09);
  --shadow-md: 0 6px 16px rgba(16, 24, 40, 0.08), 0 2px 6px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 28px 56px -20px rgba(16, 24, 40, 0.22), 0 10px 24px -12px rgba(16, 24, 40, 0.14);

  --maxw: 860px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  position: relative;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Soft accent glow behind the top of the page. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 640px;
  background: radial-gradient(58% 60% at 50% -6%, rgba(29, 78, 216, 0.12), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.nav, header, section, footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Nav ────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  background: rgba(246, 247, 249, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__logo-mark {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
  color: var(--accent);
}

/* "kart" is a nested <span> so it can take the accent colour. Splitting the
   word into two runs can drop the kerning across the s|k boundary, and the
   colour change there reads as a gap on its own — the small negative margin
   tucks it back so "Skolekretskart" stays one word. */
.nav__logo-kart {
  color: var(--accent);
  margin-left: -0.025em;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__links {
  display: flex;
  gap: 26px;
  list-style: none;
  font-size: 14px;
}

.nav__links a {
  color: var(--text-mute);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav__links a:hover { color: var(--accent); }

.nav__auth {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav__login {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav__login:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.nav__register {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.4), 0 6px 14px -8px rgba(29, 78, 216, 0.6);
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav__register:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 18px 0 14px;
  min-height: 144px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(65% 100% at 50% 45%, rgba(246, 247, 249, 0.94) 0%, rgba(246, 247, 249, 0.85) 38%, rgba(246, 247, 249, 0.45) 68%, rgba(246, 247, 249, 0.1) 100%),
    url("hero-bg.jpg") center top / cover no-repeat;
  background-color: var(--bg);
}

.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.hero__tagline {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 13px 24px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn__sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.4), 0 10px 22px -10px rgba(29, 78, 216, 0.6);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.4), 0 16px 28px -10px rgba(29, 78, 216, 0.6);
}

.btn--secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.demo__video {
  max-width: 680px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: block;
  margin: 22px 0 0;
}

.demo__video--desktop {
  width: 100%;
}

/* Hidden by default; shown instead of --desktop below 640px (see the
   "Responsive" section further down). Sized by max-height rather than width
   -- it's a portrait recording, so constraining it the same way as the
   landscape desktop video would make it taller than the viewport. */
.demo__video--mobile {
  display: none;
  width: auto;
  max-width: 100%;
  max-height: 60vh;
}

/* ── Sections ───────────────────────────────────────────── */

section {
  padding: clamp(48px, 8vw, 76px) 0;
  border-top: 1px solid var(--border);
}

/* White bands lift off the tinted page. */
#losningen,
#pris,
#om {
  background: var(--surface);
}

section h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 720;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

section h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 16px;
}

section p {
  color: var(--text-soft);
  margin-bottom: 15px;
  max-width: 62ch;
}

.features {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.features li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text-soft);
}

.features li::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  background-color: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.coverage-note {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 7px 14px;
  border-radius: 999px;
}

/* ── Pricing ────────────────────────────────────────────── */

.pricing {
  text-align: center;
}

.pricing h2::before {
  margin-left: auto;
  margin-right: auto;
}

/* Tinted against #pris's own white background -- the inverse of .launch's old
   white-card-on-tinted-section trick, kept for the same reason: the card
   should read as a distinct object sitting on the section, not blend into it. */
.pricing-card {
  max-width: 400px;
  margin: 26px auto 0;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 36px 28px;
}

.pricing-card__badge {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}

.pricing-card__amount {
  font-size: 42px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.pricing-card__was {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-mute);
  text-decoration: line-through;
}

.pricing-card__unit {
  font-size: 14px;
  color: var(--text-mute);
  margin-bottom: 18px;
}

.pricing-card__note {
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 24px;
}

.pricing-card .btn {
  width: 100%;
}

/* ── About ──────────────────────────────────────────────── */

.about {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.about p:last-child { margin-bottom: 0; }

/* ── Footer ─────────────────────────────────────────────── */

footer {
  padding: 36px 0 56px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-mute);
}

footer p + p { margin-top: 4px; }
footer a { color: var(--text-mute); }
footer a:hover { color: var(--accent); }

/* ── Takk (post-payment) page ──────────────────────────────*/

.takk {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.takk__card {
  max-width: 440px;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  text-align: center;
}

.takk__card h1 {
  font-size: 23px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.takk__card p {
  color: var(--text-soft);
  margin-bottom: 18px;
}

.takk__creds {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 22px;
  text-align: left;
  font-size: 14px;
}

.takk__creds dt {
  color: var(--text-mute);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.takk__creds dd {
  font-weight: 600;
  font-family: ui-monospace, monospace;
  margin: 2px 0 12px;
}

.takk__creds dd:last-child { margin-bottom: 0; }

.takk__fallback {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 24px;
}

/* ── 404 ────────────────────────────────────────────────── */

.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.notfound__mark {
  width: 40px;
  height: 40px;
  color: var(--accent);
  margin-bottom: 16px;
}

.notfound h1 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.notfound p {
  color: var(--text-soft);
  margin-bottom: 24px;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
  /* The in-page section links give way to Logg inn/Registrer deg below this
     width -- both rows competing for space would either wrap the nav onto
     two lines or crowd the buttons that actually matter for conversion. */
  .nav__links { display: none; }
  .nav__wrap { padding: 0 16px; gap: 8px; }
  .nav__logo { font-size: 16px; gap: 7px; }
  .nav__logo-mark { width: 19px; height: 19px; }
  .nav__auth { gap: 8px; }
  .nav__login { padding: 7px 12px; font-size: 12.5px; }
  .nav__register { padding: 7px 12px; font-size: 12.5px; }
  .pricing-card { padding: 28px 22px; }
  .demo__video--desktop { display: none; }
  .demo__video--mobile { display: block; }
}

/* Small phones (iPhone SE, older Android) can't fit the full-size logo
   wordmark next to both auth buttons even after the 640px shrink above --
   drop the logo further and tighten spacing rather than let anything wrap
   or force horizontal scroll. */
@media (max-width: 380px) {
  .nav__wrap { padding: 0 10px; gap: 5px; }
  .nav__logo { font-size: 13px; gap: 5px; }
  .nav__logo-mark { width: 16px; height: 16px; }
  .nav__auth { gap: 5px; }
  .nav__login { padding: 5px 9px; font-size: 11.5px; }
  .nav__register { padding: 5px 9px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .nav__links a { transition: none; }
  .btn:hover,
  .btn--primary:hover,
  .btn--secondary:hover { transform: none; }
}
