/* ==========================================================================
   wosh.productions — the MARK SYSTEM
   --------------------------------------------------------------------------
   Every token and motif in this file is taken from the wosh mark
   (3D_elements/3D_logo.glb). Full write-up: /docs/mark-system.md.

   GEOMETRY (measured from the GLB front silhouette, IoU 0.98 against the
   idealised construction below). Unit: m = one stroke = THE MODULE.

         gap (3 m) — the ring is open at the top, cut by two verticals
        |   |   |   |
        ▌   ▌   ▌   ▌      verticals at x = −1.5, −0.5, +0.5, +1.5 m
     ◜  ▌         ▐  ◝
    ◜   ┌─────────┐   ◝    arch (Π): top edge ON the horizontal diameter,
    ▌   │ ┌─────┐ │   ▐              bar 1 m, legs 1 m, merging into the ring
    ◟   │ │     │ │   ◞
     ◟  │ │slot │ │  ◞     slot: 1 m, from under the arch down through the
        ◟─┘     └─◞              bottom of the ring
                            outer radius R = 3.68 m, inner radius r = 2.70 m
                            outer diameter D = 7.36 m, all inner corners square

   DERIVED RATIOS
     ring ratio        R / r = 1.363   → the type scale
     module / diameter       = 1/7.36  → spacing (R = 3.68 m, inner Ø = 5.4 m)
     horizontal division     2.18 : 1 : 1 : 1 : 2.18 (ring | leg | slot | leg
                             | ring) → the column grid ("mark grid")
     gutter between halves   = 1 m (the slot)

   MOTIFS (what each part does in the interface)
     ring   open at the top: cursor, scroll progress, button hover ring,
            reading ring, focus ring shape (capsule = a stretched ring)
     arch   square-cornered frames; Π-shaped section heads
     slot   1-module notch in frames, the "slot opens" reveal, the active
            marker in the nav, dividers
     verticals  the hero grid (the 3D mark's own module), day-section hairlines
     parts  section markers: the mark taking itself apart, 01 ring … 07 whole

   MOTION — one easing family, from the hero's presenting spin
     spin angle  f(φ) = φ − E·sin 2φ   (E = 0.38 in home-x-3d.js)
     --ease-spin    the spin itself over half a turn (in-out, ends at 0.24×)
     --ease-arrive  the limit E = 0.5: the mark coming to rest on its front
                    (out, ends at 0×). Used for everything that arrives.
     --ease-leave   the mirror (in). Used for things that go away.

   LOAD: after /site.css and /nav.css, before the page's own stylesheet.
   Scope: everything here is either a token, a `mk-` class, or sits under
   body.mk, so pages that don't opt in are untouched.
   ========================================================================== */

