/* ══════════════════════════════════════════════════════════════════════
   STB Studio — Starter Package demo.
   Part 1: Broadsheet design-system tokens + the component classes this
   page uses. Part 2: the page's own layout.
   Retune brand colour, type and spacing in :root — nothing below hardcodes
   a hex except the WhatsApp green, which stays green on purpose.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #0088b0;
  --color-accent-2: #d6006c;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-200: #eae7e7;
  --color-neutral-900: #2d2b2b;

  --color-accent-600: #1186ac;
  --color-accent-700: #006786;

  --color-accent-2-700: #aa0b56;

  /* The third process ink — a print treatment colour, not an interface
     accent. Body copy and chrome never take it. */
  --color-process-yellow: #edbb00;

  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #1da851;

  --font-heading: "Source Serif 4", Georgia, serif;
  --font-heading-weight: 600;
  --font-body: "Source Serif 4", Georgia, serif;

  --space-1: 5px;
  --space-2: 10px;
  --space-3: 15px;
  --space-4: 20px;

  --radius-sm: 1px;
  --radius-md: 2px;
  --radius-lg: 4px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
}

/* — base — */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 13px;
  line-height: 22px;
  margin-top: 14px;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  min-height: 44px; padding: var(--space-2) 18px;
  border-radius: var(--radius-md);
  transition: background 180ms ease, color 180ms ease;
}
.btn svg { display: block; flex: none; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
/* On the hero the secondary button sits on video and needs its own ground. */
.btn-hero-secondary { background: color-mix(in srgb, var(--color-bg) 72%, transparent); }
.btn-hero-secondary:hover { background: color-mix(in srgb, var(--color-bg) 90%, transparent); }
.btn-wa { background: var(--color-whatsapp); color: #fff; }
.btn-wa:hover { background: var(--color-whatsapp-dark); color: #fff; }

/* — navigation — */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; flex-wrap: wrap;
  gap: clamp(14px, 3vw, 34px); row-gap: 8px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  translate: 0 -110%; opacity: 0; pointer-events: none;
  transition: translate 420ms cubic-bezier(.2,.7,.2,1), opacity 300ms ease;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--color-accent); }
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
  display: inline-flex; align-items: center; gap: 8px;
}
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); }

/* — halftone photo screen — */
.halftone { position: relative; filter: grayscale(0.35) contrast(1.15); overflow: hidden; }
.halftone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,0,0,0.22) 30%, transparent 32%);
  background-size: 3px 3px; mix-blend-mode: multiply;
}

/* ── The plate constructions ───────────────────────────────────────────
   Display type set as misregistered process plates: a .paper span (the
   white of the sheet, built from offset text-shadow copies) carrying the
   real text, plus three aria-hidden .plate repeats in C / M / Y. There is
   no black plate — the dark core is the C×M×Y multiply overlap, and the
   fringes are the registration drift. --press-nx/-ny is the pointer lean
   published by site.js, zero when the driver stands down.
   .cmyk-num carries its own paper ground (it can sit inside an isolated
   stacking context); .cmyk-head multiplies straight onto the page.
   ─────────────────────────────────────────────────────────────────────── */
.cmyk-num {
  --cmyk-num-ground: var(--color-bg);
  position: relative; width: fit-content; line-height: 0.9;
  font-feature-settings: "pnum" 1;
  background: var(--cmyk-num-ground); padding: 0.12em; margin: -0.12em;
}
.cmyk-num .paper {
  color: var(--color-bg);
  text-shadow: 0.036em 0.025em 0 var(--color-bg), -0.031em -0.023em 0 var(--color-bg);
}
.cmyk-num .plate {
  position: absolute; inset: 0.12em; mix-blend-mode: multiply;
}
.cmyk-num .plate-m {
  color: var(--color-accent-2);
  translate: calc(0.036em + 0.018em * var(--press-nx, 0)) calc(0.025em + 0.0125em * var(--press-ny, 0));
}
.cmyk-num .plate-y {
  color: var(--color-process-yellow);
  translate: calc(-0.031em + 0.018em * var(--press-nx, 0)) calc(-0.023em + 0.0125em * var(--press-ny, 0));
}

.cmyk-head { position: relative; }
.cmyk-head .paper {
  color: var(--color-bg);
  text-shadow: 0.027em 0.0185em 0 var(--color-bg), -0.0245em -0.0175em 0 var(--color-bg);
}
.cmyk-head .plate {
  position: absolute; inset: 0; mix-blend-mode: multiply;
  pointer-events: none; user-select: none;
}
.cmyk-head .plate-m {
  color: var(--color-accent-2);
  translate: calc(0.018em + 0.009em * var(--press-nx, 0)) calc(0.0125em + 0.006em * var(--press-ny, 0));
}
.cmyk-head .plate-y {
  color: var(--color-process-yellow);
  translate: calc(-0.0155em + 0.009em * var(--press-nx, 0)) calc(-0.0115em + 0.006em * var(--press-ny, 0));
}
.cmyk-num .plate-c, .cmyk-head .plate-c { color: var(--color-accent); }

