/* SmartFDV — smartfdv.no
 *
 * Bygger på Atlas, designsystemet i selve produktet. Fargetokenene under er
 * hentet uendret fra frontend/src/styles/atlas-tokens.css, og skriften er de
 * samme selvhostede Geist-filene. Nettstedet og applikasjonen skal se ut som
 * samme produkt.
 *
 * Atlas er «light-only by design» for v1 — derfor ingen mørk modus her heller.
 *
 * Ingen eksterne ressurser: ingen tredjeparts webfonter, ingen sporing, ingen
 * kall ut. Nettstedet skal ikke sende besøkendes data noe sted, på samme måte
 * som produktet ikke gjør det.
 */

/* === Skrift (selvhostet, SIL OFL — se assets/fonts/OFL.txt) === */

@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* === Atlas-tokens === */

:root {
  --bg:           #F4F1E9;
  --surface:      #FFFCF5;
  --sunk:         #EBE6D7;
  --ink:          #1F1B14;
  --muted:        #6B6557;
  --faint:        #A39C8B;
  --line:         #D9D2BF;

  --terra:        #A04829;
  --moss:         #4A6B3A;
  --sky:          #2C5F7B;
  --ochre:        #A87819;
  --danger:       #A0252B;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-1: 0 1px 2px rgba(31, 27, 20, 0.04), 0 1px 1px rgba(31, 27, 20, 0.02);
  --shadow-2: 0 4px 8px rgba(31, 27, 20, 0.06), 0 2px 4px rgba(31, 27, 20, 0.03);

  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Consolas,
          'Liberation Mono', Menlo, monospace;

  --sheet: 71rem;
  --measure: 38rem;

  --s--1: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);
  --s-0:  1rem;
  --s-1:  1.125rem;
  --s-2:  clamp(1.5rem, 1.3rem + 0.9vw, 1.75rem);
  --s-3:  clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --s-4:  clamp(2rem, 1.5rem + 2.6vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--s-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* === Tilgjengelighet === */

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--terra); color: #fff;
  padding: 0.75rem 1.25rem; font-weight: 600; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* === Typografi === */

h1, h2, h3 { margin: 0 0 0.5em; text-wrap: balance; font-weight: 600; }

h1 { font-size: var(--s-4); line-height: 1.1; letter-spacing: -0.028em; font-weight: 650; }
h2 { font-size: var(--s-3); line-height: 1.15; letter-spacing: -0.022em; }
h3 { font-size: var(--s-1); line-height: 1.3; letter-spacing: -0.01em; }

p { margin: 0 0 1.05em; max-width: var(--measure); line-height: 1.65; }
p:last-child { margin-bottom: 0; }

a { color: var(--terra); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 600; }

.lead {
  font-size: var(--s-1);
  line-height: 1.6;
  color: var(--muted);
  max-width: 34rem;
}

.anno {
  font-family: var(--mono);
  font-size: var(--s--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra);
}

/* === Ark === */

.sheet {
  width: 100%;
  max-width: var(--sheet);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

section { padding-block: clamp(3rem, 6.5vw, 5.5rem); }

.band { background: var(--sunk); }

.tag { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.25rem; }
.tag::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tag span {
  font-family: var(--mono); font-size: var(--s--1); font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}

/* === Topp === */

.masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.masthead .sheet {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4rem; flex-wrap: wrap;
}

.wordmark { display: inline-flex; align-items: baseline; gap: 0.55rem; text-decoration: none; color: var(--ink); }
.wordmark b { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.025em; }
.wordmark i {
  font-family: var(--mono); font-style: normal; font-weight: 400;
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); border-left: 1px solid var(--line); padding-left: 0.55rem;
}

.nav ul { display: flex; gap: clamp(0.9rem, 2.4vw, 1.75rem); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a {
  font-size: 0.9375rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--terra); }

/* Språkvelger: skilt visuelt fra menypunktene, så den ikke leses som en
   sjette side. Lenker alltid til samme side i motsatt målform. */
.nav .lang { border-left: 1px solid var(--line); padding-left: clamp(0.9rem, 2.4vw, 1.75rem); }
.nav .lang a {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* === Hero === */

.hero { padding-block: clamp(2.75rem, 5.5vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); } }

.hero h1 { max-width: 15ch; margin-bottom: 1.1rem; }
.hero .lead { max-width: 32rem; }
.hero .anno { display: block; margin-bottom: 1.25rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-block; font-size: 0.9375rem; font-weight: 500;
  padding: 0.7rem 1.25rem; border-radius: var(--radius-md);
  text-decoration: none; border: 1px solid transparent;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.btn-solid { background: var(--terra); color: #fff; border-color: var(--terra); box-shadow: var(--shadow-1); }
.btn-solid:hover { background: #8d3f24; border-color: #8d3f24; box-shadow: var(--shadow-2); }
.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--muted); }

/* === Kort === */

.rooms {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-top: 2.25rem;
}
.room-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.45rem 1.5rem;
  box-shadow: var(--shadow-1);
  transition: box-shadow 140ms ease, transform 140ms ease;
}
.room-cell:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.room-cell h3 { margin-bottom: 0.4rem; font-size: var(--s-0); font-weight: 600; }
.room-cell p { color: var(--muted); font-size: 0.9375rem; line-height: 1.6; margin: 0; max-width: none; }