/* Registered so the ring draw (buttons) can transition an angle */
@property --mk-sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  /* ── Module ─────────────────────────────────────────────────────────── */
  /* 16 px on phones, ~22 px at 1440, ~25 px at 1920 */
  --m: clamp(16px, 0.75vw + 11px, 26px);
  --m-q: calc(var(--m) * .25);
  --m-h: calc(var(--m) * .5);
  --m-2: calc(var(--m) * 2);
  --m-3: calc(var(--m) * 3);          /* the gap at the top of the ring */
  --m-R: calc(var(--m) * 3.68);       /* outer radius */
  --m-ri: calc(var(--m) * 5.4);       /* inner diameter: a section breathes one inner ring */
  --m-D: calc(var(--m) * 7.36);       /* outer diameter */

  /* ── Type: ring ratio R/r = 1.363 ───────────────────────────────────── */
  --t-1: .734rem;
  --t0: 1rem;
  --t1: 1.363rem;
  --t2: 1.858rem;
  --t3: 2.532rem;
  --t4: 3.451rem;
  --t5: 4.704rem;
  --t6: 6.411rem;
  --t7: 8.738rem;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* ── Colour: sampled from the chrome render ─────────────────────────── */
  --night: #060709;        /* the stage */
  --night-2: #0c0e13;
  --night-3: #14161c;
  --chrome-1: #252126;     /* body of the chrome, darkest facet */
  --chrome-2: #3b3336;
  --chrome-3: #6a5652;
  --chrome-pale: #dfcdb6;  /* pale chrome highlight */
  --sun: #fcd4a3;          /* warm sunset highlight: THE accent on night */
  --copper: #9e7762;       /* warm mid tone (decoration only, not text on light) */
  --copper-ink: #7a5744;   /* copper dark enough for text on paper (6.0:1) */
  --rim: #8299bb;          /* cool blue rim: secondary accent, sparingly */
  --n-ink: #f3f1ea;
  --n-muted: rgba(243, 241, 234, .68);
  --n-line: rgba(243, 241, 234, .14);
  --n-line-2: rgba(243, 241, 234, .07);
  --d-ink: #0b0c0f;
  --d-paper: #f4f2ed;      /* day paper, a touch of the pale chrome */
  --d-wash: #eae6de;
  --d-muted: rgba(11, 12, 15, .64);
  --d-line: rgba(11, 12, 15, .14);
  --d-line-2: rgba(11, 12, 15, .06);

  /* ── Motion ─────────────────────────────────────────────────────────── */
  --ease-spin: linear(0, .0162, .0395, .0758, .129, .2007, .2895, .3912, .5, .6088, .7105, .7993, .871, .9243, .9605, .9838, 1);
  --ease-arrive: linear(0, .1246, .2468, .3643, .4751, .5772, .6691, .7497, .8183, .8747, .9191, .9522, .9751, .9893, .9968, .9996, 1);
  --ease-leave: linear(0, .0004, .0032, .0107, .0249, .0478, .0809, .1253, .1817, .2503, .3309, .4228, .5249, .6357, .7532, .8754, 1);
  --dur-1: .24s;
  --dur-2: .48s;
  --dur-3: .96s;
  --dur-4: 1.44s;

  /* ── The parts as masks (same paths as the inline sprite) ───────────── */
  --mk-ring-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath d='M-.5 3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-.5 2.653ZM1.5-3.36A3.68 3.68 0 0 1 .5 3.646V2.653A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3C/svg%3E");
  --mk-full-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-3.68 -3.68 7.36 7.36'%3E%3Cpath d='M1.5-3.36A3.68 3.68 0 0 1 .5 3.646V1H-.5V3.646A3.68 3.68 0 0 1-1.5-3.36V-2.245A2.7 2.7 0 0 0-1.5 2.245V0H1.5V2.245A2.7 2.7 0 0 0 1.5-2.245Z'/%3E%3C/svg%3E");
}

/* Browsers without linear(): the closest cubic-béziers */
@supports not (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-spin: cubic-bezier(.45, .05, .55, .95);
    --ease-arrive: cubic-bezier(.33, .66, .55, 1);
    --ease-leave: cubic-bezier(.45, 0, .67, .34);
  }
}

/* ══ Page scope ═══════════════════════════════════════════════════════════ */
body.mk {
  --ink: var(--d-ink);
  --paper: var(--d-paper);
  --wash: var(--d-wash);
  --muted: var(--d-muted);
  --hairline: var(--d-line);
  --ease: var(--ease-arrive);
  --accent: var(--d-ink);
  --focus: var(--d-ink);
  background: var(--paper);
}

.mk-night {
  --ink: var(--n-ink);
  --paper: var(--night);
  --wash: var(--night-2);
  --muted: var(--n-muted);
  --hairline: var(--n-line);
  --accent: var(--sun);
  --focus: var(--sun);
  background: var(--night);
  color: var(--ink);
}

.mk-day {
  background: var(--paper);
  color: var(--ink);
}

.mk-wash {
  background: var(--wash);
}

/* ══ Type ═════════════════════════════════════════════════════════════════ */
.mk-display {
  font-size: clamp(var(--t3), 7vw, var(--t6));
  font-weight: 500;
  line-height: .94;
  letter-spacing: -0.048em;
}

/* section headings only: headings inside text, tools, cards and the
   payroll column keep their own sizes */
body.mk h2:not(:is(.prose, .tool-wrap, .shell--left, .pay-col, .card, .team-card, .answer, .answer-card, .note, .toc-card, .contact-card, .tcard, .slab, .cj-app, dialog, form) h2),
.mk-h2 {
  font-size: clamp(var(--t3), 5.2vw, var(--t5));
  line-height: .98;
  letter-spacing: -0.045em;
}

body.mk h3 {
  letter-spacing: -0.03em;
}

body.mk .lede {
  font-size: clamp(1.05rem, 1.1vw + .6rem, var(--t1));
  line-height: 1.5;
}

