/* Milepæl 19: the static pages outside the app — the landing page (forside.html) and the user
   guide (brukerveiledning.html, which adds css/brukerveiledning.css). Plain HTML/CSS, no Blazor,
   so search engines and link previews read them without JavaScript. The colours are the app's
   six themes (copied from app.css's tokens, see docs/05-designsystem.md) instead of loading the
   whole app.css, which is app-specific. /static-theme.js sets data-theme from the user's choice
   in Profil exactly like the app does; the phone's dark mode is deliberately not followed, so
   these pages always look like the app. --on-accent exists only here: white on Mørk's light
   --accent would not reach WCAG AA, so the dark theme uses its --paper as button text. */
:root{
  --desk:#ded6ca; --paper:#f6f1e7; --paper-deep:#eee7dc; --ink:#2c2925;
  --muted:#6a645c; --line:#d8cfc1; --accent:#7a5746; --accent-soft:#e5d7cc;
  /* Milepæl 27.1 (UX-07): same values as app.css. */
  --line-strong:#8b847b; --accent-ink:var(--accent);
  --on-accent:#ffffff;
  --radius-md:3px; --radius-lg:4px;
  color-scheme:light;
}
html[data-theme="light"]{
  --desk:#ececec; --paper:#ffffff; --paper-deep:#f7f7f5; --ink:#242321;
  --muted:#6d6c68; --line:#deddd9; --line-strong:#908f8c; --accent:#765443; --accent-soft:#eee5df;
}
html[data-theme="dark"]{
  --desk:#171513; --paper:#26221e; --paper-deep:#211e1b; --ink:#eee7dd;
  --muted:#aaa097; --line:#413a34; --line-strong:#736c65; --accent:#c39178; --accent-ink:#c99d86; --accent-soft:#49372f;
  --on-accent:#26221e;
  color-scheme:dark;
}
html[data-theme="forest"]{
  --desk:#d7ded2; --paper:#f3f6ee; --paper-deep:#e7ede0; --ink:#26302a;
  --muted:#5e6a60; --line:#cdd8c5; --line-strong:#7f897c; --accent:#3f6b4a; --accent-soft:#dbe7dc;
}
html[data-theme="ocean"]{
  --desk:#d6dfe3; --paper:#f1f6f8; --paper-deep:#e6eef1; --ink:#1f2f36;
  --muted:#586c72; --line:#c9d8dd; --line-strong:#7b8a90; --accent:#2a6f7f; --accent-soft:#d9ebef;
}
html[data-theme="berry"]{
  --desk:#e6d9d9; --paper:#faf2f2; --paper-deep:#f2e5e5; --ink:#352026;
  --muted:#795e62; --line:#e0cbcd; --line-strong:#958084; --accent:#a13d5c; --accent-soft:#f2dde3;
}

/* The logo comes in a light and a dark variant; which one shows follows the theme, not the OS. */
.logo-dark{display:none}
html[data-theme="dark"] .logo-light{display:none}
html[data-theme="dark"] .logo-dark{display:block}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--paper);color:var(--ink);line-height:1.6;font-size:17px;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
h1,h2,h3{font-family:Georgia,"Times New Roman",serif;font-weight:500;line-height:1.2;margin:0}
a{color:var(--accent-ink)}

/* Milepæl 27.1 (UX-07): the app's focus ring and reduced motion on the static pages too. */
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms !important;transition-duration:.01ms !important;scroll-behavior:auto !important}
}
img{max-width:100%;height:auto;display:block}

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

.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:16px;top:12px;background:var(--paper);padding:8px 12px;z-index:10}

.topbar{border-bottom:1px solid var(--line);background:var(--paper-deep)}
.topbar .wrap{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none}
.brand img{width:38px;height:38px}
.brand span{font-family:Georgia,"Times New Roman",serif;font-size:22px}
.topbar-login{font-weight:600;text-decoration:none;padding:8px 2px}
.topbar-login:hover,.topbar-login:focus-visible{text-decoration:underline}

.hero{padding-top:48px;padding-bottom:28px}
.hero h1{font-size:clamp(2rem,5.2vw,3.2rem);max-width:20ch}
.lead{font-size:clamp(1.05rem,2.2vw,1.25rem);color:var(--muted);max-width:42em;margin:18px 0 26px}
.intro .lead{margin-bottom:0}
/* 10.11.2026: «Teksten over bildet» er skjult som standard (Admin → Forside, «Vis på forsiden»).
   Overskriften blir stående for skjermlesere og søkemotorer, bare visuelt skjult; ingressen og
   luften rundt forsvinner, så hovedbildet står øverst. nettside.js tar bort is-collapsed når raden
   er slått på. */