/* ══════════════════════════════════════════════════════════════════════
   Page
   ══════════════════════════════════════════════════════════════════════ */

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-contact { padding-block: clamp(56px, 8vw, 112px) clamp(28px, 4vw, 48px); }
.kicker {
  display: block; font-size: 13px; line-height: 14px;
  letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
  margin: 0 0 26px;
}
.section-head, .about-grid h2 {
  font-size: clamp(28px, 3.6vw, 46px); line-height: 1.14;
  letter-spacing: -0.018em; margin: 0;
}
.section-head { margin-bottom: clamp(28px, 4vw, 56px); max-width: 26ch; }
.prose {
  font-size: 16.5px; line-height: 28px;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
  text-align: justify; hyphens: auto;
  margin: 0 0 28px;
}
.prose:last-child { margin-bottom: 0; }

/* — hero — */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(600px, 100svh, 1000px);
  display: grid; grid-template-rows: 1fr auto;
  padding-block: clamp(48px, 9vh, 96px) clamp(28px, 4vh, 56px);
}
.hero-video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  background: var(--color-neutral-200);
}
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 45%,
      color-mix(in srgb, var(--color-bg) var(--scrim, 62%), transparent) 0%,
      color-mix(in srgb, var(--color-bg) calc(var(--scrim, 62%) * 0.55), transparent) 62%,
      transparent 100%),
    linear-gradient(to bottom,
      color-mix(in srgb, var(--color-bg) 30%, transparent) 0%,
      transparent 30%,
      color-mix(in srgb, var(--color-bg) 55%, transparent) 100%);
}
/* Press registration marks in two opposite corners. */
.reg-mark { position: absolute; width: 22px; height: 22px; z-index: -1; }
.reg-tr { top: clamp(14px, 2vw, 26px); right: clamp(14px, 2vw, 26px); }
.reg-bl { bottom: clamp(14px, 2vw, 26px); left: clamp(14px, 2vw, 26px); }
.reg-mark i { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--color-text); opacity: .55; }
.reg-mark b { position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--color-text); opacity: .55; }
.reg-mark u { position: absolute; inset: 5px; border: 1px solid var(--color-accent); border-radius: 50%; }
.reg-bl u { border-color: var(--color-accent-2); }

.hero-head { place-self: center; width: 100%; max-width: var(--wrap); padding-inline: var(--gutter); }
.hero-head h1 {
  /* Each line below overrides this size; the h1 keeps it so its 20ch
     measure resolves against display type, not body type. */
  font-size: clamp(42px, 7vw, 96px);
  margin: 0 auto; max-width: 20ch; text-align: center;
  line-height: 1.06; letter-spacing: -0.025em;
}
.hero-head .line { display: block; }
/* Each line is set at its own optical size — clamped so the largest still
   fits a 360px phone. */
.line-1 { font-size: clamp(34px, 8.4vw, 80px); }
.line-2 { font-size: clamp(36px, 8.9vw, 85px); }
.line-3 { font-size: clamp(42px, 10.5vw, 100px); }