/* Small monospace labels: the "construction drawing" voice */
.mk-mono {
  font-family: var(--mono);
  font-size: var(--t-1);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ── Section marker: number + a part of the mark ──────────────────────── */
/* <p class="eyebrow mk-marker"><svg class="mk-glyph">…</svg><b>01</b>Usluge</p> */
body.mk .eyebrow {
  font-family: var(--mono);
  font-size: var(--t-1);
  font-weight: 500;
  letter-spacing: .16em;
}

.mk-night .eyebrow {
  color: var(--sun);
}

.mk-marker {
  display: flex;
  align-items: center;
  gap: .9em;
}

/* the number in copper ink on day (6:1 on paper, 5.3:1 on the wash), the
   sun on night; no opacity, which took it under AA (3.6:1) */
.mk-marker b {
  font-weight: 500;
  color: var(--copper-ink);
}

.mk-night .mk-marker b {
  color: var(--sun);
}

.mk-marker b::after {
  content: "";
  display: inline-block;
  width: var(--m-2);
  height: 1px;
  margin: 0 0 .3em .9em;
  vertical-align: middle;
  background: currentColor;
  opacity: .5;
}

/* ══ Glyphs: parts of the mark (sprite symbols #mk-*) ═════════════════════ */
.mk-glyph {
  flex: none;
  width: 1.9em;
  height: 1.9em;
  overflow: visible;
}

/* in a section marker the part is the size of two strokes of the page */
.mk-marker .mk-glyph {
  width: var(--m-2);
  height: var(--m-2);
  color: var(--ink);
}

.mk-night .mk-marker .mk-glyph {
  color: var(--sun);
}

.mk-marker .g-base {
  opacity: .16;
}

/* part classes, usable in any inline SVG built from the sprite */
.g-base {
  fill: currentColor;
  opacity: .2;
}

.g-part {
  fill: currentColor;
}

.g-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}

.mk-glyph .g-hi {
  stroke-width: 1.6px;
}

/* Service icons: whole glyphs on the module grid */
.mk-icon {
  display: block;
  width: var(--m-3);
  height: var(--m-3);
  fill: currentColor;
}

/* ══ Grid ═════════════════════════════════════════════════════════════════ */
/* The mark grid: ring | leg | slot | leg | ring, gutters of one slot */
.mk-grid {
  display: grid;
  grid-template-columns: 2.18fr 1fr 1fr 1fr 2.18fr;
  column-gap: 0;
}

/* Section head: the title takes ring + leg + slot (57 %), the sentence the
   other leg + ring, so the split falls on the mark's right leg */
.mk-head {
  display: grid;
  gap: var(--m) var(--m);
  align-items: end;
}

.mk-head .lede {
  max-width: 40ch;
}

@media (min-width: 901px) {
  .mk-head {
    grid-template-columns: 4.18fr 3.18fr;
    grid-template-areas: "mark mark" "title lede";
    column-gap: var(--m);
  }

  .mk-head>.eyebrow {
    grid-area: mark;
  }

  .mk-head>h2 {
    grid-area: title;
  }

  .mk-head>.lede {
    grid-area: lede;
    margin: 0 0 .35em;
  }
}

/* Two halves separated by the slot */
.mk-halves {
  display: grid;
  gap: var(--m-2) var(--m);
}

@media (min-width: 1000px) {
  .mk-halves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Section rhythm */
.mk-band {
  padding: var(--m-ri) 0;
  /* nothing in a band may widen the page (Firefox counted the centred
     .table-scroll's untransformed box under the clip-path of .mk-cut);
     clip, not hidden, so sticky heads inside still stick */
  overflow-x: clip;
}

.mk-band--tight {
  padding: var(--m-R) 0;
}

.mk-band>.shell>*+* {
  margin-top: var(--m-R);
}

.mk-band>.shell>.mk-head+* {
  margin-top: var(--m-R);
}

/* Day sections show their grid: the mark's four verticals as hairlines,
   placed on the shell's content box (29.6 / 43.2 / 56.8 / 70.4 %) */
.mk-verticals {
  position: relative;
  isolation: isolate;
}

.mk-verticals::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  right: max(var(--gutter), calc((100% - var(--shell)) / 2 + var(--gutter)));
  pointer-events: none;
  --l: var(--d-line-2);
  background: linear-gradient(90deg,
      transparent calc(29.62% - .5px), var(--l) 0 calc(29.62% + .5px),
      transparent 0 calc(43.21% - .5px), var(--l) 0 calc(43.21% + .5px),
      transparent 0 calc(56.79% - .5px), var(--l) 0 calc(56.79% + .5px),
      transparent 0 calc(70.38% - .5px), var(--l) 0 calc(70.38% + .5px),
      transparent 0);
}