/* === Utsagn === */

.statement { max-width: 46rem; }
.statement h2 { max-width: 17ch; }
.statement p { max-width: 40rem; }

.pullquote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--terra);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin: 2rem 0 0;
  max-width: 42rem;
  box-shadow: var(--shadow-1);
}
.pullquote p { margin: 0; max-width: none; }
.pullquote .anno { display: block; margin-bottom: 0.55rem; }

/* === Innhold === */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; }
.prose ul { padding-left: 0; list-style: none; margin: 0 0 1.15em; }
.prose li { position: relative; padding-left: 1.35rem; margin-bottom: 0.5em; line-height: 1.65; }
.prose li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.68em;
  width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--terra);
}

.entry { border-top: 1px solid var(--line); padding-top: 2.25rem; margin-top: 2.25rem; }
.entry:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.entry h3 { font-size: var(--s-2); font-weight: 620; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.entry ul { padding-left: 0; list-style: none; margin: 0.9rem 0 0; max-width: var(--measure); }
.entry li { position: relative; padding-left: 1.35rem; margin-bottom: 0.45em; color: var(--muted); line-height: 1.6; }
.entry li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.62em;
  width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--terra);
}
.entry .note {
  margin-top: 1.1rem; font-size: 0.9375rem; color: var(--muted); max-width: 36rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
}

/* === Tabell === */

.scroll {
  overflow-x: auto; margin-top: 1.75rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-1);
}
table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: 0.9375rem; }
th, td { text-align: left; padding: 0.85rem 1.15rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th {
  font-family: var(--mono); font-size: var(--s--1); font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
  background: var(--sunk);
}
td { color: var(--muted); line-height: 1.6; }
td:first-child { color: var(--ink); font-weight: 550; }

/* === Kontaktkort === */

.card-contact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  max-width: 27rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-2);
}
.card-contact .name { font-size: var(--s-1); font-weight: 620; letter-spacing: -0.012em; margin-bottom: 0.55rem; }
.card-contact p { margin: 0 0 0.3rem; max-width: none; }
.card-contact .meta {
  font-family: var(--mono); font-size: var(--s--1); color: var(--faint);
  margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); letter-spacing: 0.03em;
}

/* === Bunn === */

.colofon {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.25rem;
  font-size: 0.9375rem;
}
.colofon-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.colofon h2 {
  font-family: var(--mono); font-size: var(--s--1); font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.85rem;
}
.colofon ul { list-style: none; margin: 0; padding: 0; }
.colofon li { margin-bottom: 0.4rem; }
.colofon a { color: var(--muted); text-decoration: none; }
.colofon a:hover { color: var(--terra); text-decoration: underline; }
.colofon p { color: var(--muted); margin-bottom: 0.35rem; max-width: none; }
.fineprint {
  margin-top: 2.5rem; padding-top: 1.35rem; border-top: 1px solid var(--line);
  font-size: var(--s--1); color: var(--faint); line-height: 1.7;
}
.fineprint p { color: var(--faint); max-width: 46rem; margin: 0; }

/* === Skjermbilder === */

.shot { margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-2);
}
.shot figcaption {
  margin-top: 0.85rem; font-family: var(--mono); font-size: var(--s--1);
  color: var(--faint); letter-spacing: 0.03em;
}

/* === Hjelpeklasser (inline style er blokkert av innholdssikkerhetspolicyen) === */

.mt-l { margin-top: 2rem; }
.narrow { max-width: 44rem; }


/* === Skjermbilde-plassholder ===
 * Synlig med vilje. Skal ALDRI stå igjen ved publisering — se README.
 * Sjekk med:  grep -rn "shot-todo" *.html
 */
.shot-todo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: clamp(14rem, 34vw, 26rem);
  border: 2px dashed var(--faint);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 2rem;
  text-align: center;
}
.shot-todo b {
  font-family: var(--mono);
  font-size: var(--s--1);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--danger);
}
.shot-todo span { color: var(--muted); max-width: 30rem; }
.shot-todo code {
  font-family: var(--mono);
  font-size: var(--s--1);
  color: var(--ink);
  background: var(--sunk);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.shot-wide { max-width: 62rem; margin-inline: auto; }
.shot-pair { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); margin-top: 2.25rem; }
@media (min-width: 54rem) { .shot-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Mobilbilde: smal kolonne, sentrert — et telefonbilde skal ikke strekkes */
.shot-mobile img { max-width: 19rem; margin-inline: auto; }
.shot-mobile figcaption { text-align: center; }
@media (min-width: 54rem) {
  .shot-pair-uneven { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; }
}
