/* The front page of gable.no. Same family as the generated customer sites
   (sites/generator/src/styles/site.css: warm theme, system of custom properties),
   held to the promise it sells: WCAG 2.2 AA in both themes.

   Every colour is a custom property defined once per theme below; the rules use
   only the properties (the same discipline check-colors enforces in app/src).
   Contrast of each pair was computed when the tokens were chosen: body text
   >= 4.5:1 and UI borders >= 3:1 on every background they meet, light and dark.

   One self-hosted variable font (Schibsted Grotesk, OFL, fonts/OFL.txt): no font
   request to a third party, and the page looks the same on every OS instead of
   falling back to whatever `system-ui` happens to be. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-5.3.0-latin-wght.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --band: #f2eadf;
  --text: #1c1712;
  --muted: #5c5045;
  --accent: #a3441c;
  --accent-ink: #8a3612;
  --accent-text: #ffffff;
  --accent-soft: #f7e4d7;
  --line: #e4d9ca;
  --line-strong: #8c7d6f;
  --art-roof: #a3441c;
  --art-wall: #ffffff;
  --art-sketch: #e4d9ca;
  --art-sketch-strong: #c9b8a4;
  --shadow: 0 1px 2px #1c171214, 0 12px 32px -12px #1c171233;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);
  --space-section: clamp(4rem, 2.5rem + 6vw, 8rem);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110e;
    --surface: #1d1915;
    --band: #211c17;
    --text: #f3ece3;
    --muted: #b8aa9b;
    --accent: #ef8f5e;
    --accent-ink: #f5a27a;
    --accent-text: #1a0d05;
    --accent-soft: #3b2417;
    --line: #352e27;
    --line-strong: #8f8274;
    --art-roof: #ef8f5e;
    --art-wall: #1d1915;
    --art-sketch: #352e27;
    --art-sketch-strong: #4d433a;
    --shadow: 0 1px 2px #00000066, 0 12px 32px -12px #000000aa;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0) / 1.6 var(--font);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: break-word;
  /* No automatic hyphenation: it split the h1 as "bedrif-ten" at full width. */
  hyphens: manual;
}
p {
  margin: 0;
  text-wrap: pretty;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  width: min(100% - 2.5rem, 72rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
}
.skip:focus {
  top: 1rem;
}

/* Header. Not sticky: a sticky bar can hide the focused element (WCAG 2.4.11). */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand::before,
.footer-brand::before {
  content: "";
  width: 1.15rem;
  height: 1.3rem;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 42%, 100% 100%, 0 100%, 0 42%);
}
.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem clamp(0.75rem, 3vw, 1.75rem);
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.site-header nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
}
.site-header nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
}

/* Shared section furniture */

.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--accent);
}
.section {
  padding-block: var(--space-section);
}
.section-band {
  background: var(--band);
}
.section h2 {
  max-width: 22ch;
  font-size: var(--step-3);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.section-lead {
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--step-1);
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 1.5rem + 6vw, 7rem) var(--space-section);
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  max-width: 15ch;
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.045em;
}
.lead {
  max-width: 34ch;
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: var(--step-2);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.promise {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
  border-radius: 999px;
}
.promise::before {
  /* A check mark drawn with two borders; decorative, the sentence says it all. */
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.8rem;
  margin: -0.2rem 0.3rem 0 0.35rem;
  border: solid var(--accent-ink);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 650;
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: 999px;
}
.button:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}
.button-quiet {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.button-quiet:hover {
  background: var(--surface);
  border-color: var(--text);
}

/* The gable: a house front drawn as a page. Decorative (aria-hidden). */

.hero-art {
  display: none;
}
.gable {
  width: 100%;
  aspect-ratio: 5 / 6;
  padding: 14px;
  background: var(--art-roof);
  clip-path: polygon(50% 0, 100% 36%, 100% 100%, 0 100%, 0 36%);
}
.gable-inner {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  padding: 46% 12% 10%;
  background: var(--art-wall);
  clip-path: polygon(50% 0, 100% 34%, 100% 100%, 0 100%, 0 34%);
}
.sketch {
  display: block;
  height: 0.7rem;
  background: var(--art-sketch);
  border-radius: 999px;
}
.sketch-title {
  width: 70%;
  height: 1.4rem;
  background: var(--art-sketch-strong);
}
.sketch-short {
  width: 60%;
}
.sketch-button {
  width: 38%;
  height: 1.6rem;
  margin-top: 0.4rem;
  background: var(--art-roof);
}
.sketch-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  flex: 1;
  margin-top: 0.6rem;
}
.sketch-tiles span {
  background: var(--art-sketch);
  border-radius: 6px;
}