.mk-night.mk-verticals::before {
  --l: var(--n-line-2);
}

/* ══ The slot cut: section tops ═══════════════════════════════════════════
   A section that slides over the one before it carries the slot: a notch,
   one slot wide (13.6 % of the content, the page grid's slot) and half a
   module deep, cut into its top edge on the page's centre line. Through it
   you see the section underneath. */
.mk-cut {
  --cut-w: max(var(--m-3), calc((min(100vw, var(--shell)) - 2 * var(--gutter)) * .1358));
  --cut-h: var(--m);
  position: relative;
  margin-top: calc(-1 * var(--cut-h));
  clip-path: polygon(0 0,
      calc(50% - var(--cut-w) / 2) 0,
      calc(50% - var(--cut-w) / 2) var(--cut-h),
      calc(50% + var(--cut-w) / 2) var(--cut-h),
      calc(50% + var(--cut-w) / 2) 0,
      100% 0, 100% 100%, 0 100%);
}

/* ══ Frames: square corners, a 1-module slot notch ════════════════════════ */
/* The mark has no rounded corner anywhere; circles are the only curves.
   Frames are filled (no border: a clipped border would break at the notch). */
.mk-frame {
  --nx: var(--m-2);                 /* notch position from the left */
  --nw: var(--m);                   /* one module wide */
  --nh: var(--m-h);                 /* half a module deep */
  position: relative;
  border-radius: 0;
  clip-path: polygon(0 0, var(--nx) 0, var(--nx) var(--nh), calc(var(--nx) + var(--nw)) var(--nh), calc(var(--nx) + var(--nw)) 0, 100% 0, 100% 100%, 0 100%);
}

/* the slot cut from the bottom edge, like the mark's own */
.mk-frame--foot {
  clip-path: polygon(0 0, 100% 0, 100% 100%, calc(var(--nx) + var(--nw)) 100%, calc(var(--nx) + var(--nw)) calc(100% - var(--nh)), var(--nx) calc(100% - var(--nh)), var(--nx) 100%, 0 100%);
}

.mk-frame--center {
  --nx: calc(50% - var(--nw) / 2);
}

/* ══ Buttons: a capsule (a stretched ring); hover draws the open ring ══════ */
body.mk .btn {
  position: relative;
  min-height: 48px;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background-color var(--dur-2) var(--ease-arrive), color var(--dur-2) var(--ease-arrive), border-color var(--dur-2) var(--ease-arrive), transform var(--dur-2) var(--ease-arrive);
}

