/*
 * Webbuy – base.css
 * Design tokens (light + dark), self-hosted fonts, reset, typography, layout grid, buttons, form controls,
 * status tags, screenshot placeholders, reveal-on-scroll and utilities. Shared by the public site and the admin PWA.
 * Fonts: Manrope & Inter (SIL OFL 1.1, see assets/fonts/OFL-*.txt), latin + latin-ext subsets (Inter: extra Polish-only subset).
 */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-pl-wght-normal.woff2") format("woff2");
  unicode-range: U+0104-0107, U+0118-0119, U+0141-0144, U+015A-015B, U+0179-017C;
}
/*
 * Inter body text: the Polish letters ąćęłńśźż ĄĆĘŁŃŚŹŻ come from a 5 KB subset of latin-ext (same variable wght
 * axis, kern/mark/tnum kept; built with fonttools pyftsubset). The full latin-ext file (85 KB) stays for every other
 * latin-ext character – ranges are disjoint, so a browser downloads it only when a page really contains e.g. „ř” or
 * „ő” (a name typed into the admin panel). Keep both ranges in sync when re-subsetting.
 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-0103, U+0108-0117, U+011A-0140, U+0145-0159, U+015C-0178, U+017D-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/*
 * Metric-matched local fallbacks (SPEC §17b, CLS): until the web font arrives the text is set in a local Arial /
 * Helvetica scaled to the web font's widths (size-adjust, measured against Liberation Sans = Arial metrics on
 * PL/EN/DE/ES copy) with the web font's vertical metrics (ascent/descent = hhea values ÷ size-adjust;
 * Inter 0.96875 / 0.2421875 em, Manrope 1.066 / 0.3 em), so lines keep their length and height on swap.
 * Regular and bold get separate faces – a synthesised bold Arial would be narrower than Inter/Manrope 600–800.
 */
@font-face {
  font-family: "Inter Fallback";
  font-weight: 100 549;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica"), local("Roboto");
  size-adjust: 106.95%;
  ascent-override: 90.58%;
  descent-override: 22.64%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  font-weight: 550 900;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold"), local("Roboto Bold");
  size-adjust: 101.6%;
  ascent-override: 95.35%;
  descent-override: 23.84%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 100 599;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica"), local("Roboto");
  size-adjust: 104.5%;
  ascent-override: 102%;
  descent-override: 28.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 600 900;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold"), local("Roboto Bold");
  size-adjust: 102.23%;
  ascent-override: 104.27%;
  descent-override: 29.35%;
  line-gap-override: 0%;
}

/* ----------------------------------------------------------------- tokens */