@media (min-width: 52rem) {
  .hero-grid {
    grid-template-columns: 7fr 4fr;
    gap: 4rem;
  }
  .hero-art {
    display: block;
    justify-self: end;
    width: min(100%, 22rem);
  }
}

/* Why it matters */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2.5rem 3rem;
  margin-top: 3.5rem;
}
.facts li {
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-strong);
}
.fact-figure {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent-ink);
  font-size: clamp(3rem, 2.2rem + 3vw, 4.5rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}
.facts h3 {
  font-size: var(--step-1);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.facts li > p:last-child {
  margin-top: 0.75rem;
  color: var(--muted);
}
.source {
  margin-top: 3rem;
  color: var(--muted);
  font-size: var(--step--1);
}

/* How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-top: 3.5rem;
  counter-reset: step;
}
.steps li {
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.5rem;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: var(--step-1);
  font-weight: 750;
  border-radius: 50%;
}
.steps h3 {
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.steps p {
  margin-top: 0.75rem;
  color: var(--muted);
}

/* Pricing */

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem;
  align-items: start;
  margin-top: 3.5rem;
}
.tier {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tier-recommended {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
}
.badge {
  align-self: flex-start;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  color: var(--accent-text);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}
.tier h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
}
.tier-name {
  font-size: var(--step-2);
  font-weight: 750;
  letter-spacing: -0.02em;
}
.tier-tagline {
  color: var(--muted);
  font-size: var(--step-0);
  font-weight: 500;
}
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  margin-top: 1.75rem;
}
.price-setup {
  font-size: var(--step-3);
  font-weight: 750;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.price-note {
  color: var(--muted);
}
.price-monthly {
  margin-top: 0.25rem;
  font-size: var(--step-1);
  font-weight: 600;
}
.includes {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.includes li {
  display: flex;
  gap: 0.75rem;
}
.includes li::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.7rem;
  margin: 0.35rem 0.2rem 0 0.25rem;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.terms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  color: var(--muted);
}
.terms li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.terms li::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  background: var(--line-strong);
  border-radius: 50%;
}

@media (min-width: 60rem) {
  /* The recommended tier stands a little taller than its neighbours. */
  .tiers {
    align-items: stretch;
  }
  .tier {
    margin-block: 1.5rem;
  }
  .tier-recommended {
    margin-block: 0;
    padding-block: 2.25rem 3.5rem;
  }
}

/* Contact */

.contact {
  display: grid;
  gap: 2rem;
  align-items: end;
}
.contact p:not(.kicker) {
  max-width: 44ch;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: var(--step-1);
}
.contact p.contact-mail {
  margin: 0;
  font-size: var(--step-3);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.contact-mail a {
  display: inline-block;
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
}
.contact-mail a:hover {
  color: var(--accent-ink);
}
@media (min-width: 52rem) {
  .contact {
    grid-template-columns: 3fr 2fr;
  }
  .contact p.contact-mail {
    justify-self: end;
  }
}

/* Accessibility statement */

.section-narrow .wrap > * {
  max-width: 60ch;
}
.section-narrow h2 {
  font-size: var(--step-2);
}
.section-narrow p {
  margin-top: 1rem;
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem 2.5rem;
  color: var(--muted);
  font-size: var(--step--1);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: var(--step-0);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.footer-brand::before {
  width: 0.85rem;
  height: 0.95rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.75rem;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--text);
}

/* The examples page (eksempler.html): the demo as a card (2026-10-09: one, with its theme switcher; were four variants). */

.section-top {
  padding-top: clamp(3rem, 1.5rem + 6vw, 7rem);
}
.section-top h1 {
  max-width: 18ch;
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.section-top .section-lead {
  max-width: 48ch;
  margin-top: 1.25rem;
}
/* Four cards: two by two from tablet width up (auto-fit left one alone on a
   third row at 1280), one column on a phone. */
.examples {
  display: grid;
  gap: 3rem 2.5rem;
  margin-top: 3.5rem;
}
@media (min-width: 48rem) {
  .examples {
    grid-template-columns: repeat(2, 1fr);
  }
}
.example {
  display: flex;
  flex-direction: column;
}
.example img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.example h2 {
  margin-top: 1.5rem;
  font-size: var(--step-2);
  font-weight: 750;
  letter-spacing: -0.02em;
}
.example p {
  margin-top: 0.5rem;
  color: var(--muted);
}
.example .example-link {
  margin-top: auto;
  padding-top: 0.75rem;
}
.example-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
}

/* The 404 page */

.not-found {
  padding-block: var(--space-section);
}
.not-found h1 {
  max-width: 16ch;
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.not-found p:not(.kicker):not(.actions) {
  max-width: 44ch;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: var(--step-1);
}