body.mk .btn::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 1px solid var(--accent);
  pointer-events: none;
  /* hidden by opacity at rest, so an engine without the conic mask or the
     animated @property never shows it unasked (WebKit did, on the nav CTA);
     there the hover shows the closed ring */
  opacity: 0;
  /* conic from 12° to 12° + sweep: starts at the right edge of the gap and
     stops at its left edge, so the drawn ring stays open at the top */
  -webkit-mask: conic-gradient(from 12deg, #000 0 var(--mk-sweep), transparent var(--mk-sweep));
  mask: conic-gradient(from 12deg, #000 0 var(--mk-sweep), transparent var(--mk-sweep));
  transition: opacity var(--dur-1) var(--ease-arrive), --mk-sweep var(--dur-3) var(--ease-arrive);
}

body.mk .btn:hover::after,
body.mk .btn:focus-visible::after {
  opacity: 1;
  --mk-sweep: 336deg;
}

body.mk .btn--solid:hover {
  transform: none;
}

body.mk .btn--ghost {
  border-color: var(--hairline);
}

body.mk .btn--ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.mk-night .btn--solid {
  background: var(--n-ink);
  border-color: var(--n-ink);
  color: var(--night);
}

.mk-night .btn--ghost {
  color: var(--n-ink);
  border-color: var(--n-line);
}

.mk-night .btn--ghost:hover {
  background: var(--n-ink);
  border-color: var(--n-ink);
  color: var(--night);
}

/* ══ Focus: the ring ══════════════════════════════════════════════════════ */
/* the outline follows the element's own corners: square frames stay
   square, the capsule button, chips and pills keep their round ends (a
   radius set here squared off the blog filter chips and language pills) */
body.mk :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

body.mk summary:focus-visible {
  border-radius: 0;
}

/* night surfaces outside .mk-night keep the warm focus ring: the footer,
   ink bands, the night case study, the data-viz stage */
body.mk :is(.site-footer, .band--ink, .case-night, .stage) {
  --focus: var(--sun);
}

body.mk .skip-link {
  background: var(--night);
  color: var(--n-ink);
  outline-color: var(--sun);
}

/* ══ Reveals (JS adds .mk-js on <html> and the classes below, only to blocks
   that start below the fold, so first paint and no-JS show everything) ══ */

/* The signature: the slot opens. A one-module slot rises from the bottom
   edge, then widens to the full frame. */
.mk-js .mk-slot {
  clip-path: inset(100% calc(50% - var(--m-h)) 0);
}

.mk-js .mk-slot.is-in {
  animation: mk-slot var(--dur-4) both;
}

@keyframes mk-slot {
  0% {
    clip-path: inset(100% calc(50% - var(--m-h)) 0);
    animation-timing-function: var(--ease-leave);
  }

  34% {
    clip-path: inset(0 calc(50% - var(--m-h)) 0);
    animation-timing-function: var(--ease-arrive);
  }

  100% {
    clip-path: inset(0 0 0);
  }
}

.mk-js .mk-rise {
  opacity: 0;
  transform: translate3d(0, var(--m), 0);
  transition: opacity var(--dur-3) var(--ease-arrive), transform var(--dur-3) var(--ease-arrive);
}

.mk-js .mk-rise.is-in {
  opacity: 1;
  transform: none;
}

/* Hairlines are drawn left to right */
.mk-js .mk-draw {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-4) var(--ease-arrive);
}

.mk-js .mk-draw.is-in {
  transform: none;
}

/* ══ Components ═══════════════════════════════════════════════════════════ */

/* ── Steps: the mark assembles itself, one part per step ─────────────── */
.mk-steps {
  display: grid;
  gap: var(--m-2) var(--m);
  counter-reset: mk-step;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 700px) {
  .mk-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .mk-steps {
    grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  }
}

.mk-step {
  position: relative;
  padding-top: var(--m);
  counter-increment: mk-step;
}

.mk-step::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--hairline);
}

.mk-step__mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--m);
  font: 500 var(--t-1)/1 var(--mono);
  letter-spacing: .14em;
  color: var(--muted);
}

.mk-step__mark::before {
  content: "0" counter(mk-step);
}

.mk-step__mark svg {
  width: var(--m-3);
  height: var(--m-3);
  color: var(--ink);
}

.mk-step h3 {
  font-size: var(--t1);
  line-height: 1.15;
}

.mk-step p {
  margin-top: .6rem;
  color: var(--muted);
}

/* the hairline above each step is drawn as it arrives */
.mk-js .mk-step.mk-rise::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-4) var(--ease-arrive) .2s;
}

.mk-js .mk-step.mk-rise.is-in::after {
  transform: scaleX(1);
}

