/* ============================================================
   PK-style design system
   Tokens · themes · 8/5 grid · spacers · media · type scale
   Measured from paulkalkbrenner.net
   ============================================================ */

/* ---------- 1. Tokens ---------- */

:root {
  /* palette */
  --c-white:  #ffffff;
  --c-black:  #000000;
  --c-gray:   #c5c5c5;
  --c-green:  #a7fd9c;
  --c-orange: #f56832;

  --c-dark-40:  rgba(0, 0, 0, 0.4);
  --c-light-40: rgba(255, 255, 255, 0.4);

  /* grid */
  --cols: 8;
  --gutter: clamp(16px, 2.2vw, 32px);
  --pad: clamp(12px, 1.2vw, 20px);

  /* type */
  --font: "Inter Tight", "Helvetica Now Display", "Neue Haas Grotesk Display Pro",
          Helvetica, Arial, sans-serif;

  /* default theme */
  --bg: var(--c-white);
  --fg: var(--c-black);
  --line: rgba(0, 0, 0, 0.15);
}

@media (max-width: 767px) {
  :root { --cols: 5; }
}

/* ---------- 2. Themes ---------- */

[data-section-theme] {
  background-color: var(--bg);
  color: var(--fg);
}
[data-section-theme="light"]  { --bg: var(--c-white);  --fg: var(--c-black); --line: rgba(0,0,0,.15); }
[data-section-theme="gray"]   { --bg: var(--c-gray);   --fg: var(--c-black); --line: rgba(0,0,0,.20); }
[data-section-theme="green"]  { --bg: var(--c-green);  --fg: var(--c-black); --line: rgba(0,0,0,.20); }
[data-section-theme="orange"] { --bg: var(--c-orange); --fg: var(--c-black); --line: rgba(0,0,0,.20); }
[data-section-theme="dark"]   { --bg: var(--c-black);  --fg: var(--c-white); --line: rgba(255,255,255,.20); }

/* ---------- 3. Base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-black);
  background: var(--c-white);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { display: block; max-width: 100%; }
/* the rule above out-specifies the UA sheet's [hidden] { display: none }, so a
   hidden <img>/<video> kept its box and displaced whatever followed it */
[hidden] { display: none !important; }

.img, .cover { width: 100%; height: 100%; object-fit: cover; }

h1, h2, h3, h4, p, ul, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }

a { color: inherit; text-decoration: none; }

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

:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- 4. Type scale ---------- */

