/* orientering.palsgaard.net
   Varm, jordnær minimalisme fra orienteringskortet: sandfarvet papir, brune højdekurver,
   orange/hvid postflag og magenta baneoptryk. */

@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --bg: #F6F1E7; --surface: #FFFDF8; --surface-2: #EDE5D6; --ink: #2A221A; --muted: #6B5D4E; --line: #E2D6C2;
  --accent: #B5410A; --accent-bright: #E8590C; --accent-soft: #FFDBCB; --accent-ink: #FFFFFF;
  --olive: #55663A; --contour: #C8925A; --course: #A8127F;
  --forest: #2E7D32; --forest-soft: #C8E6C9; --error: #B3261E; --error-soft: #F9DEDC;
  --display: "Newsreader", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 24px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #14130F; --surface: #1E1C17; --surface-2: #2B2821; --ink: #EDE6DC; --muted: #CFC2B2; --line: #3A352C;
  --accent: #FF8A4C; --accent-bright: #FF8A4C; --accent-soft: #7A2E00; --accent-ink: #14130F;
  --olive: #A9BB82; --contour: #8C6A47; --course: #F06FC7;
  --forest: #81C784; --forest-soft: #1B5E20; --error: #F2B8B5; --error-soft: #601410;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #14130F; --surface: #1E1C17; --surface-2: #2B2821; --ink: #EDE6DC; --muted: #CFC2B2; --line: #3A352C;
    --accent: #FF8A4C; --accent-bright: #FF8A4C; --accent-soft: #7A2E00; --accent-ink: #14130F;
    --olive: #A9BB82; --contour: #8C6A47; --course: #F06FC7;
    --forest: #81C784; --forest-soft: #1B5E20; --error: #F2B8B5; --error-soft: #601410;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; overflow-anchor: none; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("/assets/contours.svg") center / cover no-repeat; opacity: .35;
}
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--course); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
.wrap { width: min(1160px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }
.narrow { width: min(900px, 100% - 2 * clamp(16px, 4vw, 40px)); }

/* Sprog */
html[data-lang="da"] .lang[lang="en"], html[data-lang="en"] .lang[lang="da"] { display: none; }
html:not([data-lang]) .lang-switch { display: none; }

/* Sidehoved */
.site-header { position: sticky; top: 12px; z-index: 20; margin-top: 12px; }
.navbar {
  display: flex; align-items: center; gap: 8px 14px; padding: 8px 8px 8px 16px;
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent); border-radius: 999px;
  box-shadow: 0 8px 30px -14px rgba(60, 40, 20, .25);
}
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.1; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.flag { display: block; flex: none; width: 26px; height: 26px; border: 1.5px solid var(--ink); background: linear-gradient(to bottom right, #fff 50%, var(--accent-bright) 50%); }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.lang-switch { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.lang-switch a { text-decoration: none; color: var(--muted); padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.lang-switch a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-moon, :root:not([data-theme="dark"]) .icon-sun { display: none; }

/* Typografi */
h1, h2 { font-family: var(--display); font-weight: 450; letter-spacing: -.025em; line-height: 1.02; margin: 0; }
h1 { font-size: clamp(48px, 8.5vw, 112px); }
h1 em, h2 em { font-style: italic; color: var(--accent); }
.lead { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.5; color: var(--muted); margin: 22px 0 0; max-width: 34em; }
.kicker { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--olive); }

/* Forside */
.o-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(40px, 8vw, 104px) 0 clamp(32px, 5vw, 64px); }
.course-art { width: 100%; height: auto; overflow: visible; }
.course-art .c { fill: none; stroke: var(--contour); stroke-width: 1.4; }
.course-art .c.index { stroke-width: 2.6; }
.course-art .op { fill: none; stroke: var(--course); stroke-width: 3; stroke-linecap: round; }
.course-art text { fill: var(--course); font: 600 22px var(--sans); }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.tile { container-type: inline-size; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.4vw, 28px); transition: transform .3s ease, box-shadow .3s ease; }
.tile p { margin: 0; color: var(--muted); }
a.tile { color: inherit; text-decoration: none; display: block; }
a.tile:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(60, 40, 20, .45); }
.tile.app { grid-column: span 2; grid-row: span 2; display: grid; grid-template-rows: auto 1fr; gap: 20px; padding: 0; overflow: hidden; }
.tile.app img.shot { display: block; width: 100%; aspect-ratio: 1000 / 459; object-fit: cover; border-bottom: 1px solid var(--line); }
.tile.app .body { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 0 clamp(20px, 2.4vw, 28px) clamp(20px, 2.4vw, 28px); }
.tile.app .icon { width: 64px; height: 64px; border-radius: 16px; }
.tile.app h2 { font-size: clamp(28px, 6cqi, 40px); }
.tile.app .more { margin-top: 12px; font-weight: 600; color: var(--accent); }
.fact b { display: block; font: 450 clamp(34px, 20cqi, 56px)/1 var(--display); letter-spacing: -.02em; margin-bottom: 10px; color: var(--ink); }
.fact.olive { background: var(--olive); border-color: var(--olive); }
.fact.olive b, .fact.olive p { color: #FFFDF8; }
:root[data-theme="dark"] .fact.olive b, :root[data-theme="dark"] .fact.olive p { color: #14130F; }
.by { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.by p { max-width: 44em; }

/* Undersider for en app */
.crumb { margin: 32px 0 0; font-size: 15px; color: var(--muted); }
.crumb a { color: var(--muted); }
.app-hero { display: flex; align-items: center; gap: 20px; padding: 20px 0 6px; }
.app-hero img { width: 88px; height: 88px; border-radius: 22px; flex: none; box-shadow: 0 10px 30px -16px rgba(60,40,20,.5); }
.app-hero h1 { font-size: clamp(40px, 7vw, 72px); }
.app-hero .lead { margin-top: 8px; font-size: 19px; }
.page-head { padding: 20px 0 0; }
.page-head h1 { font-size: clamp(40px, 7vw, 72px); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.toc a { text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: 15px; }
.toc a:hover { border-color: var(--accent-bright); color: var(--accent); }
.toc a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.toc.sub { position: sticky; top: 84px; z-index: 5; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.toc.sub a { flex: none; font-size: 14px; }
.app-meta { font-size: 15px; color: var(--muted); }

/* Vejledningens kort (fra SI Startinfos oprindelige side) */
section.card { background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin: 16px 0; }
section.card h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 450 clamp(26px, 3.4vw, 34px)/1.15 var(--display); letter-spacing: -.015em; color: var(--ink); }
section.card h2::before { content: ""; flex: none; width: 14px; height: 14px; border: 2.5px solid var(--course); border-radius: 50%; }
section.card h3 { margin: 20px 0 6px; font: 600 18px/1.3 var(--sans); }
ul, ol { padding-left: 22px; margin: 8px 0; }
li { margin: 4px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin-top: 10px; }
.tile-demo, .grid .tile { background: var(--surface-2); border: 0; border-radius: 14px; padding: 12px 14px; }
.grid .tile b { display: block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.grid .tile span { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.grid .tile span.big { font-size: 30px; color: var(--accent); }
.chip { display: inline-block; border-radius: 999px; padding: 2px 12px; font-weight: 600; font-size: 15px; }
.chip.started { background: var(--forest-soft); }
.chip.late { background: var(--accent-soft); }
.warn { background: var(--error-soft); color: var(--error); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.note { border-left: 4px solid var(--forest); background: var(--surface-2); padding: 10px 14px; border-radius: 0 12px 12px 0; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; overflow-wrap: anywhere; }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-top: 12px; }
.demo .name { font-size: clamp(24px, 5vw, 34px); font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.demo .bar { height: 6px; border-radius: 3px; background: var(--accent-bright); margin-top: 12px; padding: 0; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 4px; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.shots figcaption { font-size: 14px; line-height: 1.35; color: var(--muted); margin-top: 6px; }
.shots.wide { grid-template-columns: repeat(2, 1fr); }

.site-footer { margin-top: clamp(56px, 8vw, 104px); padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .course-art .op { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s cubic-bezier(.5, 0, .2, 1) forwards; }
  .course-art .op.d2 { animation-delay: .5s; }
  .course-art .op.d3 { animation-delay: 1s; }
  .course-art .op.d4 { animation-delay: 1.4s; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  }
}

@media (max-width: 860px) {
  .o-hero { grid-template-columns: minmax(0, 1fr); }
  .course-art { max-width: 420px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.app { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 640px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
  .shots.wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar { padding-left: 10px; gap: 8px; }
  .brand .text { display: none; }
  .site-nav a { padding: 8px 10px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile.app .body { grid-template-columns: minmax(0, 1fr); }
  .app-hero img { width: 64px; height: 64px; border-radius: 16px; }
  .toc.sub { top: 76px; }
}