:root {
  color-scheme: light;

  /* brand scales */
  --navy-950: #070F1E;
  --navy-900: #0E1A30;
  --navy-800: #15254A;
  --navy-700: #1F3566;
  --navy-600: #2B4682;
  --honey-300: #F7CF7A;
  --honey-400: #F2B544;
  --honey-500: #E3A32E;
  --honey-600: #B97F12;
  --honey-ink: #7A5200;

  /* surfaces & text – light */
  --bg: #FAF7F2;
  --bg-2: #F2EDE4;
  --surface: #FFFFFF;
  --surface-2: #F6F2EB;
  --line: #E3DCD0;
  --line-strong: #8C8576;  /* form control borders – ≥ 3:1 on every background */
  --text: #0E1A30;
  --text-2: #434C66;       /* ≥ 7:1 on all light backgrounds */
  --text-3: #5C6479;       /* placeholders, meta – ≥ 4.5:1 */
  --accent: var(--honey-400);
  --accent-hover: var(--honey-500);
  --on-accent: var(--navy-900);
  --accent-ink: var(--honey-ink);
  --link: var(--navy-700);
  --focus: #A8740F;        /* honey, ≥ 3:1 on every light background */
  --ok: #1F7A4D;
  --warn: #8F5A00;
  --danger: #B42318;
  --info: var(--navy-600);
  --band-bg: var(--navy-900);

  /* status tags (text colours tuned for AA on their 12 % tint) */
  --st-new: var(--honey-ink);
  --st-talking: var(--navy-600);
  --st-offer: #7F5000;
  --st-progress: #186640;
  --st-done: var(--text-2);
  --st-danger: #A21F15;

  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow-1: 0 1px 2px rgb(14 26 48 / .06), 0 8px 24px -12px rgb(14 26 48 / .18);
  --shadow-2: 0 2px 4px rgb(14 26 48 / .06), 0 24px 48px -24px rgb(14 26 48 / .28);

  --font-head: "Manrope", "Manrope Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* type scale (fluid 360 → 1440 px) */
  --fs-display: clamp(2.625rem, 1.55rem + 4.8vw, 5.75rem);
  --fs-h1: clamp(2.25rem, 1.55rem + 3.1vw, 4.25rem);
  --fs-h2: clamp(1.875rem, 1.38rem + 2.2vw, 3.25rem);
  --fs-h3: clamp(1.25rem, 1.12rem + 0.55vw, 1.625rem);
  --fs-h4: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --fs-lead: clamp(1.125rem, 1.04rem + 0.38vw, 1.375rem);
  --fs-body: clamp(1rem, 0.975rem + 0.12vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-xs: 0.8125rem;
  --fs-eyebrow: clamp(0.75rem, 0.73rem + 0.08vw, 0.8125rem);

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --grid-gap: clamp(16px, 2.2vw, 32px);
  --section-pad: clamp(72px, 10vw, 160px);
  --header-h: 72px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur: 560ms;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-opacity: .045;
  --grain-blend: multiply;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23434C66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* dark tokens – explicit choice; .on-dark / .band-dark flip a section to the dark set in any theme */
[data-theme="dark"],
.on-dark,
.band-dark {
  color-scheme: dark;
  --bg: #0A1322;
  --bg-2: #0F1A2E;
  --surface: #121F36;
  --surface-2: #18263F;
  --line: #24344F;
  --line-strong: #66789A;
  --text: #F3EFE7;
  --text-2: #A7B1C6;
  --text-3: #8D98AE;
  --accent-hover: var(--honey-300);
  --accent-ink: var(--honey-300);
  --link: #A9C1F5;
  --focus: var(--honey-400);
  --ok: #5BC68F;
  --warn: #F0B44C;
  --danger: #FF8F80;
  --info: #A9C1F5;
  --st-new: var(--honey-300);
  --st-talking: #A9C1F5;
  --st-offer: #F0B44C;
  --st-progress: #5BC68F;
  --st-done: #A7B1C6;
  --st-danger: #FF8F80;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
  --shadow-2: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -24px rgb(0 0 0 / .6);
  --grain-blend: screen;
  --grain-opacity: .035;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A7B1C6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
  --band-bg: var(--navy-950);
}

/* dark tokens – system preference (unless the visitor chose light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0A1322;
    --bg-2: #0F1A2E;
    --surface: #121F36;
    --surface-2: #18263F;
    --line: #24344F;
    --line-strong: #66789A;
    --text: #F3EFE7;
    --text-2: #A7B1C6;
    --text-3: #8D98AE;
    --accent-hover: var(--honey-300);
    --accent-ink: var(--honey-300);
    --link: #A9C1F5;
    --focus: var(--honey-400);
    --ok: #5BC68F;
    --warn: #F0B44C;
    --danger: #FF8F80;
    --info: #A9C1F5;
    --band-bg: var(--navy-950);
    --st-new: var(--honey-300);
    --st-talking: #A9C1F5;
    --st-offer: #F0B44C;
    --st-progress: #5BC68F;
    --st-done: #A7B1C6;
    --st-danger: #FF8F80;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
    --shadow-2: 0 2px 4px rgb(0 0 0 / .3), 0 24px 48px -24px rgb(0 0 0 / .6);
    --grain-blend: screen;
    --grain-opacity: .035;
    --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A7B1C6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }
}

/* ------------------------------------------------------------------ reset */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first allow-end last;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol, pre {
  margin: 0;
}

ul[role="list"],
ol[role="list"],
.list-reset {
  list-style: none;
  padding: 0;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img, video {
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

button:disabled {
  cursor: not-allowed;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

hr {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: .92em;
}

[hidden] {
  display: none !important;
}

:target {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

::selection {
  background: var(--honey-300);
  color: var(--navy-900);
}

/* ------------------------------------------------------------- typography */

h1, h2, h3, h4,
.display, .h1, .h2, .h3, .h4 {
  font-family: var(--font-head);
  color: var(--text);
  text-wrap: balance;
  font-feature-settings: "kern", "liga";
}

h1, .h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.032em;
}

.display {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h2, .h2 {
  font-size: var(--fs-h2);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.028em;
}

h3, .h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.018em;
}

h4, .h4 {
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p, li, dd, figcaption, blockquote {
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-2);
  letter-spacing: -0.006em;
  max-width: 35.3em; /* = 56ch of Inter; em keeps the measure identical with the fallback font (no CLS) */
}

.small, small {
  font-size: var(--fs-small);
  line-height: 1.5;
}

.xs {
  font-size: var(--fs-xs);
  line-height: 1.45;
}

strong, b {
  font-weight: 650;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75em;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.eyebrow--accent {
  color: var(--accent-ink);
}

/* "01 — Problem": number + rule + label */
.section-num {
  display: inline-flex;
  align-items: center;
  gap: .9em;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.section-num__n {
  color: var(--text);
}

.section-num__n::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-left: .9em;
  vertical-align: .32em;
  background: currentColor;
  opacity: .5;
}

.marker {
  display: inline-block;
  width: .5em;
  height: .5em;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

.hl {
  color: var(--accent-ink);
}

.num, .price, .tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.muted {
  color: var(--text-2);
}

.subtle {
  color: var(--text-3);
}

.nowrap {
  white-space: nowrap;
}

.balance {
  text-wrap: balance;
}

.measure {
  max-width: 41.6em; /* = 66ch of Inter; em keeps the measure identical with the fallback font (no CLS) */
}

/* long-form text produced by md() */
.prose {
  max-width: 42.9em; /* = 68ch of Inter; em keeps the measure identical with the fallback font (no CLS) */
  color: var(--text);
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  margin-top: 2.2em;
  letter-spacing: -0.022em;
}

.prose h3 {
  font-size: var(--fs-h3);
  margin-top: 1.8em;
}

.prose h4 {
  margin-top: 1.5em;
}

.prose h2 + *, .prose h3 + *, .prose h4 + * {
  margin-top: .6em;
}

.prose ul, .prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: .4em;
}

.prose li::marker {
  color: var(--text-2);
}

.prose ul > li::marker {
  content: "–  ";
}

.prose > :first-child {
  margin-top: 0;
}

/* ------------------------------------------------------------------ links */

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
  transition: color .2s ease, text-decoration-color .2s ease, text-decoration-thickness .2s ease;
}

a:hover {
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

/* quiet link with an underline that draws in from the left (navigation, footers) */
.link-quiet {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size .35s var(--ease-out), color .2s ease;
  padding-bottom: 1px;
}

.link-quiet:hover,
.link-quiet[aria-current="page"] {
  background-size: 100% 1px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.link-arrow .icon {
  transition: transform .3s var(--ease-out);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

.link-arrow:hover span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}

/* ------------------------------------------------------------------ focus */

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ----------------------------------------------------------------- layout */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(820px + 2 * var(--gutter));
}

.container--wide {
  max-width: calc(1440px + 2 * var(--gutter));
}

.section {
  padding-block: var(--section-pad);
}

.section--tight {
  padding-block: calc(var(--section-pad) * .6);
}

.section + .section--joined {
  padding-top: 0;
}

/* full-bleed dark navy band (hero, rhythm breakers) – the dark token set applies inside in both themes */
.band-dark {
  position: relative;
  background-color: var(--band-bg);
  color: var(--text);
}

.band-sand {
  background-color: var(--bg-2);
}

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

.rule-b {
  border-bottom: 1px solid var(--line);
}

.grain {
  position: relative;
  isolation: isolate;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 180px 180px;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

.stack > * + * {
  margin-top: var(--stack, 1rem);
}

.stack-s {
  --stack: .5rem;
}

.stack-l {
  --stack: 1.75rem;
}

.stack-xl {
  --stack: clamp(2.5rem, 5vw, 4rem);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, .75rem);
}

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

/* 12-column grid; children span all 12 columns unless a span/start utility says otherwise.
   Utilities set only grid-column-end (span) or grid-column-start, so they combine freely. */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  row-gap: var(--grid-row-gap, var(--grid-gap));
}

.grid > * {
  grid-column-end: span 12;  /* start stays auto, so span-N items flow side by side */
  min-width: 0;
}

/* span-N / start-N on all sizes, md-* from 720 px, lg-* from 1024 px */
.span-1 { grid-column-end: span 1; }
.span-2 { grid-column-end: span 2; }
.span-3 { grid-column-end: span 3; }
.span-4 { grid-column-end: span 4; }
.span-5 { grid-column-end: span 5; }
.span-6 { grid-column-end: span 6; }
.span-7 { grid-column-end: span 7; }
.span-8 { grid-column-end: span 8; }
.span-9 { grid-column-end: span 9; }
.span-10 { grid-column-end: span 10; }
.span-11 { grid-column-end: span 11; }
.span-12 { grid-column-end: span 12; }
.start-1 { grid-column-start: 1; }
.start-2 { grid-column-start: 2; }
.start-3 { grid-column-start: 3; }
.start-4 { grid-column-start: 4; }
.start-5 { grid-column-start: 5; }
.start-6 { grid-column-start: 6; }
.start-7 { grid-column-start: 7; }
.start-8 { grid-column-start: 8; }
.start-9 { grid-column-start: 9; }
.start-10 { grid-column-start: 10; }
.start-11 { grid-column-start: 11; }
.start-12 { grid-column-start: 12; }
@media (min-width: 720px) {
  .md-span-1 { grid-column-end: span 1; }
  .md-span-2 { grid-column-end: span 2; }
  .md-span-3 { grid-column-end: span 3; }
  .md-span-4 { grid-column-end: span 4; }
  .md-span-5 { grid-column-end: span 5; }
  .md-span-6 { grid-column-end: span 6; }
  .md-span-7 { grid-column-end: span 7; }
  .md-span-8 { grid-column-end: span 8; }
  .md-span-9 { grid-column-end: span 9; }
  .md-span-10 { grid-column-end: span 10; }
  .md-span-11 { grid-column-end: span 11; }
  .md-span-12 { grid-column-end: span 12; }
  .md-start-1 { grid-column-start: 1; }
  .md-start-2 { grid-column-start: 2; }
  .md-start-3 { grid-column-start: 3; }
  .md-start-4 { grid-column-start: 4; }
  .md-start-5 { grid-column-start: 5; }
  .md-start-6 { grid-column-start: 6; }
  .md-start-7 { grid-column-start: 7; }
  .md-start-8 { grid-column-start: 8; }
  .md-start-9 { grid-column-start: 9; }
  .md-start-10 { grid-column-start: 10; }
  .md-start-11 { grid-column-start: 11; }
  .md-start-12 { grid-column-start: 12; }
}
@media (min-width: 1024px) {
  .lg-span-1 { grid-column-end: span 1; }
  .lg-span-2 { grid-column-end: span 2; }
  .lg-span-3 { grid-column-end: span 3; }
  .lg-span-4 { grid-column-end: span 4; }
  .lg-span-5 { grid-column-end: span 5; }
  .lg-span-6 { grid-column-end: span 6; }
  .lg-span-7 { grid-column-end: span 7; }
  .lg-span-8 { grid-column-end: span 8; }
  .lg-span-9 { grid-column-end: span 9; }
  .lg-span-10 { grid-column-end: span 10; }
  .lg-span-11 { grid-column-end: span 11; }
  .lg-span-12 { grid-column-end: span 12; }
  .lg-start-1 { grid-column-start: 1; }
  .lg-start-2 { grid-column-start: 2; }
  .lg-start-3 { grid-column-start: 3; }
  .lg-start-4 { grid-column-start: 4; }
  .lg-start-5 { grid-column-start: 5; }
  .lg-start-6 { grid-column-start: 6; }
  .lg-start-7 { grid-column-start: 7; }
  .lg-start-8 { grid-column-start: 8; }
  .lg-start-9 { grid-column-start: 9; }
  .lg-start-10 { grid-column-start: 10; }
  .lg-start-11 { grid-column-start: 11; }
  .lg-start-12 { grid-column-start: 12; }
}

/* sticky section title (left column) on desktop, content scrolls on the right */
@media (min-width: 1024px) {
  .sticky {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
  }
}

/* ---------------------------------------------------------------- buttons */

.btn {
  --btn-h: 48px;
  --btn-px: 1.25rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: var(--btn-h);
  padding: .55rem var(--btn-px);
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  width: 1.125em;
  height: 1.125em;
  flex: none;
  transition: transform .3s var(--ease-out);
}

.btn:hover .icon--end {
  transform: translateX(3px);
}

.btn--primary {
  background-color: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--secondary:hover {
  color: var(--text);
  border-color: var(--text);
  background-color: color-mix(in srgb, var(--text) 5%, transparent);
}

.btn--ink {
  background-color: var(--text);
  color: var(--bg);
}

.btn--ink:hover {
  color: var(--bg);
  background-color: color-mix(in srgb, var(--text) 86%, var(--bg));
}

.btn--ghost {
  --btn-px: .75rem;
  background-color: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  color: var(--text);
  background-color: color-mix(in srgb, var(--text) 7%, transparent);
}

.btn--danger {
  background-color: transparent;
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
}

.btn--danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background-color: color-mix(in srgb, var(--danger) 8%, transparent);
}

.btn--sm {
  --btn-h: 40px;
  --btn-px: .9rem;
  font-size: .9375rem;
}

.btn--lg {
  --btn-h: 56px;
  --btn-px: 1.6rem;
  font-size: 1.0625rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--icon {
  --btn-px: 0;
  width: var(--btn-h);
}

/* disabled: neutral surface instead of a faded accent (reads as "off" in both themes, stays legible) */
.btn:disabled:not([aria-busy="true"]),
.btn[aria-disabled="true"]:not([aria-busy="true"]) {
  background-color: var(--surface-2);
  border-color: var(--line);
  color: var(--text-3);
  box-shadow: none;
  pointer-events: none;
}

.btn:disabled[aria-busy="true"] {
  pointer-events: none;
}

/* loading state: <button aria-busy="true"> */
.btn[aria-busy="true"] {
  color: transparent !important;
  pointer-events: none;
}

.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--on-accent);
  border-right-color: transparent;
  border-radius: 50%;
  animation: zw-spin .7s linear infinite;
}

.btn--secondary[aria-busy="true"]::after,
.btn--ghost[aria-busy="true"]::after {
  border-color: var(--text);
  border-right-color: transparent;
}

@keyframes zw-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------------ icons */

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: -0.22em;
  stroke-width: 1.5;
}

.icon--s {
  width: 1em;
  height: 1em;
}

.icon--l {
  width: 1.5em;
  height: 1.5em;
}

/* ------------------------------------------------------------------ forms */

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* a wide native control (e.g. a file input) never widens the field */
  gap: .45rem;
  align-content: start;
}

.label {
  display: block;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.label .req {
  color: var(--accent-ink);
  margin-left: .15em;
}

.label .opt {
  font-weight: 400;
  color: var(--text-2);
  margin-left: .35em;
}

.help {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text-2);
}

.input,
.select,
.textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  font-family: var(--font-body);
  font-size: 1rem;           /* ≥ 16px: no zoom on iOS */
  line-height: 1.4;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  box-shadow: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-3);
  opacity: 1;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--text-2);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--text);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--text);
}

.textarea {
  min-height: 132px;
  line-height: 1.55;
  resize: vertical;
}

.select {
  padding-right: 2.75rem;
  cursor: pointer;
  background-image: var(--chevron);
  background-position: right .85rem center;
  background-size: 18px 18px;
  background-repeat: no-repeat;
}

.input[type="date"] {
  min-height: 48px;
}

.input:disabled,
.select:disabled,
.textarea:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"],
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.45;
  color: var(--danger);
}

.field-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .08rem;
  border-radius: 50%;
  background: var(--danger);
  color: var(--bg);
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
}

.field-error:empty {
  display: none;
}

/* checkbox / radio – native inputs, custom look, keyboard + screen reader behaviour untouched */
.check,
.radio {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  background-color: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.radio {
  border-radius: 50%;
}

.check::before {
  content: "";
  width: 12px;
  height: 12px;
  background-color: var(--bg);
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 37% 70%);
  transform: scale(0);
  transition: transform .15s var(--ease-out);
}

.radio::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--bg);
  transform: scale(0);
  transition: transform .15s var(--ease-out);
}

.check:hover,
.radio:hover {
  border-color: var(--text);
}

.check:checked,
.radio:checked {
  background-color: var(--text);
  border-color: var(--text);
}

.check:checked::before,
.radio:checked::before {
  transform: scale(1);
}

.check:indeterminate::before {
  clip-path: inset(40% 10%);
  transform: scale(1);
}

.check:indeterminate {
  background-color: var(--text);
  border-color: var(--text);
}

.check:focus-visible,
.radio:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.check:disabled,
.radio:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.check[aria-invalid="true"],
.radio[aria-invalid="true"] {
  border-color: var(--danger);
}

/* label wrapper: <label class="choice"><input class="check"> <span>Text <small class="help">…</small></span></label> */
.choice {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  cursor: pointer;
  line-height: 1.45;
}

.choice > .check,
.choice > .radio {
  margin-top: .05rem;
}

.choice .help {
  display: block;
  margin-top: .15rem;
}

@media (forced-colors: active) {
  .check,
  .radio {
    appearance: auto;
    -webkit-appearance: auto;
  }
  .check::before,
  .radio::before {
    display: none;
  }
}

/* honeypot field: off-screen, not focusable by keyboard (use with tabindex="-1" autocomplete="off") */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ------------------------------------------------------- tags & statuses */

.tag {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  min-height: 24px;
  padding: .2rem .55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--surface);
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}

.status {
  --c: var(--st-done);
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 24px;
  padding: .2rem .55rem;
  border-radius: 6px;
  background-color: color-mix(in srgb, var(--c) 12%, transparent);
  color: var(--c);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  flex: none;
}

.status--new { --c: var(--st-new); }
.status--talking { --c: var(--st-talking); }
.status--offer { --c: var(--st-offer); }
.status--in_progress,
.status--progress { --c: var(--st-progress); }
.status--done { --c: var(--st-done); }
.status--danger { --c: var(--st-danger); }

/* --------------------------------------------- generic product-UI surface */

.ui-surface {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

/* ----------------------------------------- case screenshot placeholder */
/* Rendered by case_image_html() until a real screenshot is uploaded in the admin panel. */

.shot-placeholder {
  --ph-line: color-mix(in srgb, var(--text) 6%, transparent);
  --ph-mark: color-mix(in srgb, var(--text) 38%, transparent);
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  background-color: var(--surface-2);
  background-image:
    linear-gradient(var(--ph-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  color: var(--text-2);
  border-radius: inherit;
}

.shot-placeholder__frame {
  --m: 16px;
  position: absolute;
  inset: clamp(10px, 5cqi, 28px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .55rem;
  padding: clamp(12px, 5cqi, 28px);
  background:
    linear-gradient(var(--ph-mark), var(--ph-mark)) top left / var(--m) 1px no-repeat,
    linear-gradient(var(--ph-mark), var(--ph-mark)) top left / 1px var(--m) no-repeat,
    linear-gradient(var(--ph-mark), var(--ph-mark)) top right / var(--m) 1px no-repeat,
    linear-gradient(var(--ph-mark), var(--ph-mark)) top right / 1px var(--m) no-repeat,
    linear-gradient(var(--ph-mark), var(--ph-mark)) bottom left / var(--m) 1px no-repeat,
    linear-gradient(var(--ph-mark), var(--ph-mark)) bottom left / 1px var(--m) no-repeat,
    linear-gradient(var(--ph-mark), var(--ph-mark)) bottom right / var(--m) 1px no-repeat,
    linear-gradient(var(--ph-mark), var(--ph-mark)) bottom right / 1px var(--m) no-repeat;
}

.shot-placeholder__label {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-size: clamp(.6875rem, 2.6cqi, .8125rem);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
}

.shot-placeholder__label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

.shot-placeholder__hint {
  max-width: 21.5em; /* = 34ch of Inter; em keeps the measure identical with the fallback font (no CLS) */
  font-family: var(--font-head);
  font-size: clamp(.875rem, 4.4cqi, 1.25rem);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: balance;
}

.shot-placeholder__size {
  font-size: clamp(.6875rem, 2.4cqi, .8125rem);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

.shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

/* ------------------------------------------------------- reveal on scroll */
/* Needs class "js" on <html> (set by the inline theme script); site.js adds .is-visible. */

html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, var(--reveal-y, 18px), 0);
  transition:
    opacity var(--dur) var(--ease-out),
    transform calc(var(--dur) + 120ms) var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 80ms);
}

html.js [data-reveal="fade"] {
  transform: none;
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------- utilities */

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: .75rem 1.1rem;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-2);
  transform: translateY(calc(-100% - 24px));
  transition: transform .2s var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.w-full { width: 100%; }
.relative { position: relative; }

@media (max-width: 719.98px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 720px) {
  .only-mobile { display: none !important; }
}

/* ------------------------------------------------------------------ print */

@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --text-2: #333;
  }
  body {
    background: #fff;
    color: #000;
  }
  .skip-link,
  .btn,
  [data-print="hide"] {
    display: none !important;
  }
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: .85em;
    color: #333;
  }
}