.hero-foot {
  align-self: end; width: 100%; max-width: var(--wrap);
  margin-inline: auto; padding-inline: var(--gutter);
}
.hero-blurb { max-width: min(420px, 100%); }
.hero-blurb > p:first-child {
  font-size: 14px; line-height: 23px; max-width: 44ch; margin: 0;
  color: color-mix(in srgb, var(--color-text) 82%, transparent);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.scroll-cue {
  display: flex; align-items: center; gap: 10px; margin: 20px 0 0;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.scroll-cue span { width: clamp(34px, 5vw, 72px); height: 1px; background: currentColor; }

/* — about — */
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(26px, 4vw, 72px); align-items: start;
}
.about-grid h2 { max-width: 24ch; }
.about-figure { margin-top: clamp(40px, 5vw, 72px); }
.about-photo {
  position: relative; aspect-ratio: 21 / 9;
  background: var(--color-neutral-200); border-radius: var(--radius-md);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.facts { margin-top: clamp(48px, 6vw, 88px); }
.rule-thick {
  height: 5px; border: 0; margin: 0;
  border-top: 2px solid var(--color-text); border-bottom: 1px solid var(--color-text);
}
.rule-thin { height: 0; border: 0; border-top: 1px solid var(--color-text); margin: 0; }
.facts-meta {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 10px 28px; margin: 0; padding: 14px 0;
  font-size: 13px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.facts-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px clamp(28px, 5vw, 72px); padding: 14px 0 24px;
}
.facts-grid p {
  display: flex; align-items: baseline; gap: 10px; margin: 0;
  font-size: 15.5px; line-height: 28px;
}
.leader {
  flex: 1; min-width: 26px; align-self: flex-end; margin-bottom: .34em;
  border-bottom: 1px dotted color-mix(in srgb, var(--color-text) 45%, transparent);
}
.fig { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 17px; }

/* — services — */
.svc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: clamp(18px, 2.5vw, 40px);
}
.svc {
  position: relative;
  padding: clamp(20px, 2.2vw, 30px) clamp(16px, 1.8vw, 26px);
  margin-inline: calc(-1 * clamp(16px, 1.8vw, 26px));
  border-radius: var(--radius-md);
  transition: background 280ms ease;
}
.svc:hover { background: color-mix(in srgb, var(--color-text) 5%, transparent); }
.svc .cmyk-num {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(44px, 4.4vw, 64px); margin-bottom: 20px;
}
.svc-title {
  position: relative; font-size: clamp(22px, 2vw, 27px); line-height: 1.16;
  letter-spacing: -0.012em; margin: 0;
}
/* Scales in from the left as the pointer enters the card (--in, eased by site.js). */
.svc-rule {
  height: 2px; background: var(--color-accent); margin-top: 16px;
  transform-origin: left; transform: scaleX(var(--in, 0));
}
.svc .prose { margin: 16px 0 0; font-size: 15.5px; line-height: 27px; }
.svc-meta {
  font-size: 12.5px; line-height: 20px; letter-spacing: .06em; text-transform: uppercase;
  margin: 20px 0 0; color: color-mix(in srgb, var(--color-text) 58%, transparent);
}

/* — contact — */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(22px, 3vw, 56px); align-items: start;
}
.contact-details { display: grid; gap: 19px; justify-items: start; }
.detail {
  display: grid; grid-template-columns: 22px 1fr; gap: 4px 14px;
  margin: 0; align-items: start; width: 100%;
}
.ico { width: 20px; height: 20px; color: var(--color-accent); }
.detail-label {
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.detail-val { font-size: 17px; line-height: 26px; }
.detail-val a { color: inherit; text-decoration: none; }
.detail-val a:hover { color: var(--color-accent); }
.detail-sub { font-size: 14.5px; color: color-mix(in srgb, var(--color-text) 65%, transparent); }
.demo-tag {
  display: inline-block; vertical-align: 2px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--color-text) 25%, transparent);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.wa-note {
  margin: -8px 0 0; font-size: 12.5px; line-height: 19px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.map {
  display: block; width: 100%; aspect-ratio: 16 / 11; border: 0;
  border-radius: var(--radius-md); background: var(--color-neutral-200);
  /* No grayscale filter: Chromium does not composite CSS filters onto an
     out-of-process cross-origin iframe, so it renders in colour anyway. */
}
.map-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin: 16px 0 0; font-size: 14.5px; line-height: 24px;
}
.map-foot > span { color: color-mix(in srgb, var(--color-text) 70%, transparent); }

/* — footer — */
footer { padding-block: clamp(22px, 3vw, 40px) clamp(88px, 10vw, 120px); }
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px;
  font-size: 13px; line-height: 24px;
  color: color-mix(in srgb, var(--color-text) 68%, transparent);
}
.foot p { margin: 0; }
.foot-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 15px; color: var(--color-text);
}
.foot-demo { color: var(--color-accent-2-700); }

/* — floating actions — */
.float {
  position: fixed; right: clamp(14px, 2.5vw, 30px); bottom: clamp(14px, 2.5vw, 30px);
  z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.wa {
  display: block; width: clamp(54px, 7vw, 64px); aspect-ratio: 1;
  border-radius: 28%; overflow: hidden; box-shadow: var(--shadow-lg);
  transition: translate 200ms ease, box-shadow 200ms ease;
}
.wa:hover {
  translate: 0 -3px;
  box-shadow: var(--shadow-lg), 0 0 0 3px color-mix(in srgb, var(--color-text) 12%, transparent);
}
.wa img { width: 100%; height: 100%; object-fit: cover; }
.totop {
  display: grid; place-items: center; width: clamp(44px, 5.4vw, 52px); aspect-ratio: 1;
  border-radius: 28%; color: var(--color-bg); background: var(--color-text);
  box-shadow: var(--shadow-lg); text-decoration: none;
  translate: 0 8px; opacity: 0; pointer-events: none;
  transition: translate 260ms cubic-bezier(.2,.7,.2,1), opacity 220ms ease, background 200ms ease;
}
.totop:hover { background: var(--color-accent-700); color: var(--color-bg); }
.totop svg { width: clamp(20px, 2.4vw, 24px); height: clamp(20px, 2.4vw, 24px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
