/* Patryk C. / thepatrykc.com
   Editorial mono system: ink, paper, one grey. Archivo (variable width) + Space Mono. */

:root {
  --ink: #0b0b0c;
  --carbon: #151516;
  --graphite: #5c5c57;
  --ash: #9a9a94;
  --line: #cbc8c0;
  --paper: #eceae3;
  --white: #ffffff;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 3.2vw, 48px);
  --max: 1680px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  --t-mono: clamp(10.5px, .72vw, 12.5px);
  --t-body: clamp(16px, 1.12vw, 19px);
  --t-lead: clamp(19px, 1.7vw, 28px);
  --t-h3: clamp(26px, 2.6vw, 44px);
  --t-h2: clamp(44px, 7.4vw, 136px);
  --t-mega: clamp(64px, 15.5vw, 300px);
}
@media (min-width: 2300px) { :root { --max: 2100px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: var(--t-body);
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, canvas, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 14px; font: 700 var(--t-mono)/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.mono { font-family: var(--f-mono); font-size: var(--t-mono); letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; }
.mega, .h2, .h3 { font-family: var(--f-display); font-weight: 800; margin: 0; letter-spacing: -.035em; line-height: .86; }
.mega { font-size: var(--t-mega); text-transform: uppercase; font-variation-settings: "wdth" 100; }
.h2 { font-size: var(--t-h2); text-transform: uppercase; }
.h3 { font-size: var(--t-h3); letter-spacing: -.02em; line-height: .98; font-weight: 700; }
.lead { font-size: var(--t-lead); line-height: 1.32; letter-spacing: -.01em; font-weight: 500; max-width: 34ch; margin: 0; }
p { margin: 0 0 1em; }
.muted { color: var(--graphite); }
.dark .muted { color: var(--ash); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.dark { background: var(--ink); color: var(--paper); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.dark .rule { border-color: #2a2a2c; }
.row-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- grain ---------- */
.grain {
  pointer-events: none; position: fixed; inset: -50%; z-index: 90; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- viewfinder chrome (fixed, blends with anything under it) ---------- */
.vf { position: fixed; inset: 0; z-index: 80; pointer-events: none; mix-blend-mode: difference; color: var(--white); }
.vf__c { position: absolute; width: 22px; height: 22px; border: 0 solid currentColor; }
.vf__c--tl { top: 14px; left: 14px; border-top-width: 1.5px; border-left-width: 1.5px; }
.vf__c--tr { top: 14px; right: 14px; border-top-width: 1.5px; border-right-width: 1.5px; }
.vf__c--bl { bottom: 14px; left: 14px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.vf__c--br { bottom: 14px; right: 14px; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.vf__tc { position: absolute; left: 44px; bottom: 16px; display: flex; gap: 18px; align-items: center; }
.vf__rec { display: inline-flex; align-items: center; gap: 8px; }
.vf__rec i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: rec 1.6s steps(1) infinite; }
@keyframes rec { 50% { opacity: 0; } }
.vf__scene { position: absolute; right: 44px; bottom: 16px; }
@media (max-width: 760px) { .vf__c { width: 14px; height: 14px; } .vf__scene, .vf__iso, #tc { display: none; } .vf__tc { left: 30px; bottom: 12px; } }

/* ---------- header ---------- */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px max(calc(var(--gutter) + 10px), calc((100vw - var(--max)) / 2 + var(--gutter)));
  mix-blend-mode: difference; color: var(--white);
  transition: padding .5s var(--ease);
}
/* always on screen; tighter once the page moves */
.hdr.is-scrolled { padding-top: 12px; padding-bottom: 12px; }
.hdr button { text-transform: inherit; letter-spacing: inherit; font: inherit; }
.hdr__brand { font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.hdr__nav { display: flex; gap: clamp(18px, 2.4vw, 40px); align-items: center; }
.hdr__nav a { position: relative; }
.hdr__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.hdr__nav a:hover::after, .hdr__nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.hdr__lang { padding: 6px 0 6px 10px; border-left: 1px solid currentColor; }
.hdr__menu { display: none; }
@media (max-width: 900px) {
  .hdr__nav .hdr__link { display: none; }
  .hdr__menu { display: inline-flex; min-height: 44px; align-items: center; }
  .hdr__lang { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ---------- mobile menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 75; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 90px var(--gutter) 40px;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .8s var(--ease-io), visibility 0s .8s;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease-io); }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list a { display: flex; align-items: baseline; gap: 16px; font: 800 clamp(48px, 14vw, 96px)/.9 var(--f-display); letter-spacing: -.04em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid #2a2a2c; }
.menu__list a span { font: 400 var(--t-mono)/1 var(--f-mono); letter-spacing: .12em; color: var(--ash); }
.menu__foot { display: grid; gap: 8px; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  position: relative; display: inline-flex; align-items: center; gap: 14px; min-height: 52px;
  padding: 0 26px; background: var(--bg); color: var(--fg);
  font: 700 var(--t-mono)/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  overflow: hidden; isolation: isolate;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: translateY(101%); transition: transform .55s var(--ease); z-index: -1; }
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--bg); }
.btn { transition: color .55s var(--ease); }
.btn--light { --bg: var(--paper); --fg: var(--ink); }
.btn__arr { display: inline-block; transition: transform .55s var(--ease); }
.btn:hover .btn__arr { transform: translateX(5px); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.rv.in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.split.in .w > span { transform: none; }
/* clip the child, not the observed element: IntersectionObserver treats a fully clipped target as invisible */
.clip > img { clip-path: inset(100% 0 0 0); transition: clip-path 1.4s var(--ease-io), transform 1.6s var(--ease); }
.clip.in > img { clip-path: inset(0 0 0 0); }

/* ---------- custom cursor ---------- */
/* the system arrow is hidden only when the custom cursor is running (mouse devices, motion allowed) */
html.cur-on, html.cur-on * { cursor: none !important; }
html.cur-on.modal-open, html.cur-on.modal-open * { cursor: auto !important; }
/* top of every layer (cookie notice 110, video modal 120, skip link 200): the system arrow is hidden, so nothing may cover this */
.cur { position: fixed; inset: 0; z-index: 250; pointer-events: none; mix-blend-mode: difference; color: var(--white); opacity: 0; transition: opacity .3s; }
.cur.is-on { opacity: 1; }
html.modal-open .cur { opacity: 0; }
.cur__dot, .cur__ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cur__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: currentColor; transition: opacity .25s; }
.cur__ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid currentColor;
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease), background-color .35s, border-width .35s;
}
.cur__ring > span { transform: scale(var(--press, 1)); }
.cur.is-link .cur__ring { width: 62px; height: 62px; margin: -31px 0 0 -31px; background-color: currentColor; }
.cur.is-link .cur__dot, .cur.is-label .cur__dot { opacity: 0; }
.cur.is-label .cur__ring { width: 104px; height: 104px; margin: -52px 0 0 -52px; background-color: currentColor; }
.cur__label { font: 700 11px/1 var(--f-mono); letter-spacing: .14em; white-space: nowrap; color: #000; opacity: 0; transition: opacity .3s; }
.cur.is-label .cur__label { opacity: 1; }
.cur.is-down .cur__ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.cur.is-link.is-down .cur__ring, .cur.is-label.is-down .cur__ring { width: 50px; height: 50px; margin: -25px 0 0 -25px; }
@media (hover: none), (pointer: coarse) { .cur { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv, .split .w > span, .clip > img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .grain { display: none; }
}
