/* ==========================================================================
   OsloPixel brand layer — "OsloPixel" design system (black and white).
   Loaded last (see functions.php). The photos bring the colour.
   Mørk (dark) theme: the primary theme of the system.
   Source of truth for values: the design system's tokens.json.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/martian-mono-latin.woff2") format("woff2");
}

:root {
  /* colour — Lys */
  --op-surface: #f5f5f3;
  --op-surface-raised: #ffffff;
  --op-surface-sunken: #e9e9e6;
  --op-ink: #0b0b0b;
  --op-ink-2: #2e2e2b;
  --op-ink-3: #4a4a45;
  --op-line: #d6d6d2;
  --op-line-strong: #0b0b0b;
  /* legacy names, remapped so every existing rule follows */
  --op-dark: #0b0b0b;
  --op-accent: #0b0b0b;
  --op-accent-l: #2b2b29;
  --op-mid: #2e2e2b;
  --op-bg: #f5f5f3;
  --op-card: #e9e9e6;
  --op-white: #ffffff;
  --op-border: #d6d6d2;

  /* type */
  --op-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --op-mono: "Martian Mono", ui-monospace, Menlo, monospace;

  /* Neve */
  --nv-primary-accent: #0b0b0b;
  --nv-secondary-accent: #0b0b0b;
  --nv-site-bg: #f5f5f3;
  --nv-light-bg: #e9e9e6;
  --nv-dark-bg: #0b0b0b;
  --nv-text-color: #0b0b0b;
  --nv-text-dark-bg: #f2f2f0;
  --h1fontfamily: var(--op-display);
  --h2fontfamily: var(--op-display);
  --h3fontfamily: var(--op-display);
}

body { background: var(--op-surface); color: var(--op-ink); }

/* Display type: tight, heavy, leading under 1 */
h1, h2,
.op-hero-left h1,
.op-section-header h2,
.op-why-text h2,
.op-process-header h2,
.op-portfolio-header h2,
.op-cta-band h2,
.op-price h2,
.hero h1,
.page-hero h1 {
  font-family: var(--op-display) !important;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}