/* the last step is the whole mark, in chrome; the newest part in copper */
.mk-step .g-chrome {
  fill: url(#mk-chrome);
}

.mk-step .g-line {
  opacity: .5;
}

.mk-step .g-new {
  color: var(--copper-ink);
}

/* ── FAQ: the marker is the slot; open, it becomes the bar of the arch ── */
body.mk .faq details {
  border-top: 1px solid var(--hairline);
}

body.mk .faq details:last-child {
  border-bottom: 1px solid var(--hairline);
}

body.mk .faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: var(--m) var(--m-2) var(--m) 0;
  font-size: var(--t1);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

body.mk .faq summary::-webkit-details-marker {
  display: none;
}

body.mk .faq summary::after,
body.mk .faq summary::before {
  content: "";
  position: absolute;
  right: calc(var(--m-h) - 1px);
  top: 50%;
  width: 3px;
  height: var(--m);
  margin-top: calc(var(--m) * -.5);
  background: currentColor;
  transition: transform var(--dur-2) var(--ease-arrive), opacity var(--dur-2) var(--ease-arrive);
}

body.mk .faq summary::before {
  transform: rotate(90deg);
}

body.mk .faq details[open] summary::after {
  transform: rotate(90deg);
}

body.mk .faq details p {
  max-width: 62ch;
  padding: 0 var(--m-2) var(--m) 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

body.mk .faq details p a {
  text-underline-offset: 3px;
}

/* ── Stats ────────────────────────────────────────────────────────────── */
.mk-stats {
  display: grid;
  gap: var(--m) var(--m);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.mk-stat {
  padding-top: var(--m);
  border-top: 1px solid var(--hairline);
}

.mk-stat strong {
  display: block;
  font-size: clamp(var(--t4), 6vw, var(--t6));
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: .9;
  font-variant-numeric: tabular-nums;
}

.mk-stat span {
  display: block;
  margin-top: var(--m-h);
  max-width: 28ch;
  color: var(--muted);
}

/* ── Plans: frames with the slot, the price in display type ──────────── */
.mk-plans {
  display: grid;
  gap: var(--m);
}

@media (min-width: 900px) {
  .mk-plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mk-plan {
  display: flex;
  flex-direction: column;
  gap: var(--m-h);
  padding: var(--m-2) var(--m) var(--m);
  background: var(--wash);
}

.mk-plan h3 {
  font-size: var(--t1);
}

.mk-plan__price {
  margin: var(--m-h) 0;
  font-size: var(--t1);
  color: var(--muted);
}

.mk-plan__price strong {
  font-size: clamp(var(--t4), 4.4vw, var(--t5));
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--ink);
}

.mk-plan p {
  color: var(--muted);
}

.mk-plan--lead {
  background: var(--night);
  color: var(--n-ink);
  --ink: var(--n-ink);
  --muted: var(--n-muted);
}

.mk-plan__tag {
  align-self: flex-start;
  color: var(--sun);
}

/* ── Closing band: the construction drawing of the mark ──────────────── */
.mk-construct {
  pointer-events: none;
}

/* stroke widths in the drawing's own units (10.4 across): with
   non-scaling-stroke, Chrome measures the dash in screen px and the
   pathLength draw-on breaks into dashes */
.mk-construct .c-line {
  fill: none;
  stroke: rgba(243, 241, 234, .2);
  stroke-width: .016;
}

.mk-construct .c-key {
  stroke: rgba(252, 212, 163, .5);
  stroke-width: .02;
}

.mk-construct .c-fill {
  fill: url(#mk-chrome);
  opacity: 0;
}

.mk-construct text {
  font: 500 .19px var(--mono);
  letter-spacing: .02em;
  fill: var(--n-muted);
}

/* drawn on arrival (stroke-dash on pathLength=1), then the mark fills */
.mk-js .mk-construct .c-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.mk-js .mk-construct.is-in .c-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.4s var(--ease-arrive);
}

.mk-js .mk-construct.is-in .c-line:nth-of-type(2n) {
  transition-delay: .2s;
}

.mk-js .mk-construct.is-in .c-line:nth-of-type(3n) {
  transition-delay: .4s;
}

.mk-construct.is-in .c-fill,
html:not(.mk-js) .mk-construct .c-fill {
  opacity: 1;
  transition: opacity var(--dur-4) var(--ease-arrive) 1.4s;
}

.mk-construct text {
  opacity: 0;
}

.mk-construct.is-in text,
html:not(.mk-js) .mk-construct text {
  opacity: 1;
  transition: opacity var(--dur-3) var(--ease-arrive) 1s;
}

/* ── Split sections (head left, body right) ─────────────────────────── */
body.mk .split .band__head h2 {
  font-size: clamp(var(--t3), 4vw, var(--t4));
  margin-top: var(--m-h);
}

body.mk .split .band__head .lede {
  margin-top: var(--m);
}

body.mk .split {
  column-gap: var(--m-2);
}

@media (min-width: 900px) {
  body.mk .split {
    grid-template-columns: minmax(0, 4.18fr) minmax(0, 5.18fr);
  }
}

body.mk .rows {
  border-top: 1px solid var(--hairline);
}

body.mk .rows a {
  position: relative;
  padding: var(--m-h) var(--m) var(--m-h) 0;
  transition: padding var(--dur-2) var(--ease-arrive);
}

/* hover: the slot slides in from the left edge */
body.mk .rows a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  background: var(--ink);
  transform: scaleY(0);
  transition: transform var(--dur-2) var(--ease-arrive);
}

body.mk .rows a:hover {
  padding-left: var(--m);
}

body.mk .rows a:hover::before {
  transform: none;
}

body.mk .rows em {
  border-radius: 0;
}

body.mk .faq {
  margin-top: 0;
}

/* phones: the drawing sits behind the text, so it keeps its lines and a
   faint fill, and drops the labels */
@media (max-width: 900px) {
  .mk-construct text {
    display: none;
  }

  .mk-construct.is-in .c-fill,
  html:not(.mk-js) .mk-construct .c-fill {
    opacity: .32;
  }
}

/* ══ Scroll progress: the ring fills from the left arm, round the bottom,
   up to the right arm (how the "u" of the mark is written) ═══════════════ */
.mk-progress {
  position: fixed;
  z-index: 80;
  /* centred in the gutter left of the widest shell (1488 px + its 24 px
     padding); below 1600 px wide that gutter is under 80 px and the ring
     would sit on text, so it isn't shown there (rule below) */
  left: max(16px, calc((100vw - var(--shell, 1488px)) / 4 - 12px));
  bottom: clamp(14px, 2vw, 28px);
  width: 48px;
  height: 48px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 14, 19, .62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px var(--n-line);
  color: var(--n-ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--dur-2) var(--ease-arrive), transform var(--dur-2) var(--ease-arrive), background-color var(--dur-2) var(--ease-arrive);
}

/* shown while the page is moving, at the end, and on focus: at rest it
   steps out of the way of the content in the gutter */
.mk-progress.is-on.is-moving,
.mk-progress.is-on.is-end,
.mk-progress.is-on:hover,
.mk-progress:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

@media (max-width: 1599px) {
  .mk-progress {
    display: none;
  }
}

body[data-nav-tone="day"] .mk-progress {
  background: rgba(244, 242, 237, .78);
  box-shadow: inset 0 0 0 1px var(--d-line);
  color: var(--d-ink);
}

.mk-progress svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.mk-progress .p-base {
  fill: currentColor;
  opacity: .18;
}

.mk-progress .p-arch {
  fill: currentColor;
  opacity: .18;
  transition: opacity var(--dur-2) var(--ease-arrive);
}

.mk-progress .p-fill {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

/* at the very end the arch arrives: the mark is complete */
.mk-progress.is-end .p-arch {
  opacity: 1;
}

.mk-progress:hover .p-arch,
.mk-progress:focus-visible .p-arch {
  opacity: .6;
}

/* the ring lives in the gutter only (>= 1600 px, above), so the footer's
   last line no longer needs to make room for it */

/* ══ Cursor: the open ring; over a link the arch and slot join it and it
   becomes the whole mark (mouse only, added by mark-system.js) ═══════════ */
.mk-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}

.mk-cursor.is-on {
  opacity: 1;
}

.mk-cursor.is-on.is-off {
  opacity: 0;
}

.mk-cursor svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
  transition: transform var(--dur-2) var(--ease-arrive);
}

.mk-cursor .c-arch {
  opacity: 0;
  transform: scale(.6);
  transform-origin: 0 0;
  transition: opacity var(--dur-1) var(--ease-arrive), transform var(--dur-2) var(--ease-arrive);
}

.mk-cursor.is-link svg {
  transform: scale(.56);
}

.mk-cursor.is-link .c-arch {
  opacity: 1;
  transform: none;
}

.mk-cursor span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font: 600 .58rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--dur-1);
}

.mk-cursor.is-btn svg {
  transform: translate(20px, 20px) scale(.32);
}

.mk-cursor.is-label svg {
  transform: scale(2.1);
}

.mk-cursor.is-label span {
  opacity: 1;
}

/* ══ Reduced motion: everything still, everything visible ═════════════════ */
@media (prefers-reduced-motion: reduce) {

  .mk-js .mk-slot,
  .mk-js .mk-slot.is-in,
  .mk-js .mk-rise,
  .mk-js .mk-draw {
    clip-path: none;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .mk-js .mk-step.mk-rise::after {
    transform: scaleX(1);
  }

  .mk-js .mk-construct .c-line {
    stroke-dashoffset: 0;
  }

  .mk-construct .c-fill,
  .mk-construct text {
    opacity: 1;
  }

  body.mk .btn::after {
    transition: none;
  }

  .mk-cursor {
    display: none;
  }
}
