/* 3Root shared styles. No build step. Schibsted Grotesk is loaded by a <link> in each page. */

:root {
  --paper: #EEF2F5;
  --ink: #14213D;
  --secondary: #4A5876;
  --rule: #C9D3DE;
  --accent: #2B4BFF;
  --sun: #F5B700;
  --device: #14213D;
  --surface: #FFFFFF;    /* card fill */
  --card-shadow: 0 1px 2px rgba(20, 33, 61, 0.08), 0 18px 40px -14px rgba(20, 33, 61, 0.28);
  --shot-bg: #FCEFC4;    /* sun-tinted panel behind the screenshot */

  --gutter: 20px;
  --rad: 0px;            /* width of the radical that sits in the left margin */
  --stroke: 5px;         /* radical and vinculum thickness */
  --content: 1100px;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1A2E;
    --ink: #E8EEF7;
    --secondary: #9FB0CC;
    --rule: #263657;
    --accent: #8FA3FF;
    --device: #263657;
    --surface: #1B2A49;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 20px 44px -14px rgba(0, 0, 0, 0.75);
    --shot-bg: #2E2A1A;
  }
}

@media (min-width: 760px) {
  :root {
    --gutter: 40px;
    --rad: clamp(96px, 13vw, 184px);
    --stroke: 7px;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
}

img, svg { max-width: 100%; }
img { height: auto; }

a { color: var(--accent); 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: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* One column. Content starts where the radical's bar begins. */
.wrap {
  max-width: calc(var(--content) + var(--rad) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) 0 calc(var(--gutter) + var(--rad));
}

p { margin: 0 0 1em; max-width: 68ch; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }

/* Header */
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand svg { width: 34px; height: 28px; flex: none; color: var(--accent); }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--ink); font-weight: 500; text-decoration: none; padding: 6px 0; display: inline-block; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Hero: the radical, its bar, and the headline as radicand */
.hero { padding: 28px 0 72px; overflow-x: clip; } /* the bar runs past the right edge */
.hero-inner {
  position: relative;
  padding-top: calc(60px + 1.5rem);
  padding-bottom: 4px;
}
.radical { position: absolute; inset: 0; pointer-events: none; color: var(--accent); }
.radical svg { position: absolute; display: block; max-width: none; overflow: visible; }
.radical-hook {
  left: var(--gutter);
  top: calc(var(--stroke) / 2);
  width: 52px;
  height: 56px;
}
.radical-hook path,
.radical-bar line {
  fill: none;
  stroke: currentColor;
  stroke-width: var(--stroke);
}
.radical-hook path { stroke-linejoin: miter; stroke-miterlimit: 8; stroke-linecap: butt; }
.radical-index {
  left: calc(var(--gutter) + 2px);
  top: 4px;
  width: 11px;
  height: 17px;
}
.radical-index path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.radical-bar {
  left: calc(var(--gutter) + 52px);
  top: 0;
  width: 100vw;
  height: var(--stroke);
}
.radical-bar line {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-bar 700ms cubic-bezier(.3, .1, .2, 1) 120ms both;
}
@keyframes draw-bar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.hero h1 {
  font-size: clamp(2.6rem, 7.4vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 13em;
  text-wrap: balance;
}
.hero .lede {
  margin: 1.5rem 0 0;
  max-width: 54ch;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--secondary);
}

@media (min-width: 760px) {
  .hero { padding: 40px 0 104px; }
  .hero-inner { padding-top: calc(var(--stroke) + 2.25rem); padding-bottom: 12px; }
  .radical-hook { width: var(--rad); height: calc(100% - var(--stroke) / 2); }
  .radical-index {
    left: calc(var(--gutter) + var(--rad) * 0.1);
    top: calc(52% - var(--rad) * 0.24 - 14px);
    width: calc(var(--rad) * 0.16);
    height: calc(var(--rad) * 0.24);
  }
  .radical-index path { stroke-width: 4.5; }
  .radical-bar { left: calc(var(--gutter) + var(--rad)); }
}

/* Sections */
.section { padding: 0 0 88px; scroll-margin-top: 16px; }
.section > .wrap > h2 { font-size: 1.75rem; letter-spacing: -0.02em; margin-bottom: 20px; }
.section p { color: var(--secondary); }
.section p strong, .section p a { font-weight: 500; }
.split { display: grid; gap: 56px 64px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.split h2 { font-size: 1.75rem; letter-spacing: -0.02em; margin-bottom: 14px; }
.email { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }

/* Services: two plain blocks between hairlines */
.services { display: grid; gap: 28px 64px; margin: 0; padding: 0; list-style: none; }
.service { border-top: 1px solid var(--rule); padding-top: 20px; scroll-margin-top: 16px; }
.service h3 { font-size: 1.375rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.service p { margin: 0; max-width: 46ch; }
.services-cta { margin: 28px 0 0; }
@media (min-width: 760px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Apps: one card per app. Copy a whole <li class="app-card"> to add another. */
.apps { display: grid; gap: 24px; list-style: none; margin: 0; padding: 0; }
.app-card {
  --pad: 24px;
  display: grid;
  gap: 0 40px;
  padding: var(--pad);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--sun);   /* the sun accent, reserved for this card */
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.app-main { min-width: 0; }
.app-head { display: flex; align-items: center; gap: 16px; }
.app-icon { width: 56px; height: 56px; border-radius: 14px; display: block; flex: none; }
.app-head h3 { font-size: 1.625rem; letter-spacing: -0.02em; }
.app-head h3 a { color: var(--ink); text-decoration: none; }
.app-head h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.app-card p.app-platform { margin: 4px 0 0; font-size: 0.9375rem; }
.app-card p.app-desc { margin: 18px 0 0; max-width: 46ch; }
.app-card p.app-status { margin: 20px 0 0; }
.app-status strong {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}
.app-status strong::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sun);
  transform: translateY(-1px);
}
.app-status span { display: block; padding-left: 21px; margin-top: 4px; font-size: 0.9375rem; }
.app-links { margin-top: 26px; }
.app-links h4 {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
}
.app-links ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}
.app-links li { border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--secondary); }
.app-links li:hover, .app-links li:focus-within { border-color: var(--accent); }
.app-links a { display: block; padding: 11px 14px; text-decoration: none; }
.app-links a:hover { text-decoration: underline; }
.app-links .app-link-wide { grid-column: 1 / -1; padding: 11px 14px; line-height: 1.45; }
.app-links .app-link-wide a { display: inline; padding: 0; }
.app-links .app-link-wide span { font-weight: 400; font-size: 0.9375rem; }
.app-shot {
  position: relative;
  height: 230px;
  margin: 28px calc(-1 * var(--pad)) calc(-1 * var(--pad));
  padding: 24px var(--pad) 0;
  background: var(--shot-bg);
  overflow: hidden;
}
.app-shot img {
  display: block;
  width: 190px;
  border: 5px solid var(--device);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--device);
}

@media (min-width: 760px) {
  .app-card { --pad: 36px; }
  .app-icon { width: 72px; height: 72px; border-radius: 18px; }
  .app-shot { height: 250px; }
  .app-shot img { width: 230px; }
}
@media (min-width: 1000px) {
  .app-card { --pad: 44px; gap: 0 48px; grid-template-columns: minmax(0, 1fr) 340px; }
  /* The screenshot sits in a tinted panel that fills the card's right side and runs off its bottom edge. */
  .app-shot { height: auto; min-height: 340px; margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) calc(-1 * var(--pad)) 0; padding: 0; }
  .app-shot img { position: absolute; top: 40px; left: 40px; width: calc(100% - 80px); }
}

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 32px 0 56px; color: var(--secondary); font-size: 0.9375rem; }
.site-footer ul { display: flex; flex-direction: column; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.site-footer p { margin: 0; }
@media (min-width: 760px) {
  .site-footer ul { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px 48px; }
}

/* Not found */
.notfound { padding: 56px 0 120px; }
.notfound h1 { font-size: clamp(2.2rem, 6vw, 3.75rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; margin-bottom: 1.25rem; }
.notfound p { color: var(--secondary); }
.notfound ul { margin: 1.5rem 0 0; padding: 0; list-style: none; font-weight: 500; }
.notfound li { padding: 4px 0; }

@media (prefers-reduced-motion: reduce) {
  .radical-bar line { animation: none; }
  html { scroll-behavior: auto; }
}

@media print {
  :root { --paper: #fff; --ink: #000; --secondary: #333; --rule: #999; --accent: #000; --device: #000; --surface: #fff; }
  .skip, .site-nav { display: none; }
  .radical-bar line { animation: none; }
  .radical-bar { width: 100%; }
  .hero { padding-bottom: 32px; }
  .section { padding-bottom: 32px; }
  .app-card { break-inside: avoid; }
  a { color: #000; }
}