.h-d {
  font-size: clamp(2.75rem, 7.6vw, 8.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.035em;
}

.overlay-nr {
  display: block;
  font-size: 28vw;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.04em;
}

.h-m {
  font-size: clamp(1.25rem, 1.6vw, 1.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.h-l { font-size: 1rem; font-weight: 700; line-height: 1.1; }

.p-l { font-size: 0.8125rem; line-height: 1.35; }
.p-r { font-size: 0.75rem;   line-height: 1.3; }
.p-s { font-size: 0.6875rem; line-height: 1.3; }

.u-text-caps {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.u-color-dark-40  { color: var(--c-dark-40); }
.u-color-light-40 { color: var(--c-light-40); }

/* ---------- 5. Layout: container, row, col ---------- */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.row {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gutter);
}

.col { grid-column: span 1; }

.u-col-1 { grid-column: span 1; }
.u-col-2 { grid-column: span 2; }
.u-col-3 { grid-column: span 3; }
.u-col-4 { grid-column: span 4; }
.u-col-5 { grid-column: span 5; }
.u-col-6 { grid-column: span 6; }
.u-col-8 { grid-column: span 8; }

@media (max-width: 1199px) {
  .u-col-md-2 { grid-column: span 2; }
  .u-col-md-4 { grid-column: span 4; }
  .u-md-hide  { display: none; }
}

@media (max-width: 767px) {
  .u-col-sm-1 { grid-column: span 1; }
  .u-col-sm-2 { grid-column: span 2; }
  .u-col-sm-4 { grid-column: span 4; }
  .u-col-sm-5 { grid-column: span 5; }
  .u-sm-hide  { display: none; }
  .u-sm-contents { display: contents; }
}

@media (min-width: 768px) {
  .u-hide-sm { display: revert; }
}
@media (max-width: 767px) {
  .u-hide-sm { display: none; }
}

.u-align-end { display: flex; justify-content: flex-end; }
.u--clip     { overflow: hidden; }
.u--rel      { position: relative; }

/* ---------- 6. Spacer ---------- */

.spacer { height: var(--h, 0px); flex: none; }

.spacer[data-wf--spacer--variant="0"]   { --h: 0px; }
.spacer[data-wf--spacer--variant="16"]  { --h: 16px; }
.spacer[data-wf--spacer--variant="32"]  { --h: 32px; }
.spacer[data-wf--spacer--variant="64"]  { --h: 64px; }
.spacer[data-wf--spacer--variant="120"] { --h: 120px; }
.spacer[data-wf--spacer--variant="160"] { --h: 160px; }
.spacer[data-wf--spacer--variant="250"] { --h: 250px; }
.spacer[data-wf--spacer--variant="300"] { --h: 300px; }
.spacer[data-wf--spacer--variant="400"] { --h: 400px; }

@media (max-width: 767px) {
  .spacer[data-sm="0"]   { --h: 0px; }
  .spacer[data-sm="16"]  { --h: 16px; }
  .spacer[data-sm="32"]  { --h: 32px; }
  .spacer[data-sm="64"]  { --h: 64px; }
  .spacer[data-sm="120"] { --h: 120px; }
}

/* ---------- 7. Media + parallax ---------- */

.media-w {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ratio, 1);
}

.media-w[data-wf--media--variant="ratio-1-1"]     { --ratio: 1 / 1; }
.media-w[data-wf--media--variant="ratio-1-2-1"]   { --ratio: 1.2 / 1; }
.media-w[data-wf--media--variant="ratio-1-875-1"] { --ratio: 1.875 / 1; }
.media-w[data-wf--media--variant="ratio-3-4"]     { --ratio: 3 / 4; }

@media (max-width: 767px) {
  .media-w[data-sm="ratio-1-1"] { --ratio: 1 / 1; }
  .media-w[data-sm="ratio-3-4"] { --ratio: 3 / 4; }
}

/* inner is oversized so the -12% → +8% parallax never exposes an edge */
.media-inner {
  position: absolute;
  inset: -12% 0;
  height: 124%;
  will-change: transform;
}

/* ---------- 8. Section header ---------- */

.section-top__start {
  display: flex;
  align-items: center;
  gap: 8px;
}

.square {
  width: 8px;
  height: 8px;
  background: currentColor;
  flex: none;
}

/* ---------- 9. Button ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: background-color .35s cubic-bezier(.16,1,.3,1),
              color .35s cubic-bezier(.16,1,.3,1);
}
.button:hover { background: var(--fg); color: var(--bg); }

/* A single button alone in a container reads as an afterthought at inline
   width. Given the full measure it already occupies, it becomes the closing
   action of the section above it — same hairline box, more presence. */
.button.is--block { width: 100%; padding: 30px 20px; }

.text-link { display: inline-block; transition: transform .4s cubic-bezier(.16,1,.3,1); }
.text-link:hover { transform: translateX(6px); }

/* ---------- 10. Noise + custom cursor ---------- */

.noise {
  position: absolute;
  inset: -50%;
  background-image: url("/noise.png");
  background-size: 180px;
  opacity: .18;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 999;
  pointer-events: none;
  mix-blend-mode: difference;
}
.cursor-bubble {
  display: grid;
  place-items: center;
  width: 0; height: 0;
  border-radius: 50%;
  background: var(--c-white);
  color: var(--c-black);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

@media (hover: none) { .cursor { display: none; } }

/* ---------- 11. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .media-inner { position: absolute; inset: 0; height: 100%; }
}
