/* ═══════════════════════════════════════════════════════
   Brask Group — shared design system
   VC-editorial: flat white, black ink, one orange accent,
   a single grotesque voice for display and body, mono for
   labels and disclosure tags. Light mode only, by design.
   ═══════════════════════════════════════════════════════ */

:root {
  --paper:      #FFFFFF;
  --paper-2:    #F6F6F4;
  --ink:        #0B0B0C;
  --ink-soft:   #46464C;
  --ink-mute:   #6B6B72;
  --rule:       #E6E6E2;
  --rule-strong: #D8D8D3;
  --accent:      #C4390A;
  --accent-bright: #FF5A1F;
  --accent-tint: #FDF0EA;

  --sans: 'Schibsted Grotesk', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --rail: 148px;
  --gutter: 56px;
  --measure: 64ch;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 700px) { .wrap { padding: 0 22px; } }

.wrap--narrow { max-width: 1080px; }
.doc > *,
.doc-body > *,
.notfound > * { max-width: 68ch; }

/* ── Masthead ─────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.masthead.is-stuck { border-bottom-color: var(--rule); }

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .mark {
  width: 9px; height: 9px;
  background: var(--accent-bright);
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent-bright); }

@media (max-width: 620px) {
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 18px; padding-bottom: 16px; }
  .nav { gap: 18px; font-size: 11px; }
}

/* ── Editorial grid: label rail + prose column ────────── */

.row {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: var(--gutter);
  align-items: start;
}
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; gap: 14px; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: .3em;
  line-height: 1.5;
}
@media (max-width: 860px) { .eyebrow { padding-top: 0; } }

.prose { max-width: var(--measure); }
.prose p { color: var(--ink-soft); }
.prose p + p { margin-top: 1.1em; }
.prose p.lead-in { font-size: 1.16rem; color: var(--ink); line-height: 1.65; }
.prose strong, .prose .lead { color: var(--ink); font-weight: 700; }

.subgroup + .subgroup { margin-top: 40px; }
.subgroup-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero { padding-top: 92px; padding-bottom: 64px; }
@media (max-width: 860px) { .hero { padding-top: 56px; padding-bottom: 44px; } }

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 20ch;
  margin-bottom: 30px;
}
.hero h1 .accent { color: var(--accent); }

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 58ch;
}

.fact-strip {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  max-width: 58ch;
}
.fact-strip span { padding: 2px 16px; border-left: 1px solid var(--rule); }
.fact-strip span:first-child { padding-left: 0; border-left: none; }

/* ── Sections ─────────────────────────────────────────── */

.section {
  padding-top: 68px;
  padding-bottom: 68px;
  border-top: 1px solid var(--rule);
}
@media (max-width: 860px) { .section { padding-top: 48px; padding-bottom: 48px; } }

.section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 26px;
}

/* ── Portfolio ──────────────────────────────────────────
   Entries carry their own rail so the index numerals share
   the same column as every other section label.
   ──────────────────────────────────────────────────────── */

.register-label { margin-bottom: 22px; }

.register { border-top: 1px solid var(--rule); }

.entry {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  column-gap: var(--gutter);
  row-gap: 0;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 860px) {
  .entry { grid-template-columns: 1fr; column-gap: 0; row-gap: 10px; padding: 28px 0; }
}
.entry:last-child { border-bottom: none; padding-bottom: 0; }

.entry-index {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  padding-top: .35em;
}
@media (max-width: 860px) { .entry-index { padding-top: 0; } }

.entry-body { max-width: var(--measure); }

.entry-name {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 10px;
}

.entry--lead { padding: 48px 0; }
.entry--lead .entry-name { font-size: 2.1rem; margin-bottom: 14px; }
.entry--lead .entry-body p { font-size: 1.04rem; }

.entry-body p { color: var(--ink-soft); font-size: .98rem; line-height: 1.7; }
.entry-body p + p { margin-top: .9em; }

.entry-tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  color: var(--ink-mute);
  border-radius: 3px;
  background: var(--paper);
}
.tag--ai { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, white); background: var(--accent-tint); }
.tag--ai .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }

.entry-meta {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-mute);
}

.entry-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

/* ── Figures ────────────────────────────────────────────
   A figure is a row in the same grid as everything else,
   never a block dropped into the text flow: mono label in
   the rail, images in the content column, hairlines above
   and below so it reads as structure rather than insertion.
   ──────────────────────────────────────────────────────── */

.figure-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: var(--gutter);
  align-items: start;
  max-width: none;
  margin: 40px 0 0;
  padding: 28px 0 26px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 860px) {
  .figure-row { grid-template-columns: 1fr; gap: 16px; margin-top: 26px; }
}
/* Outside the register there is no grid gap to inherit. */
.doc .figure-row,
.doc-body .figure-row { margin: 38px 0 0; }

.figure-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.5;
  padding-top: .3em;
}
@media (max-width: 860px) { .figure-label { padding-top: 0; } }

.figure-body { min-width: 0; }

.figure-body figcaption {
  margin-top: 16px;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-mute);
  max-width: 62ch;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.shots--pair { grid-template-columns: repeat(2, 1fr); max-width: 548px; }
@media (max-width: 700px) {
  /* A trio holds its single row on phones rather than
     orphaning the third shot onto a line of its own. */
  .shots { gap: 8px; }
  .shots--pair { gap: 10px; }
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-2);
}

/* The register's rows stay in column two once a figure has
   spanned the full width of an entry. */
.entry-foot { grid-column: 2; margin-top: 26px; }
.entry-foot .entry-tags { margin-top: 0; }
@media (max-width: 860px) { .entry-foot { grid-column: 1; margin-top: 22px; } }

/* App icon paired with a product name. */

.entry-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}
.entry-head .entry-name { margin-bottom: 0; }

.app-icon {
  display: block;
  border-radius: 22.5%;
  border: 1px solid var(--rule);
  flex: none;
}
.entry-head .app-icon { width: 48px; height: 48px; }
.entry--lead .entry-head .app-icon { width: 62px; height: 62px; }
.doc .app-icon { width: 68px; height: 68px; margin-bottom: 22px; }
@media (max-width: 700px) {
  .entry--lead .entry-head .app-icon { width: 50px; height: 50px; }
}

/* Portrait sitting in the label rail, under its eyebrow. */

.rail { min-width: 0; }

.rail-portrait { margin-top: 18px; max-width: var(--rail); }
.rail-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
.rail-portrait figcaption {
  margin-top: 11px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1.55;
}
@media (max-width: 860px) {
  .rail-portrait { margin-top: 16px; margin-bottom: 4px; }
}

/* ── Links ────────────────────────────────────────────── */

.link {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size .28s cubic-bezier(.22,1,.36,1);
}
.link:hover, .link:focus-visible { background-size: 100% 1px; }
.link .arw { display: inline-block; transition: transform .28s cubic-bezier(.22,1,.36,1); }
.link:hover .arw { transform: translateX(3px); }
.link--quiet { color: var(--ink-soft); }
.link--back { color: var(--ink-mute); }

.prose a:not(.link),
.doc a:not(.link),
.colophon a:not(.link) {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  transition: text-decoration-color .18s ease, color .18s ease;
}
.prose a:not(.link):hover,
.doc a:not(.link):hover,
.colophon a:not(.link):hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ── Contact ──────────────────────────────────────────── */

.contact-email {
  display: inline-block;
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent-bright), var(--accent-bright));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  transition: background-size .3s cubic-bezier(.22,1,.36,1), color .2s ease;
  padding-bottom: 4px;
}
.contact-email:hover { color: var(--accent); background-size: 100% 3px; }

.elsewhere {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.elsewhere a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 16px;
  border-left: 1px solid var(--rule);
  transition: color .18s ease;
}
.elsewhere a:first-child { padding-left: 0; border-left: none; }
.elsewhere a:hover { color: var(--accent); }

/* ── Document pages (product detail, legal) ───────────── */

.doc { padding-top: 68px; padding-bottom: 40px; }
@media (max-width: 860px) { .doc { padding-top: 48px; padding-bottom: 32px; } }

.doc-kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc-kicker .dot { width: 7px; height: 7px; background: var(--accent-bright); flex: none; }

.doc h1 {
  font-family: var(--sans);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-wrap: balance;
}

.doc-lede {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
}
.doc-lede + .doc-lede { margin-top: 1em; }
.doc-lede strong { color: var(--ink); font-weight: 700; }

.doc-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--ink-mute);
  margin-bottom: 40px;
}

.doc-body h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 52px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.doc-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }

.doc-body h3 {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 30px 0 8px;
}

.doc-body p {
  color: var(--ink-soft);
  font-size: .99rem;
  line-height: 1.72;
  margin-bottom: 1em;
}

.doc-body ul { list-style: none; margin: 0 0 1.2em; }
.doc-body li {
  position: relative;
  color: var(--ink-soft);
  font-size: .99rem;
  line-height: 1.7;
  padding-left: 22px;
  margin-bottom: .5em;
}
.doc-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .74em;
  width: 5px;
  height: 1px;
  background: var(--accent);
}
.doc-body li strong { color: var(--ink); font-weight: 700; }

.callout {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--paper-2);
  border-left: 2px solid var(--accent-bright);
}
.callout p { margin: 0; font-size: .97rem; color: var(--ink-soft); }
.callout strong { color: var(--ink); font-weight: 700; }

.doc-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.doc-back { margin-top: 56px; }

/* ── Colophon ─────────────────────────────────────────── */

.colophon {
  border-top: 1px solid var(--rule);
  padding-top: 34px;
  padding-bottom: 56px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--ink-mute);
  line-height: 1.9;
}
.colophon a { color: var(--ink-mute); text-decoration: none; }
.colophon a:hover { color: var(--ink-soft); }
.colophon-legal { display: flex; gap: 18px; }

/* ── Entrance motion ──────────────────────────────────────
   Nothing is hidden by CSS alone. The hero animates from a
   keyframe (self-completing, so it ends visible even if the
   animation never runs), and section content is only hidden
   once script.js has actually claimed it. No JS, no blank page.
   ──────────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.hero-stack > * { animation: rise .8s cubic-bezier(.22,1,.36,1) both; }
.hero-stack > :nth-child(2) { animation-delay: 80ms; }
.hero-stack > :nth-child(3) { animation-delay: 160ms; }

.js .section .rise { opacity: 0; transform: translateY(14px); }
.js .section.is-in .rise {
  opacity: 1;
  transform: none;
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}
.js .section.is-in .rise:nth-child(2) { transition-delay: 70ms; }
.js .section.is-in .rise:nth-child(3) { transition-delay: 140ms; }
.js .section.is-in .rise:nth-child(4) { transition-delay: 210ms; }
.js .section.is-in .rise:nth-child(5) { transition-delay: 280ms; }

@media (prefers-reduced-motion: reduce) {
  .hero-stack > * { animation: none; }
  .js .section .rise { opacity: 1; transform: none; transition: none; }
  .link, .link .arw, .contact-email, .masthead { transition: none; }
  .nav a, .elsewhere a { transition: none; }
}

/* ── Accessibility ────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--rule-strong);
  z-index: 50;
}
.skip:focus { left: 32px; }

/* ── 404 ──────────────────────────────────────────────── */

.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.notfound-code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.notfound h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 18ch;
}
.notfound p { color: var(--ink-soft); max-width: 48ch; font-size: 1.02rem; }
.notfound .doc-actions { margin-top: 30px; }
