/* Font: Plus Jakarta Sans (free, OFL licence), stored on our own site, not loaded from Google */
@font-face {
  font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --soft: #f4f4f2; /* light grey for small boxes and hover on the white background */
  --card: #ffffff;
  --text: #1c1c1c;
  --muted: #6b6b6b;
  --accent: #2f5bea;
  --line: #e6e4df;
  --danger: #c0392b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
button, input, textarea { font: inherit; }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 8px; cursor: pointer;
  text-decoration: none; font-weight: 600; font-size: 15px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.small { padding: 5px 12px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
input, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.error { color: var(--danger); font-size: 15px; min-height: 1.4em; margin-top: 10px; }
.ok { color: #1e8449; }

/* ---------- Code / login gate ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate form { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.gate h1 { font-size: 26px; margin: 0 0 6px; }
.gate p { color: var(--muted); margin: 0 0 20px; }
.gate .btn { width: 100%; margin-top: 16px; }

/* ---------- Application page (what companies see) ---------- */
.page { max-width: 880px; margin: 0 auto; padding: 72px 20px 96px; }
.page .hero { text-align: left; display: flex; align-items: center; gap: 48px; }
.page .hero-text { flex: 1; min-width: 0; }
.page .hero-photo { order: 2; flex-shrink: 0; width: 240px; height: 240px; border-radius: 50%; object-fit: cover; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.page .hero .hook-text { margin: 0 0 28px; }
.page .subtitle { color: var(--muted); font-size: 18px; margin: -8px auto 24px; max-width: 680px; text-align: center; white-space: pre-line; }
.page .eyebrow { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
.page h1 { font-size: 54px; line-height: 1.05; margin: 0 0 24px; letter-spacing: -0.03em; font-weight: 800; }
.page .buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.page section { margin-top: 72px; }
.page h2 { font-size: 30px; margin: 0 0 20px; letter-spacing: -0.02em; font-weight: 800; text-align: center; }
.page p { margin: 0 0 12px; }
.page ul { padding-left: 22px; margin: 0 0 12px; }
.page li { margin-bottom: 8px; }
.page .hook { margin-top: 48px; }
.page .hook-text { font-size: 22px; line-height: 1.6; max-width: 600px; margin: 0 0 28px; }
/* The sentence under your name: a bit heavier and darker, with shorter lines, so it reads easily on the background */
.page .hero .hook-text { font-weight: 500; color: #16203a; letter-spacing: -0.005em; text-shadow: 0 0 18px rgba(255, 255, 255, .9); }

.gallery { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n2, .gallery.n4 { grid-template-columns: repeat(2, 1fr); }
.gallery.many { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 20px; }
.gallery img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; border-radius: 12px; cursor: zoom-in; display: block; background: var(--line); }
.gallery.n1 img { max-height: 75vh; height: auto; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }
.gallery.many img { aspect-ratio: 1; height: auto; object-fit: cover; }

/* Proof pictures: swipeable row with arrows and dots */
.carousel { --per: 3; --gap: 12px; margin-top: 20px; }
.car-viewport { position: relative; }
.car-track { display: flex; align-items: center; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
/* Each picture is shown whole at its own shape (never cropped), at most 480 px tall */
.car-slide {
  flex: 0 0 calc((100% - var(--gap) * (var(--per) - 1)) / var(--per)); min-width: 0;
  display: flex; justify-content: center; align-items: center; scroll-snap-align: start;
}
.car-slide img { display: block; max-width: 100%; max-height: 480px; width: auto; height: auto; border-radius: 12px; cursor: zoom-in; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 26px; line-height: 1; padding: 0 0 3px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.12); transition: opacity .2s;
}
.car-btn.prev { left: -22px; }
.car-btn.next { right: -22px; }
.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.car-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: #d5d3ce; cursor: pointer; transition: width .2s, background .2s; }
.car-dots button.active { width: 22px; background: var(--accent); }
.carousel.single .car-btn, .carousel.single .car-dots { display: none; }
@media (max-width: 960px) { .car-btn.prev { left: 8px; } .car-btn.next { right: 8px; } }
@media (max-width: 640px) { .carousel { --per: 2; } .car-slide img { max-height: 340px; } .car-btn { width: 38px; height: 38px; font-size: 22px; } }
.page section .gallery { margin-top: 20px; }

.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.videos figure { margin: 0; }
.videos video { width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 9 / 16; height: auto; object-fit: cover; border-radius: 14px; background: #000; display: block; }  /* upright 9:16 (1080×1920) like the owner's ads: filled edge to edge, no black bars */
.videos figcaption { margin: 12px auto 0; max-width: 360px; color: var(--muted); font-size: 16px; }

.about { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
.about .portrait { width: 100%; border-radius: 14px; display: block; }
.about:not(:has(.portrait)) { grid-template-columns: 1fr; }
.about .text { font-size: 18px; }
.about.reverse { grid-template-columns: 1fr 280px; }          /* picture on the right */
.about.reverse:not(:has(.portrait)) { grid-template-columns: 1fr; }
.about .portrait { box-shadow: 0 8px 28px rgba(20,30,80,.12); }

/* Background of the application page: soft blue waves with white dot patterns (bg-waves.svg).
   It stays still while the page scrolls over it. */
.page-bg { position: relative; isolation: isolate; min-height: 100vh; background: #f7faff; }
.page-bg::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('/bg-waves.svg') center / cover no-repeat;
}
.page-bg .hero-photo { border: 6px solid #fff; box-shadow: 0 0 0 2px rgba(47, 91, 234, .35), 0 18px 40px rgba(47, 91, 234, .25); }

/* Each section sits on a frosted-glass white card so the text stays easy to read on the waves */
.page > section:not(.closing) {
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(47, 91, 234, .08); border-radius: 26px; padding: 40px 40px 44px;
  box-shadow: 0 14px 40px rgba(30, 80, 170, .08);
}
.page > section { margin-top: 36px; }
.page .closing { background: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .9); box-shadow: 0 18px 50px rgba(30, 80, 170, .12); }
@media (max-width: 640px) {
  .page > section:not(.closing) { padding: 26px 16px 28px; border-radius: 20px; }
  .page > section { margin-top: 24px; }
}


.page-bg .closing, .page-bg .logo { background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

.marquee { overflow-x: auto; scrollbar-width: none; cursor: grab; user-select: none; -webkit-user-select: none; padding: 4px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee::-webkit-scrollbar { display: none; }
.marquee.dragging { cursor: grabbing; }
.marquee .track, .marquee .half { display: flex; align-items: center; gap: 14px; width: max-content; }
.logo { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 168px; height: 92px; padding: 0 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
/* Every logo gets the same box (max 124 × 44 px) and sits in the middle, whatever its own size */
.logo img { display: block; width: auto; height: auto; max-width: 136px; max-height: 56px; object-fit: contain; opacity: 0; transition: opacity .2s; }
.logo img[data-ready] { opacity: 1; }  /* shown once the empty space is trimmed and the size evened out */

.page .closing { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 36px; text-align: center; font-size: 18px; }
.page .closing .details { color: var(--muted); font-size: 15px; margin: 20px 0 0; }
.page .closing ul { text-align: left; display: inline-block; }

.zoom { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 50; cursor: zoom-out; padding: 20px; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; }

@media (max-width: 640px) {
  .page { padding-top: 48px; }
  .page h1 { font-size: 38px; }
  .page .hook-text { font-size: 19px; line-height: 1.55; }
  .page .hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .page .hero-photo { order: 0; width: 120px; height: 120px; }
  .videos, .about, .about.reverse { grid-template-columns: 1fr; }
  .about .portrait { max-width: 320px; }
  .about.reverse .portrait { order: -1; }   /* on phones the picture goes above the text, like "Hvem jeg er" */
  .gallery, .gallery.n4 { grid-template-columns: repeat(2, 1fr); }
  .gallery.n1 { grid-template-columns: 1fr; }
  .gallery.many { grid-template-columns: repeat(2, 1fr); }
  .page .closing { padding: 24px; }
}

/* ---------- Myself (admin) ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--card);
}
.topbar strong { font-size: 18px; }
.admin { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 61px); }
.list { border-right: 1px solid var(--line); padding: 16px; background: var(--card); }
.list .btn { width: 100%; margin-bottom: 14px; }
.item { padding: 10px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; }
.item:hover { background: var(--soft); }
.item.active { background: #eaf0ff; }
.item b { display: block; }
.item small { color: var(--muted); }
.editor { padding: 24px 32px 80px; max-width: 860px; }
.editor h2 { margin: 32px 0 0; font-size: 18px; padding-top: 20px; border-top: 1px solid var(--line); }
.editor h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.actions {
  position: sticky; bottom: 0; background: var(--bg); padding: 14px 0;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); margin-top: 28px;
}
.stats { color: var(--muted); font-size: 14px; margin-top: 4px; }
.empty { color: var(--muted); padding: 40px 32px; }
textarea.tall { min-height: 150px; }
.editor > p.hint { margin-top: 20px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { position: relative; width: 110px; height: 110px; border-radius: 8px; overflow: hidden; background: var(--line); }
.thumb.video { width: 140px; height: 200px; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .pdf { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--accent); }
.thumb-tools { position: absolute; top: 4px; right: 4px; display: flex; gap: 3px; }
.thumb-tools button { border: 0; border-radius: 5px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; width: 24px; height: 24px; cursor: pointer; padding: 0; }
.thumb-tools button:disabled { opacity: .3; cursor: default; }
label.upload-tile {
  margin: 0; width: 110px; height: 110px; border: 2px dashed var(--line); border-radius: 8px;
  display: grid; place-items: center; text-align: center; color: var(--accent); cursor: pointer; font-size: 13px; padding: 6px; background: var(--card);
}
label.upload-tile.video { width: 140px; height: 200px; }
.thumbs.contain .thumb { background: var(--card); border: 1px solid var(--line); }
.thumbs.contain .thumb img { object-fit: contain; padding: 12px; }
label.upload-tile:hover { border-color: var(--accent); }


.overlay { position: fixed; inset: 0; background: var(--bg); overflow: auto; z-index: 10; }  /* preview fills the whole screen, like the real page */
.overlay .sheet { background: var(--bg); width: 100%; min-height: 100%; position: relative; }
.overlay .close { position: fixed; top: 14px; right: 18px; z-index: 11; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); }

@media (max-width: 760px) {
  .admin { grid-template-columns: 1fr; }
  .list { border-right: 0; border-bottom: 1px solid var(--line); }
  .editor { padding: 16px 16px 80px; }
  .row2 { grid-template-columns: 1fr; }
}

/* ---------- Tabs & Settings ---------- */
.tabs { display: flex; gap: 4px; }
.tabs button { border: 0; background: none; font-weight: 600; font-size: 16px; padding: 8px 14px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tabs button.active { background: #eaf0ff; color: var(--accent); }
.pill { display: inline-block; justify-self: start; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pill.on { background: #e3f5ea; color: #1e8449; }
.pill.off { background: #fbe7e5; color: var(--danger); }
.settings { max-width: 860px; margin: 0 auto; padding: 24px 20px 80px; }
.settings h2 { font-size: 20px; margin: 36px 0 6px; }
.settings h2:first-child { margin-top: 8px; }
.settings > .hint, .settings ul.hint { margin: 0 0 14px; }
.settings ul.hint li { margin-bottom: 6px; }
.access { display: flex; flex-direction: column; gap: 10px; }
.acc { display: grid; grid-template-columns: 1fr 160px 80px 210px; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.acc-name b { display: block; }
.acc-name small, .acc-exp small { display: block; color: var(--muted); font-size: 13px; }
.acc-exp div { display: flex; gap: 6px; align-items: center; }
.acc-exp input { width: 160px; padding: 6px 8px; }
label.switch { margin: 0; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.switch input { display: none; }
.switch span { width: 40px; height: 22px; border-radius: 99px; background: #ccc; position: relative; transition: .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + span { background: #1e8449; }
.switch input:checked + span::after { left: 21px; }
.narrow { max-width: 380px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .acc { grid-template-columns: 1fr auto; }
  .acc-exp { grid-column: 1 / -1; }
}

.share { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.share div { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share pre { margin: 8px 0 10px; font: 15px/1.5 inherit; font-family: inherit; white-space: pre-wrap; background: var(--soft); padding: 10px 12px; border-radius: 8px; }

/* ---------- CV page ("Se CV" opens this in a new tab) ---------- */
body.cv-body { overflow: hidden; }
.cv-page { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.cv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.cv-bar strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-bar .btn { flex-shrink: 0; }
.cv-pages { flex: 1; overflow: auto; background: var(--soft); padding: 24px 16px 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cv-sheet { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); border-radius: 4px; }
.cv-msg { color: var(--muted); margin-top: 40px; text-align: center; }
@media (max-width: 640px) { .cv-pages { padding: 12px 8px 24px; gap: 10px; } .cv-bar { padding: 10px 12px; } }
.page-bg .btn:not(.primary) { background: rgba(255, 255, 255, .85); }  /* "Se CV" stays readable on the waves */

/* Web address field in the editor: "mariusraabjerg.com/" + the company's part */
.slug-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.slug-field span { padding: 10px 2px 10px 12px; color: var(--muted); white-space: nowrap; }
.slug-field input { border: 0; padding-left: 0; }
.slug-field input:focus { outline: none; }
.slug-field:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }
