/* ============================================================
   NovaFit — Site design system (v4bis, applied site-wide)
   Light editorial. Anton (poster) + Space Grotesk (body) + Space Mono (data).
   Used by all subpages and the blog. Path-agnostic (no url() to assets).
   ============================================================ */

:root {
  --paper: #F1F1EF;
  --panel: #FFFFFF;
  --panel-2: #E7E7E3;
  --ink: #121316;
  --ink-soft: #585A61;
  --ink-dim: #8A8C92;
  --hair: rgba(0, 0, 0, 0.12);
  --hair-2: rgba(0, 0, 0, 0.24);

  --red: #E10E1E;
  --red-deep: #B00A16;
  --red-soft: rgba(225, 14, 30, 0.08);
  --red-line: rgba(225, 14, 30, 0.4);

  --dark: #0C0C0E;
  --dark-soft: #16161B;
  --on-dark: #F2F2F4;
  --on-dark-soft: #9A9AA2;

  --display: "Anton", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 5vw, 4rem);
  --maxw: 1320px;
  --readw: 68ch;
  --section-y: clamp(4rem, 8vw, 7rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
html:focus-within { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 200; background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--r); font-weight: 700; transition: top 0.2s var(--ease); }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--panel); border-block: 1px solid var(--hair); }

/* ---------- Type ---------- */
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.28; letter-spacing: -0.005em; color: var(--ink); }
.display em { font-style: normal; color: #fff; background: var(--red); padding: 0 0.14em; margin: 0 0.02em; white-space: nowrap; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
h1.display { font-size: clamp(2.7rem, 7vw, 5.6rem); }
h2.display { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h3.display { font-size: clamp(1.5rem, 3vw, 2.2rem); }

.label { font-family: var(--mono); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); display: inline-flex; align-items: center; gap: 0.6rem; }
.label::before { content: ""; width: 9px; height: 9px; background: var(--red); flex-shrink: 0; }
.lede { font-family: var(--body); font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-soft); line-height: 1.6; max-width: 56ch; }
.mono { font-family: var(--mono); }
.tnum { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn { --y: 0; display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; padding: 0.95rem 1.8rem; font-family: var(--body); font-weight: 700; font-size: 0.95rem; border-radius: var(--r); white-space: nowrap; transition: transform 0.22s var(--ease), background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease); transform: translateY(var(--y)); }
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { --y: -2px; background: var(--red-deep); }
.btn-primary:active { --y: 1px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { --y: -2px; background: #000; }
.btn-dark:active { --y: 1px; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--hair-2); }
.btn-outline:hover { --y: -2px; border-color: var(--ink); }
.btn-outline:active { --y: 1px; }
.btn-outline.on-dark { color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-outline.on-dark:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-link { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--mono); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); border-bottom: 2px solid var(--red); padding-bottom: 3px; transition: gap 0.2s var(--ease); }
.btn-link:hover { gap: 0.85rem; }
.btn-link svg { width: 0.9em; color: var(--red); }

/* ============================================================ NAV ============================================================ */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; height: 76px; display: flex; align-items: center; border-bottom: 1px solid transparent; transition: background 0.35s var(--ease), border-color 0.35s var(--ease); }
.nav.is-scrolled { background: rgba(241,241,239,0.82); backdrop-filter: blur(14px) saturate(130%); border-bottom-color: var(--hair); }
.nav-inner { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
/* Logo adapts to its background: full-color on dark, ink on light.
   On subpages the nav sits over the light page-hero and the footer is
   light, so the logo is always on a light surface here -> ink. */
.nav-logo img { height: 24px; width: auto; filter: brightness(0); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); list-style: none; }
.nav-links a { font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.lang { display: inline-flex; gap: 2px; font-family: var(--mono); font-size: 0.74rem; border: 1px solid var(--hair-2); border-radius: var(--r); padding: 3px; }
.lang button { padding: 3px 8px; border-radius: 2px; color: var(--ink-dim); transition: color 0.2s, background 0.2s; }
.lang button.active { color: #fff; background: var(--red); }
.lang button:hover:not(.active) { color: var(--ink); }
.nav-cta { padding: 0.6rem 1.2rem; font-size: 0.86rem; }
.nav-burger { display: none; width: 44px; height: 44px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--hair-2); border-radius: var(--r); }
.nav-burger span { width: 18px; height: 2px; background: var(--ink); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-drawer { position: fixed; inset: 76px 0 0 0; z-index: 99; background: var(--paper); display: flex; flex-direction: column; padding: 2rem var(--pad) 3rem; gap: 0.2rem; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s; }
.nav-drawer.open { opacity: 1; transform: none; visibility: visible; }
.nav-drawer a { font-family: var(--display); text-transform: uppercase; font-size: 2rem; line-height: 1.2; padding: 0.6rem 0; border-bottom: 1px solid var(--hair); }
.nav-drawer .btn { margin-top: 1.6rem; }
.drawer-lang { display: none; align-self: flex-start; margin-top: 1.6rem; }
.drawer-lang button { padding: 6px 14px; }

/* Floating CTA (subpages) */
.cta-float { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90; opacity: 0; transform: translateY(12px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); pointer-events: none; }
.cta-float.show { opacity: 1; transform: none; pointer-events: auto; }
.cta-float .btn { box-shadow: 0 16px 40px -12px rgba(225,14,30,0.5); }

/* ============================================================ PAGE HERO (service pages) ============================================================ */
.page-hero { padding-top: 76px; }
.page-hero-inner { padding-top: clamp(2.5rem, 7vw, 5rem); }
.page-hero .label { margin-bottom: 1.5rem; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: 1.7rem; max-width: 52ch; }
.page-media { margin-top: clamp(2rem, 5vw, 3.5rem); border-radius: var(--r); overflow: hidden; border: 1px solid var(--hair-2); aspect-ratio: 16 / 7; }
.page-media img { width: 100%; height: 100%; object-fit: cover; }
.page-media picture { display: block; width: 100%; height: 100%; }

/* ============================================================ SPLIT (text + image) ============================================================ */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split-media { border-radius: var(--r); overflow: hidden; border: 1px solid var(--hair-2); aspect-ratio: 4 / 5; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media picture { display: block; width: 100%; height: 100%; }
.split h2 { margin-bottom: 1.3rem; }
.split .lede { margin-bottom: 1.3rem; }

/* Editorial list */
.ed-list { list-style: none; display: grid; gap: 0; margin-top: 1.6rem; }
.ed-list li { position: relative; padding: 0.9rem 0 0.9rem 1.8rem; border-top: 1px solid var(--hair); color: var(--ink); font-size: 1rem; }
.ed-list li:last-child { border-bottom: 1px solid var(--hair); }
.ed-list li::before { content: ""; position: absolute; left: 0; top: 1.35rem; width: 9px; height: 9px; background: var(--red); }

/* ============================================================ NUMBERED CARDS ============================================================ */
.num-head { max-width: 60ch; margin-bottom: clamp(2.2rem, 4.5vw, 3.4rem); }
.num-head .label { margin-bottom: 1rem; }
.num-head .lede { margin-top: 1.2rem; }
.num-grid { display: grid; gap: 1px; background: var(--hair-2); border: 1px solid var(--hair-2); border-radius: var(--r); overflow: hidden; }
.num-grid--2 { grid-template-columns: repeat(2, 1fr); }
.num-grid--3 { grid-template-columns: repeat(3, 1fr); }
.num-grid--4 { grid-template-columns: repeat(4, 1fr); }
.num-card { background: var(--paper); padding: clamp(1.6rem, 3vw, 2.4rem); display: flex; flex-direction: column; }
.num-card .n { font-family: var(--mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); }
.num-card h3 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.05; letter-spacing: -0.01em; margin: 0.9rem 0 0.7rem; color: var(--ink); }
.num-card p { color: var(--ink-soft); font-size: 0.96rem; line-height: 1.55; }
.num-card .tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); margin-top: 0.6rem; }

/* ============================================================ MANIFESTO (statement block) ============================================================ */
.manifesto { background: var(--dark); color: var(--on-dark); text-align: center; padding-block: clamp(4rem, 9vw, 8rem); }
.manifesto blockquote { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.9rem, 5vw, 3.6rem); line-height: 1.32; color: #fff; max-width: 24ch; margin-inline: auto; }
.manifesto blockquote em { font-style: normal; color: #fff; background: var(--red); padding: 0.02em 0.16em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.manifesto .sig { display: block; margin-top: 1.8rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-soft); }

/* ============================================================ CTA BAND ============================================================ */
.cta-band { background: var(--ink); color: var(--on-dark); text-align: center; }
.cta-band .label { color: var(--red); justify-content: center; margin-bottom: 1.1rem; }
.cta-band h2 { color: #fff; }
.cta-band h2 em { font-style: normal; color: #fff; background: var(--red); padding: 0 0.14em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cta-band .lede { color: var(--on-dark-soft); margin: 1.2rem auto 0; text-align: center; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 2rem; }
.cta-band .addr { margin-top: 1.6rem; font-family: var(--mono); font-size: 0.8rem; color: var(--on-dark-soft); }

/* Light centered teaser */
.teaser { text-align: center; }
.teaser .label { justify-content: center; margin-bottom: 1rem; }
.teaser .lede { margin: 1.2rem auto 0; text-align: center; }
.teaser-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.8rem; }

/* ============================================================ ARTICLE (blog post) ============================================================ */
.read-progress { position: fixed; top: 0; left: 0; z-index: 101; height: 3px; width: 100%; background: transparent; }
.read-progress::before { content: ""; display: block; height: 100%; width: var(--progress, 0%); background: var(--red); transition: width 0.1s linear; }

.article-hero { padding-top: 76px; }
.article-hero-inner { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.article-meta { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-dim); display: block; margin-bottom: 1.2rem; }
.article-hero h1 { max-width: 22ch; font-size: clamp(1.9rem, 3.8vw, 3.3rem); line-height: 1.14; }
.article-hero h1 em { white-space: normal; }
.article-media { margin-top: clamp(2rem, 5vw, 3.5rem); border-radius: var(--r); overflow: hidden; border: 1px solid var(--hair-2); aspect-ratio: 16 / 8; }
.article-media img { width: 100%; height: 100%; object-fit: cover; }
.article-media picture { display: block; width: 100%; height: 100%; }

.prose { max-width: var(--readw); margin-inline: auto; padding-block: clamp(3rem, 6vw, 5rem); }
.prose > * + * { margin-top: 1.3rem; }
.prose p { font-size: 1.08rem; line-height: 1.75; color: var(--ink); }
.prose h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; letter-spacing: -0.01em; margin-top: 2.8rem; margin-bottom: 0.2rem; color: var(--ink); }
.prose h3 { font-family: var(--body); font-weight: 700; font-size: 1.3rem; margin-top: 2rem; color: var(--ink); }
.prose a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose a:hover { text-decoration-thickness: 2.5px; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose em { font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: 0.6rem; }
.prose li { font-size: 1.06rem; line-height: 1.65; color: var(--ink); }
.prose li::marker { color: var(--red); }
.prose blockquote { border-left: 3px solid var(--red); padding-left: 1.3rem; font-size: 1.15rem; color: var(--ink); font-style: italic; }
.prose .btn, .prose .btn-link { text-decoration: none; }
.prose figure { margin-block: 2rem; }
.prose img { border-radius: var(--r); border: 1px solid var(--hair-2); }
.prose hr { border: none; border-top: 1px solid var(--hair); margin-block: 2.4rem; }

/* ============================================================ POST GRID (blog cards) ============================================================ */
.post-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.post-head .label { margin-bottom: 1rem; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.4vw, 2rem); }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; background: var(--panel); transition: transform 0.3s var(--ease), border-color 0.3s var(--ease); }
.post-card:hover { transform: translateY(-4px); border-color: var(--hair-2); }
.post-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--panel-2); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.post-card:hover .post-card-img img { transform: scale(1.04); }
.post-card-body { padding: 1.3rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.post-card-cat { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--red); }
.post-card-title { font-family: var(--body); font-weight: 700; font-size: 1.12rem; line-height: 1.28; letter-spacing: -0.01em; color: var(--ink); }

/* ============================================================ FOOTER ============================================================ */
.footer { border-top: 1px solid var(--hair); background: var(--panel); padding-top: clamp(3.5rem, 6vw, 5rem); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); padding-bottom: clamp(3rem, 5vw, 4rem); }
.footer-brand picture { display: inline-block; }
.footer-brand img { height: 26px; width: auto; margin-bottom: 1.2rem; filter: brightness(0); } /* footer is light -> ink logo */
.footer-brand p { color: var(--ink-soft); max-width: 34ch; font-size: 0.94rem; line-height: 1.6; }
.footer-brand .btn-link { margin-top: 1.3rem; }
.footer-col h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 1rem; }
.footer-col ul { list-style: none; display: grid; gap: 0.65rem; }
.footer-col a, .footer-col span { color: var(--ink-soft); font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-block: 1.7rem; border-top: 1px solid var(--hair); color: var(--ink-dim); font-size: 0.8rem; font-family: var(--mono); }
.footer-bottom a { color: var(--ink-soft); }
.footer-bottom a:hover { color: var(--ink); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================ RESPONSIVE ============================================================ */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .num-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-inner > .nav-right > .lang { display: none; }
  .nav-burger { display: flex; }
  .drawer-lang { display: inline-flex; }
  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; aspect-ratio: 16 / 11; }
  .num-grid--3, .num-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .page-media { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .num-grid--2, .num-grid--3, .num-grid--4 { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .page-media, .article-media { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