h3,
.op-card-body h3,
.op-portfolio-body h3,
.op-step h3 {
  font-family: var(--op-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.op-price-amount { font-family: var(--op-display); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Mono voice: labels, eyebrows, credits, buttons. Always uppercase. */
.op-label, .section-label, .op-hero-eyebrow, .op-card-num, .op-step-week,
.op-portfolio-tag, .op-trust-label, .op-footer-col h4, .op-footer-bottom,
.op-btn, .op-btn-white, .btn, .btn-white, .btn-primary, .btn-dark,
[class*="eyebrow"], [class*="-tag"]:not(.op-price-tag) {
  font-family: var(--op-mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.op-label, .section-label, .op-hero-eyebrow, .op-card-num, .op-step-week,
.op-portfolio-tag, .op-trust-label { font-size: 0.72rem; color: var(--op-ink-3); }
.op-hero-eyebrow::before { height: 1px; background: currentColor; }

/* Square. No shadows, no gradients, no lifting cards. */
*, *::before, *::after { border-radius: 0 !important; }
.op-offer-card, .op-portfolio-card, .op-hero-badge, .op-offer-footer,
.op-price-tag, .op-step-dot, .op-step-count { box-shadow: none !important; transform: none !important; }
.op-offer-card:hover, .op-portfolio-card:hover { transform: none !important; box-shadow: none !important; }
.op-offer-card, .op-portfolio-card { border: 1px solid var(--op-line); background: var(--op-surface-raised); }
.op-offer-card:hover, .op-portfolio-card:hover { border-color: var(--op-line-strong); }
.op-thumb-1, .op-thumb-2, .op-thumb-3 { background: var(--op-surface-sunken); }

/* Buttons: invert fill, mono caps, square */
.op-btn, a.op-btn {
  background: var(--op-ink) !important;
  color: var(--op-surface) !important;
  border: 1px solid var(--op-ink) !important;
  font-size: 0.75rem !important;
  padding: 14px 24px !important;
}
.op-btn:hover, a.op-btn:hover {
  background: var(--op-surface) !important;
  color: var(--op-ink) !important;
}
.op-btn-white, a.op-btn-white {
  background: var(--op-surface) !important;
  color: var(--op-ink) !important;
  border: 1px solid var(--op-surface) !important;
  font-size: 0.78rem !important;
}
.op-btn-white:hover, a.op-btn-white:hover {
  background: transparent !important;
  color: var(--op-surface) !important;
}

/* Highlight (Utheving): one phrase on an invert block */
.op-hl { background: var(--op-ink); color: var(--op-surface); padding: 0 0.12em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Black blocks */
.op-cta-band, .op-problem, .op-footer { background: var(--op-ink); }
.op-cta-band h2, .op-cta-band p { color: var(--op-surface); }
.op-problem-line { color: var(--op-surface); }
.op-hero-badge { background: var(--op-surface); }
.op-badge-icon { background: var(--op-ink); }

/* Photos: hard crops, natural colour */
img { border-radius: 0 !important; }

/* Focus: 2px ink ring (surface-offset on dark blocks) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--op-ink); outline-offset: 2px;
}
.op-cta-band a:focus-visible, .op-footer a:focus-visible, .hero a:focus-visible,
.pricing-card a:focus-visible, .cta-section a:focus-visible { outline-color: #f5f5f3; }

/* Header hairline */
header.header { border-bottom: 1px solid var(--op-line); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.op-hero-left h1 .op-muted { font-weight: 800; color: var(--op-ink-3); }
h3, .op-card-body h3, .op-portfolio-body h3, .op-step h3 { font-family: var(--op-display) !important; }

/* CTA band + footer are both black: a hairline keeps them as two blocks */
.op-footer { border-top: 1px solid #3a3a37; }
section.op-cta-band .op-btn-white { font-size: 0.78rem !important; padding: 16px 32px !important; }
.op-hero-eyebrow::before { background: currentColor !important; }

/* ==========================================================================
   Homepage: photo-first layout (op-work, op-find, op-pack)
   ========================================================================== */
.op-hero-fact { margin-top: 20px; font-family: var(--op-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--op-ink-3); }

.op-work, .op-find, .op-pack { padding: 96px 6%; }
.op-work h2, .op-find h2, .op-pack h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); margin: 0 0 16px; color: var(--op-ink); }
.op-work-head, .op-pack-head { margin-bottom: 48px; max-width: 760px; }
.op-work-head p { font-size: 1.05rem; color: var(--op-ink-2); max-width: 52ch; margin: 0; }
.op-work-head .op-label, .op-pack-head .op-label { margin-bottom: 16px; }

.op-work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.op-work-tile { margin: 0; display: grid; gap: 8px; align-content: start; }
.op-work-tile img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.op-work-tile figcaption { padding-top: 8px; border-top: 2px solid var(--op-ink); color: var(--op-ink-3); }
.op-credit { font-family: var(--op-mono); font-size: 10px; line-height: 14px; letter-spacing: 0.1em; text-transform: uppercase; }

.op-work-grid--soon { margin-top: 20px; }
.op-work-tile--soon { aspect-ratio: 4 / 5; background: var(--op-surface-sunken); border: 1px dashed var(--op-line-strong);
  padding: 16px; display: flex; flex-direction: column; justify-content: space-between; color: var(--op-ink-3); }

.op-find { background: var(--op-surface-sunken); }
.op-find-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
.op-find-text > .op-label { display: block; margin-bottom: 16px; }
.op-find-text p { font-size: 1.02rem; line-height: 1.7; color: var(--op-ink-2); max-width: 52ch; margin: 28px 0 32px; }
.op-find-photo { margin: 0; display: grid; gap: 8px; }
.op-find-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.op-find-photo figcaption { padding-top: 8px; border-top: 2px solid var(--op-ink); color: var(--op-ink-3); }

/* Search field (Sokefelt) */
.op-search { display: flex; align-items: center; padding: 14px 16px; margin-top: 8px; background: var(--op-surface-raised);
  border: 1px solid var(--op-line-strong); max-width: 440px; }
.op-search__q { font-family: var(--op-mono); font-size: 15px; line-height: 22px; color: var(--op-ink); }
.op-search__q::after { content: ""; display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -.2em;
  background: var(--op-ink); animation: op-blink 1.1s steps(1) infinite; }
@keyframes op-blink { 50% { opacity: 0; } }

/* Readout (Avlesning) */
.op-readout { display: grid; border-top: 1px solid var(--op-line); max-width: 960px; }
.op-readout__row { display: grid; grid-template-columns: minmax(5ch, 0.22fr) 1fr; align-items: baseline; gap: 24px;
  padding: 16px 0; border-bottom: 1px solid var(--op-line); }
.op-readout__num { font-family: var(--op-display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; text-align: right; color: var(--op-ink); }
.op-readout__lbl { font-family: var(--op-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--op-ink-2); }

@media (max-width: 900px) {
  .op-work, .op-find, .op-pack { padding: 64px 6%; }
  .op-work-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .op-find-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 480px) { .op-readout__row { grid-template-columns: 1fr; gap: 4px; } .op-readout__num { text-align: left; } }

/* ==========================================================================
   Homepage hero: type only, no photo. The work grid below carries the images.
   ========================================================================== */
.op-hero.op-hero--type { grid-template-columns: 1fr; min-height: 0; }
.op-hero--type .op-hero-left { padding: clamp(72px, 12vw, 148px) 6% clamp(48px, 6vw, 80px); max-width: 1400px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.op-hero--type .op-hero-left h1 { font-size: clamp(2.6rem, 7.2vw, 6.4rem); line-height: 0.98; letter-spacing: -0.045em; max-width: 15em; margin: 0 0 clamp(40px, 6vw, 72px); text-wrap: balance; }
.op-hero--type .op-hero-left h1 .op-muted { display: block; margin-top: 0.15em; }
.op-hero--type .op-hero-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; padding-top: 28px; border-top: 2px solid var(--op-ink); }
.op-hero--type .op-hero-sub { margin: 0; max-width: 46ch; font-size: 1.12rem; }
.op-hero--type .op-hero-fact { margin-top: 24px; }
@media (max-width: 768px) {
  .op-hero--type .op-hero-lower { grid-template-columns: 1fr; gap: 28px; }
}

/* ==========================================================================
   Yellow accent, sampled from the photos (median of the saturated yellows
   across the post images: #F8E43F). Always a fill with black ink on it,
   never yellow text on a light surface (fails contrast).
   ========================================================================== */
:root { --op-yellow: #f8e43f; }
::selection { background: var(--op-yellow); color: var(--op-ink); }

/* Primary button: yellow fill, black ink + border; inverts on hover */
.op-btn, a.op-btn { background: var(--op-yellow) !important; color: var(--op-ink) !important; border-color: var(--op-ink) !important; }
.op-btn:hover, a.op-btn:hover { background: var(--op-ink) !important; color: var(--op-yellow) !important; }
/* On the black CTA band the button is yellow on black */
.op-btn-white, a.op-btn-white { background: var(--op-yellow) !important; color: var(--op-ink) !important; border-color: var(--op-yellow) !important; }
.op-btn-white:hover, a.op-btn-white:hover { background: transparent !important; color: var(--op-yellow) !important; }

/* Hero: one marked word */
.op-mark { background: var(--op-yellow); color: var(--op-ink); padding: 0 0.12em; margin: 0 -0.06em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
/* Eyebrow dash + readout numbers carry the colour in small doses */
.op-hero-eyebrow::before { background: var(--op-yellow) !important; box-shadow: 0 0 0 1px var(--op-ink); height: 4px !important; }
.op-readout__num { background: linear-gradient(transparent 62%, var(--op-yellow) 62%); display: inline-block; justify-self: end; padding: 0 0.1em; }

/* <button class="op-btn"> (forms): the Additional-CSS .op-btn rule prints later than this sheet,
   so match it with a type selector for the extra specificity a.op-btn already has. */
button.op-btn { background: var(--op-yellow) !important; color: var(--op-ink) !important; border: 1px solid var(--op-ink) !important; }
button.op-btn:hover { background: var(--op-ink) !important; color: var(--op-yellow) !important; }

/* ==========================================================================
   Blog: index grid + single post
   ========================================================================== */
.op-blog-hero { max-width: 1240px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) 6% clamp(32px, 4vw, 56px); width: 100%; box-sizing: border-box; }
.op-blog-hero .section-label { display: block; margin-bottom: 24px; }
.op-blog-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.045em; max-width: 14em; margin: 0 0 24px; text-wrap: balance; }
.op-blog-hero p { font-size: 1.12rem; line-height: 1.6; color: var(--op-ink-2); max-width: 52ch; margin: 0; }

/* Cards: flat, hairline-topped, no image shadow */
.blog .posts-wrapper { row-gap: 56px; }
.blog .article-content-col .content { border-top: 2px solid var(--op-ink); padding-top: 20px; box-shadow: none; background: transparent; }
.blog .nv-post-thumbnail-wrap { margin: 0 0 20px; }
.blog .nv-post-thumbnail-wrap img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; box-shadow: none; }
.blog .blog-entry-title { font-size: clamp(1.3rem, 1.8vw, 1.6rem) !important; line-height: 1.15 !important; letter-spacing: -0.025em; margin: 0 0 12px; text-wrap: balance; }
.blog .blog-entry-title a { color: var(--op-ink); text-decoration: none; }
.blog .blog-entry-title a:hover { text-decoration: underline; text-decoration-color: var(--op-yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.blog .nv-meta-list { display: none; }
.blog .excerpt-wrap p { font-size: 0.98rem; line-height: 1.6; color: var(--op-ink-2); margin: 0; }
.blog .excerpt-wrap p a { display: inline-block; margin-top: 10px; font-family: var(--op-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--op-ink); text-decoration: none; border-bottom: 2px solid var(--op-yellow); }
.blog .excerpt-wrap p a:hover { background: var(--op-yellow); }

/* Single post */
.single-post .nv-title-meta-wrap .entry-title { font-size: clamp(2.2rem, 5vw, 4rem) !important; line-height: 1.02 !important; letter-spacing: -0.04em; text-wrap: balance; }
.single-post .nv-meta-list, .single-post .nv-meta-list a { font-family: var(--op-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--op-ink-3); }
.single-post .nv-thumb-wrap img { box-shadow: none; }
.single-post .nv-content-wrap { font-size: 1.08rem; line-height: 1.75; color: var(--op-ink-2); }
.single-post .nv-content-wrap h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.08; letter-spacing: -0.03em; margin: 2.2em 0 0.6em; color: var(--op-ink); }
.single-post .nv-content-wrap h3 { font-size: 1.3rem; letter-spacing: -0.02em; margin: 1.8em 0 0.5em; color: var(--op-ink); }
.single-post .nv-content-wrap a:not(.wp-block-button__link) { color: var(--op-ink); text-decoration: underline; text-decoration-color: var(--op-yellow); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.single-post .nv-content-wrap a:not(.wp-block-button__link):hover { background: var(--op-yellow); }
.single-post .nv-content-wrap strong { color: var(--op-ink); font-weight: 600; }
.single-post .nv-content-wrap blockquote { border: 0; border-left: 2px solid var(--op-ink); background: transparent; padding: 4px 0 4px 24px; margin: 2em 0; font-family: var(--op-display); font-size: 1.3rem; line-height: 1.35; letter-spacing: -0.02em; color: var(--op-ink); }
.single-post .nv-tags-list a { font-family: var(--op-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; background: transparent; border: 1px solid var(--op-ink); color: var(--op-ink); padding: 4px 8px; text-decoration: none; }
.single-post .nv-tags-list a:hover { background: var(--op-yellow); }
.single-post .nv-content-wrap > p, .single-post .nv-content-wrap > ul, .single-post .nv-content-wrap > ol, .single-post .nv-content-wrap > h2, .single-post .nv-content-wrap > h3 { max-width: 66ch; }

/* Mobile: never let a long word or input stretch a stacked grid column */
@media (max-width: 960px) { .sy-left, .form-card, .contact-form-card, .faq-questions { min-width: 0; } }
@media (max-width: 480px) { .op-readout__num { justify-self: start; } }

/* Buttons: long labels wrap instead of running out of the box on narrow screens */
.op-btn, a.op-btn, button.op-btn, .op-btn-white, a.op-btn-white {
  white-space: normal !important;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.4;
}