.intro.is-collapsed{padding:0}
.intro.is-collapsed .lead{display:none}
.intro.is-collapsed h1{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;
}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:14px 20px}
.button{
  display:inline-block;border:1px solid var(--accent);background:var(--accent);color:var(--on-accent);
  border-radius:var(--radius-lg);padding:11px 22px;text-decoration:none;font-weight:600;
}
.button:hover,.button:focus-visible{filter:brightness(1.08)}
.invite-note{margin:0;color:var(--muted);font-size:.95rem;max-width:34em;flex-basis:100%}

/* Milepæl 27.3 (F2/F3): which buttons show follows the stored sign-in (the script at the bottom of
   forside.html), and «Du er logget ut.» shows once after signing out. [hidden] must win over the
   display values above (.actions is flex). */
[hidden]{display:none !important}
.button-secondary{background:var(--paper);color:var(--ink);border-color:var(--line-strong)}
.topbar-open{
  border-radius:var(--radius-lg);background:var(--accent);color:var(--on-accent);
  padding:9px 16px;font-weight:600;text-decoration:none;min-height:44px;display:inline-flex;align-items:center;
}
.topbar-open:hover,.topbar-open:focus-visible{filter:brightness(1.08)}
.signed-out-note{
  margin:0 0 22px;padding:12px 16px;border:1px solid var(--line);border-left:4px solid var(--accent);
  border-radius:var(--radius-lg);background:var(--accent-soft);color:var(--ink);max-width:42em;
}

.showcase{margin:8px auto 0}
.intro.is-collapsed + .hero-block .showcase{margin-top:32px}
.showcase img{width:100%;border-radius:var(--radius-lg);border:1px solid var(--line)}

.features{padding-top:52px;padding-bottom:8px}
.features h2,.notes h2{font-size:clamp(1.5rem,3.4vw,2rem)}
.feature-grid{list-style:none;padding:0;margin:28px 0 0;display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr))}
/* Leveranse G1: kortene har nå ulik tekstlengde — høyst to i bredden (2 × 2) holder dem balanserte. */
@media (min-width:761px){.feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.feature-grid li{
  background:var(--paper-deep);border:1px solid var(--line);border-top:3px solid var(--accent);
  border-radius:var(--radius-lg);padding:24px 24px 22px;
}
.feature-grid h3{font-size:1.25rem;margin-bottom:8px}
.feature-grid p{margin:0;color:var(--ink)}

.notes{padding-top:44px;padding-bottom:56px;display:grid;gap:28px;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.notes p{margin:12px 0 0}
/* Leveranse G1: ingressen med de to hovedfordelene, rett under hovedbildet — rolig, uten boks. */
.pitch{padding-top:32px;padding-bottom:8px;text-align:center}
.pitch h2{font-size:clamp(1.35rem,3.2vw,1.9rem);max-width:30ch;margin:0 auto}
.pitch p{color:var(--muted);font-size:clamp(1.02rem,2vw,1.15rem);max-width:44em;margin:12px auto 0}
/* Leveranse G1 (punkt 6.5): «Slik legger du Strikkeboka på hjemskjermen» — sammenleggbar, med tokens. */
.homescreen-help{margin-top:14px;border-top:1px solid var(--line);padding-top:10px}
.homescreen-help summary{cursor:pointer;color:var(--accent-ink);font-weight:600;padding:11px 0;display:list-item}
.homescreen-help summary:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.homescreen-help ul{margin:6px 0 0;padding-left:1.2em}
.homescreen-help li{margin:6px 0}
.homescreen-help p{margin:8px 0 0;color:var(--muted)}
/* Uten notisene (skjult i admin) er kortene det siste på siden og trenger luften selv. */
.features:last-child{padding-bottom:56px}
.status-box{border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:var(--radius-lg);background:var(--accent-soft);padding:20px 22px}

.footer{border-top:1px solid var(--line);background:var(--paper-deep);color:var(--muted);font-size:.92rem}
.footer .wrap{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;padding-top:20px;padding-bottom:24px}
.footer p{margin:0}

@media (max-width:600px){
  body{font-size:16px}
  .wrap{padding:0 16px}
  .hero{padding-top:32px;padding-bottom:20px}
  .intro.is-collapsed + .hero-block .showcase{margin-top:20px}
  .actions .button{width:100%;text-align:center}
  .features{padding-top:40px}
  .features:last-child{padding-bottom:44px}
  .notes{padding-top:34px;padding-bottom:44px}
}
