/* ---------------------------------------------
   Klára — brand site
   Style: brutalism on the edge of editorial
--------------------------------------------- */

:root {
  --red: #cc0000;
  --black: #1a1a1a;            /* softened black (was #0a0a0a) */
  --charcoal: #323232;
  --white: #f3f3e9;            /* the only white on the site = SAND */
  --sand: #f3f3e9;             /* page background (brand SAND) */
  --off: #e9e9dc;              /* panels on SAND, one step darker */
  --grey-line: #d8d6d1;

  --font-display: 'Syncopate', sans-serif;
  --font-body: 'Arsenal', sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  /* white gap between full-bleed sections (services bands, 60px @1920) */
  --band: max(0.85rem, 3.125vw);
  --border: 2px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;   /* anchors land below the sticky header */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* keyboard users: visible focus everywhere */
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.8rem 1.2rem;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
}

.skip-link:focus { top: 1rem; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, .logo, nav a, .btn, .num,
.services h3, .hero-sub, .portfolio-marquee {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 700;
}

a { color: inherit; }

.link-underline {
  font-family: var(--font-body);
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 700;
}

section { position: relative; }

/* ---------- HEADER ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--gutter);
  background: var(--sand);
}

.logo {
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}

/* header per the new hero mockup: big name – "klára" in Syncopate's
   lowercase forms, surname in caps; nav in Syncopate Regular, lowercase */
.site-header { align-items: center; padding-block: 1.5rem 1.35rem; }
.site-header .logo { font-size: clamp(1rem, 1.75vw, 1.75rem); line-height: 1; }
.logo-first { text-transform: lowercase; }
.site-header .nav { gap: clamp(1.25rem, 2.5vw, 2.5rem); }
.site-header .nav a {
  font-weight: 400;
  font-size: 0.8rem;
  line-height: 1;
  text-transform: lowercase;
  letter-spacing: 0;
}
/* contact is the one nav item that asks for action: bold black */
.site-header .nav a[href$="#kontakt"] { font-weight: 700; color: var(--black); }
.site-header .nav a[href$="#kontakt"]:hover { color: var(--red); }

@media (max-width: 760px) {
  .site-header { align-items: center; padding-block: 1.1rem; padding-left: var(--gutter); }
  .site-header .logo { font-size: clamp(0.95rem, 4.6vw, 1.4rem); }
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.nav a {
  font-size: 0.8rem;
  text-decoration: none;
}

.nav a:hover { color: var(--red); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--black);
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--sand);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }

  .nav.open { max-height: 360px; border-bottom: var(--border) solid var(--black); }

  .nav a {
    padding: 1rem var(--gutter);
    border-top: 1px solid var(--grey-line);
    font-size: 0.95rem;
  }
}

/* ---------- HERO ---------- */
/* 1:1 from "hero .jpg" (measured at 1600 wide -> 1cqw = 16px; mockup y
   shifted up 100px for its own nav). Syncopate Bold, lowercase forms.
   photo        x 398.7-1188 (24.92 / 49.33cqw), y 108 to the bottom edge
   branding     160.9px = 10.05cqw, red, over the photo; "r" starts on the
                photo's left edge, the last "n" ends on its right edge
   copy|writing 37.4px = 2.34cqw, white, either side of the face
   claim        23.1px = 1.444cqw (browser-measured), three word groups placed at the measured
                x: "žádná" and "brandu" red OFF the photo, the middle part
                white ON it – the photo edges fall between words.
   Cap top sits 0.087em below the top of a line-height:1 box. */

.hero { padding: 0; }

.hero-stage {
  container-type: inline-size;
  position: relative;
  max-width: 1600px;
  margin: 0 auto;
  height: 50.83cqw;
}

.hero-photo {
  position: absolute;
  left: 24.92cqw;
  top: 0;
  width: 49.33cqw;
  height: 50.83cqw;              /* runs from the header to the section end */
  overflow: hidden;
  background: #6f7680;
  z-index: 1;
}

.hero-photo picture { display: block; width: 100%; height: 100%; }

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-headline {
  position: absolute;
  left: 14.58cqw;
  top: 3.85cqw;
  z-index: 2;
  margin: 0;
  font-size: 10.05cqw;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--red);
  white-space: nowrap;
  pointer-events: none;
}

.hero-sub {
  position: absolute;
  z-index: 3;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.34cqw;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--white);
  white-space: nowrap;
}

.hero-sub--copy { left: 32.48cqw; top: 15.11cqw; }
.hero-sub--writing { left: 56.53cqw; top: 14.98cqw; }


/* phones: same rule – "r" and the last "n" on the photo edges, centred.
   branding 14.04cqw -> photo 4.914em = 69cqw. The claim stacks fully on the
   photo (all white), so no word ever crosses an edge. */
@media (max-width: 760px) {
  .hero { padding-top: 0; }
  .hero-stage { height: 71cqw; }
  .hero-photo { left: 15.07cqw; top: 0; width: 69cqw; height: 71cqw; }
  .hero-headline { left: 0.53cqw; top: 4cqw; font-size: 14.04cqw; }
  .hero-sub { font-size: 3.27cqw; }
  .hero-sub--copy { left: 25.65cqw; top: 20.5cqw; }
  .hero-sub--writing { left: 59.29cqw; top: 20.4cqw; }
}

.btn {
  display: inline-block;
  padding: 1.1rem 2.1rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 3px solid var(--black);
  background: var(--sand);
  color: var(--black);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-outline:hover,
.btn-cta:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.btn-solid {
  background: var(--black);
  color: var(--white);
  cursor: pointer;
}

.btn-solid:hover { background: var(--red); border-color: var(--red); }

/* ---------- ŽÁDNÁ PRŮMĚRNOST ---------- */
/* From "ŽÁDNÁ PRŮMĚRNOST NOVÁ ANIMACE.png" (2000 wide -> 1cqw = 20px), SAND ground.
   heading  "žádná průměrnost", Syncopate Bold, ink x 150-1887 -> 6.13cqw;
            static, never animated
   lines    two sentences in Arsenal Bold, one word in red; set as a
            subtitle at ~1/2.8 of the heading (32px at 1440, 20-36px)
            with lighter tracking, so the heading clearly leads
   The two lines share one grid cell under the heading. Scrolling stays
   native, so it is always smooth: the section is stretched by a small
   run (--zp-pin, the ::after spacer) during which the stage stays
   sticky mid-screen, and part-way through it script.js sets .is-2 -
   line 1 rolls up out of its mask, line 2 rolls in. Without JS or with
   reduced motion both lines are simply stacked as in the mockup. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.zp {
  container-type: inline-size;
  /* a little more air than a plain band, so the statement can breathe;
     the top is 1.8vw less because the heading carries that as padding */
  padding-block: calc(clamp(3rem, 6.5vw, 6.5rem) - 1.8vw) clamp(3rem, 6.5vw, 6.5rem);
  /* the services section opens with its own 3.125vw sand band and the
     line box adds a little air under the text: take both off so the
     space above and below the text looks even */
  padding-bottom: max(1rem, calc(clamp(3rem, 6.5vw, 6.5rem) - 3.125vw - 1rem));
}

.zp-stage {
  max-width: 1600px;
  margin: 0 auto;
  text-align: center;
}

.zp-head {
  margin: 0;
  /* carons and acutes (ž á ů ě) rise above a line-height of 1; this keeps
     them inside the box - Safari clips ink outside a pinned (sticky) box */
  padding-top: 0.3em;
  font-size: 6.13cqw;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--black);
  white-space: nowrap;
}

.zp-lines {
  display: grid;
  justify-items: center;
  row-gap: 1.6cqw;
  margin-top: 2.6cqw;
}

.zp-s { margin: 0; max-width: 100%; }

.zp-line {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2cqw, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--black);
}

.zp-line em { font-style: normal; color: var(--red); }

.zp-s > span { display: inline-block; }

/* pinned swap (only with JS and when motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .js .zp { --zp-pin: clamp(120px, 18vh, 200px); }
  .js .zp::after { content: ""; display: block; height: var(--zp-pin); }
  .js .zp-stage { position: sticky; top: var(--zp-top, 38vh); }
  .js .zp-lines { margin-top: 1.7cqw; }
  .js .zp-lines > .zp-s {
    grid-area: 1 / 1;
    overflow: hidden;
    padding-block: 0.35em 0.2em;
  }
  /* the outgoing line leaves quickly, the incoming one follows a beat
     later and settles softly - the same calm mask roll as the hero */
  .js .zp-s > span {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s, opacity 0.5s ease 0.12s;
  }
  .js .zp.is-2 .zp-s--1 > span,
  .js .zp:not(.is-2) .zp-s--2 > span {
    transition: transform 0.45s cubic-bezier(0.55, 0, 0.75, 0), opacity 0.35s ease;
  }
  .js .zp.is-2 .zp-s--1 > span { transform: translateY(-110%); opacity: 0; }
  .js .zp:not(.is-2) .zp-s--2 > span { transform: translateY(110%); opacity: 0; }
}

/* phones: bigger type, the heading and lines may wrap */
@media (max-width: 760px) {
  .zp { padding-block: calc(3.25rem - 3.6vw) calc(3.25rem - 3.125vw - 0.5rem); padding-inline: var(--gutter); }
  /* two lines: a touch more leading so "ě" doesn't touch the line above */
  .zp-head { font-size: 10.6cqw; line-height: 1.12; padding-top: 0.32em; white-space: normal; }
  .zp-line { font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.01em; }
  .zp-lines { margin-top: 1rem; }
  .js .zp-lines { margin-top: 0.6rem; }
}

/* ---------- TESTIMONIAL ---------- */
/* Desktop follows the 16:9 CITACE mockup: brand-red ground, two giant
   dark quote marks (SVG, viewBox matches the mockup at 1600x900),
   white justified quote set inside them. */

/* the section is a carousel: slides are stacked in one grid cell and slid
   sideways (script.js), so every slide shares the tallest slide's height */
.testimonial {
  container-type: inline-size;
  color: var(--white);
  overflow: hidden;
}

.ref-track {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ref-slide {
  grid-area: 1 / 1;
  position: relative;
  /* lower strip: the 16:9 composition scaled to 0.704 is 39.6cqw tall */
  height: 39.6cqw;
  transition: transform 0.6s cubic-bezier(0.6, 0, 0.2, 1);
}

/* the big quote marks are the background of every reference; slides
   alternate strictly by order: red ground + black marks, then black ground
   + red marks, and so on. Text is always SAND. */
.ref-slide:nth-child(odd) { background: var(--red); }
.ref-slide:nth-child(even) { background: var(--black); }

.quote-marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--black);
}

.ref-slide:nth-child(even) .quote-marks { fill: var(--red); }

/* text block spans the quote marks: its left edge touches the left mark's
   curve at the first line (x=250/1600 at y~418 -> 15.6cqw), the right edge
   nearly touches the right mark's straight edge (1455 of 1468 -> 9.1cqw).
   Justified block like the CITACE mockup: last line starts on the left. */
.testimonial-body {
  position: absolute;
  left: 15.6cqw;
  right: 9.1cqw;
  top: 25cqw;
  margin: 0;
}

.testimonial-body p {
  margin: 0;
  font-family: var(--font-body);      /* references = supporting font */
  font-weight: 700;
  font-size: 2.6cqw;
  line-height: 1.4;
  text-align: center;
  hyphens: none;
}

.testimonial-body footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.6cqw;
}

.testimonial-body cite {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: max(0.7rem, 0.85cqw);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  letter-spacing: 0.25em;
  font-size: max(0.7rem, 1.1cqw);
  padding: 1cqw 1.8cqw;
}

.btn-ghost:hover {
  background: var(--sand);
  color: var(--red);
}

@media (max-width: 760px) {
  .ref-slide { aspect-ratio: auto; height: auto; }
  .ref-slide { padding: 5rem var(--gutter) 4rem; }

  .testimonial-body { position: relative; inset: auto; }

  .testimonial-body p {
    font-size: 1.2rem;
    text-align: left;
    text-align-last: auto;
  }

  .testimonial-body footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .btn-ghost { font-size: 0.75rem; padding: 0.9rem 1.2rem; }
}

/* reference 1 scaled as one piece: quote text 25px on the 1920 canvas
   (1.302cqw, was 1.85cqw -> factor 0.704); the quote marks shrink with it
   and stay standing on the bottom edge, so the composition keeps its layout */
.ref-scale {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56.25cqw;            /* the original 16:9 composition ... */
  transform: scale(0.704);     /* ... scaled so it fills the 39.6cqw strip */
  transform-origin: 50% 100%;
}

/* longer quotes: same composition, slightly smaller text */
.testimonial-body--wide {
  /* same text box as nadotec: left edge on the left mark's curve, right
     edge on the right mark's straight edge; anchored to the bottom */
  left: 15.6cqw;
  right: 9.1cqw;
  top: 25cqw;                 /* same start as nadotec, under the notch */
}

/* longer quote -> smaller text so it stays fully inside the marks
   (1.5cqw x 0.704 = 20px on 1920; the signature keeps its size) */
.testimonial-body--wide p { font-size: 2.2cqw; }

.testimonial-body p + p { margin-top: 1.4em; }

/* phones: ref 1 + 3 are plain stacked text (this block must come after the
   desktop rules above, otherwise they win) */
@media (max-width: 760px) {
  .ref-scale { position: static; height: auto; transform: none; }
  .testimonial-body--wide { inset: auto; }
  .ref-slide { padding-top: calc(33.75cqw + 1.75rem); }
  .ref-slide .quote-marks {
    inset: 0 0 auto 0;
    height: 56.25cqw;               /* true 16:9 proportions of the marks */
    clip-path: inset(0 0 40% 0);    /* show only the quote "heads" */
  }
  /* shorter quotes sit in the middle of the free space, not at the top */
  .ref-slide { display: flex; flex-direction: column; padding-bottom: 4.5rem; }
  .ref-slide .ref-scale { flex: 1; display: flex; flex-direction: column; justify-content: center; }
  .testimonial-body--wide p { font-size: 1.2rem; }
}

/* arrows on both sides */
.ref-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: max(2rem, 2.6cqw);
  height: max(4rem, 5.2cqw);
  padding: 0.4rem;
  transform: translateY(-50%);
  border: 0;
  background: none;
  cursor: pointer;
}

.ref-prev { left: max(0.5rem, 1.6cqw); }
.ref-next { right: max(0.5rem, 1.6cqw); }

.ref-arrow svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--white);
  stroke-width: 3;
  transition: transform 0.15s ease;
}

.ref-prev:hover svg { transform: translateX(-3px); }
.ref-next:hover svg { transform: translateX(3px); }

@media (max-width: 760px) {
  .ref-arrow { top: auto; bottom: 0.75rem; transform: none; }
}

/* "více…" toggle: phones only – the quote shows its first half, the rest
   fades out until the reader opens it */
.ref-more { display: none; }

@media (max-width: 760px) {
  .ref-text {
    max-height: 9.8em;              /* 7 whole lines (line-height 1.4) ≈ first half */
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 55%, transparent);
            mask-image: linear-gradient(#000 55%, transparent);
    transition: max-height 0.45s ease;
  }
  .ref-text.is-open { -webkit-mask-image: none; mask-image: none; }

  .ref-more {
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.35rem 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: none;
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .testimonial-body footer { margin-top: 1.75rem; }
}

/* ---------- SERVICES ---------- */
/* Desktop follows the 16:9 mockup (4.png); the background is the mockup's
   own photo with the baked-in text removed. Sizes are in cqw. Each row:
   big number, a thin rule running to x=41.75cqw, then title + description.
   Row baselines in the mockup sit roughly every 12cqw. */

/* background = the uncropped B&W original at a FIXED scale, anchored at the
   bottom: opening a service makes the section taller and simply reveals more
   of the photo above – the photo never stretches. Closed state = the old crop. */
.services {
  container-type: inline-size;
  position: relative;
  min-height: 56.25vw;
  background: #6b6b6b url('../assets/img/services-bg-full.jpg') no-repeat;
  background-image: image-set(url('../assets/img/services-bg-full.webp') type('image/webp'), url('../assets/img/services-bg-full.jpg') type('image/jpeg'));
  background-size: 100% auto;
  background-position: center bottom -12.17vw;
  color: var(--white);
}

/* white bands top and bottom separate the section from its neighbours
   ("služby.jpg": 60px top / 68px bottom at 1920 wide) */
.services::before,
.services::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  background: var(--sand);
}

.services::before { top: 0; height: var(--band); }
.services::after { bottom: 0; height: var(--band); }

.services-list {
  list-style: none;
  margin: 0;
  padding: 5.9cqw 0 0 6.17cqw;
}

.services-list li {
  display: grid;
  /* fixed number column = widest numeral "04" (1.721em of 5.3cqw), so all
     numbers share one left edge and every rule starts at the same x.
     3 services, sizes from the 2026-10-05 mockup (služby.jpg, 1920 wide) */
  grid-template-columns: 9.85cqw 1fr 56.5cqw;
  grid-template-rows: 11.8cqw auto;   /* row 2 = the expandable detail */
  align-items: end;
}

.num {
  font-size: 5.67cqw;
  line-height: 0.82;
  letter-spacing: 0;
  color: var(--white);
}

/* tabular figures: the zeros line up on the left and the second digit sits
   centred in a fixed 0.82em slot (widest of 2/3/4), so the narrow "1"
   does not make 01 look shifted */
.num-d {
  display: inline-block;
  width: 0.82em;
  text-align: center;
}

/* the "1" has its flag on the left, so nudge its optical centre right */
.services-list li:first-child .num-d { padding-left: 0.1em; }

.svc-line {
  height: 2px;
  background: var(--white);
  margin: 0 1.7cqw 0.62cqw 1.4cqw;   /* gap before the title; sits on the number baseline */
}

/* number + rule sit ~10px@1920 higher than the text baseline (mockup) */
.services-list .num,
.services-list .svc-line { transform: translateY(-0.52cqw); }

.svc-text {
  transform: translateY(1.1cqw);
}

.services-list h3 {
  margin: 0 0 0.35cqw;
  font-size: 3.8cqw;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
}

.services-list p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 2.43cqw;
  line-height: 1.2;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* phones: number + rule on one line, title and description below */
@media (max-width: 760px) {
  .services {
    min-height: 0;
    background-size: cover;
    background-position: center bottom;
    padding: 3.5rem var(--gutter) 4rem;
  }

  .services-list { padding: 0; }

  .services-list li {
    grid-template-columns: 4.8rem 1fr;
    height: auto;
    row-gap: 0.75rem;
    padding: 1.75rem 0;
  }

  .num { font-size: 2.75rem; }
  .svc-line { margin: 0 0 0.35rem 1rem; }
  .svc-text { grid-column: 1 / -1; transform: none; }
  .services-list .num, .services-list .svc-line { transform: none; }
  .services-list h3 { font-size: 1.6rem; }
  .services-list p { font-size: 1.15rem; }
}

/* ---------- PORTFOLIO ---------- */

.portfolio {
  background: var(--red);
  color: var(--black);
  overflow: hidden;
  padding: clamp(3rem, 10vh, 6rem) 0;
}

.portfolio-marquee {
  font-size: clamp(3.5rem, 14vw, 9rem);
  line-height: 1;
  white-space: nowrap;
  color: var(--black);
  opacity: 0.9;
  margin-bottom: clamp(1.5rem, 5vh, 3rem);
  padding-left: var(--gutter);
}

.portfolio-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--border);
  padding: 0 var(--gutter);
}

.portfolio-grid figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--black);
  border: var(--border) solid var(--black);
}

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

@media (max-width: 800px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- ABOUT ---------- */
/* 16:9 section. The portrait photo (O mně FOTKA OTOČENÁ HLAVA, 3:4, face turned left towards the text, flat blue ground)
   stands on the right at full height; the rest is white with the text in
   the photo's own blue (#0038a2, sampled from its edge), justified
   Arsenal Bold on the left. Sizes in cqw (1cqw = 19.2px
   at 1920). */

.about {
  container-type: inline-size;
  background: var(--sand) url('../assets/img/about-photo.jpg') right top / auto 100% no-repeat;
  background-image: image-set(url('../assets/img/about-photo.webp') type('image/webp'), url('../assets/img/about-photo.jpg') type('image/jpeg'));
  color: #0038a2;
  aspect-ratio: 16 / 9;
}

.about-text {
  position: absolute;
  left: 3.05cqw;
  right: calc(42.2cqw + 3.05cqw);     /* photo is 56.25cqw x 0.75 = 42.2cqw wide */
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 2.2cqw;
  line-height: 1.4;
  text-align: left;
  hyphens: none;
}

.about-text p { margin: 0 0 1.4em; }
.about-text p:last-child { margin-bottom: 0; }
.about-text .about-more { margin-bottom: 0; }

/* phones: photo and text stacked like on desktop – a square crop of the
   portrait on top, the text below it in the photo's blue on sand (text over
   the photo was hard to read on a small screen) */
@media (max-width: 760px) {
  .about {
    aspect-ratio: auto;
    display: block;
    padding-bottom: 1.25rem;          /* the next section (sand too) adds its own top padding */
    background: var(--sand);
    color: #0038a2;
  }

  .about::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0038a2 url('../assets/img/about-photo.jpg') center top / cover no-repeat;
    background-image: image-set(url('../assets/img/about-photo.webp') type('image/webp'), url('../assets/img/about-photo.jpg') type('image/jpeg'));
  }

  .about-text {
    position: relative;
    inset: auto;
    transform: none;
    padding: 2.25rem var(--gutter) 0;
    font-size: 1.15rem;
    line-height: 1.5;
  }

  .about-text p { margin-bottom: 1em; }

  /* second paragraph waits behind "Více o mně" */
  .about-text .about-more { margin-bottom: 0.6em; }
  .js .about-more:not(.is-open) { display: none; }
  .js .about-more.is-open { animation: about-in 0.4s ease both; }

  .js .about-toggle {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.4rem 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    background: none;
    color: inherit;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
  }
}

.about-toggle { display: none; }
.about-toggle:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

@keyframes about-in {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .about-more.is-open { animation: none; }
}

/* ---------- MAGAZINE ---------- */
/* Heading follows the 16:9 mockup (7.png) to the pixel: every piece is
   placed in cqw (1cqw = 16px at 1600 wide). Syncopate Bold, cap centre
   sits 0.44em below the top of a line-height:1 box.
   The       ink 70.9-159.2   -> 2cqw,    box left 4.4cqw
   rule      247.5-435.5, y 94.65, 9px thick
   Klarity   ink 486.4-994.1  -> 5.87cqw, box left 29.78cqw
   rule      1063.5-1251.7
   magazín   ink 1306.7-1508.3 -> 2cqw,   box left 81.46cqw */

.magazine {
  container-type: inline-size;
  background: var(--sand);           /* SAND ground, black type */
  color: var(--black);
  aspect-ratio: 16 / 9;
}

.magazine-head {
  position: absolute;
  inset: 0 0 auto;
  height: 12cqw;
  margin: 0;
  color: var(--black);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.magazine-head > span { position: absolute; white-space: nowrap; }

.mh-the,
.mh-mag { font-size: 2cqw; top: 4.9cqw; }

.mh-the { left: 4.4cqw; }
.mh-mag { left: 81.46cqw; }

.mh-klarity {
  left: 29.78cqw;
  top: 3.27cqw;
  font-size: 5.87cqw;
}

.mh-rule {
  top: 5.63cqw;
  width: 11.76cqw;
  height: 0.57cqw;
  background: currentColor;
}

.mh-rule-l { left: 15.47cqw; }
.mh-rule-r { left: 66.47cqw; }

/* --- articles: magazine grid (layout from "inspirace struktury magazínu") ---
   3 equal columns; #1 spans 2 columns x 2 rows, #2 and #3 stack on the
   right, #4-#6 form the bottom row. Thin rules only between cells. */

.magazine { aspect-ratio: auto; padding-bottom: 5cqw; }

.mag-grid {
  --rule: 1px solid rgba(26, 26, 26, 0.3);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  margin: 13cqw 5.75cqw 0 4.4cqw;  /* edges line up with "The" / "magazín" */
  padding: 0;
}

.mag-cell { padding: 1.6cqw; }
.mag-cell:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; border-right: var(--rule); border-bottom: var(--rule); padding-left: 0; padding-top: 0; }
.mag-cell:nth-child(2) { border-bottom: var(--rule); padding-top: 0; padding-right: 0; }
.mag-cell:nth-child(3) { border-bottom: var(--rule); padding-right: 0; }
.mag-cell:nth-child(4) { border-right: var(--rule); padding-left: 0; padding-bottom: 0; }
.mag-cell:nth-child(5) { border-right: var(--rule); padding-bottom: 0; }
.mag-cell:nth-child(6) { padding-right: 0; padding-bottom: 0; }

.mag-cell a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.mag-img {
  aspect-ratio: 3 / 2;
  background: rgba(26, 26, 26, 0.06);
  overflow: hidden;
}

/* the lead article is exactly as tall as the two cells beside it: its
   image fills whatever height is left after the caption */
.mag-cell:nth-child(1) a { display: flex; flex-direction: column; height: 100%; }
.mag-cell:nth-child(1) .mag-img { aspect-ratio: auto; flex: 1; min-height: 0; position: relative; }
.mag-cell:nth-child(1) .mag-img img { position: absolute; inset: 0; }
.mag-cell:nth-child(1).is-empty { display: flex; flex-direction: column; }

.mag-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mag-cell a:hover .mag-img img { transform: scale(1.04); }

.mag-date {
  display: flex;
  align-items: center;
  gap: 0.45em;
  margin-top: 1.1cqw;
  font-family: var(--font-body);
  font-size: max(0.7rem, 0.8cqw);
  color: rgba(26, 26, 26, 0.7);
}

.mag-date svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; }

.mag-title {
  margin: 0.5cqw 0 1cqw;
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: max(1rem, 1.45cqw);
  line-height: 1.25;
  color: var(--black);
  /* hover: a white underline fades in (no colour change) */
  text-decoration: underline 2px transparent;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 0.25s ease;
}

.mag-cell:nth-child(1) .mag-title { font-size: max(1.5rem, 2.9cqw); line-height: 1.15; }

.mag-tags {
  font-family: var(--font-body);
  font-size: max(0.7rem, 0.8cqw);
  color: rgba(26, 26, 26, 0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mag-cell a:hover .mag-title,
.mag-cell a:focus-visible .mag-title { text-decoration-color: var(--black); }

/* fewer than 6 articles: the grid adapts, no empty placeholders */
.mag-grid[data-count="1"] { grid-template-columns: 1fr; }
.mag-grid[data-count="1"] .mag-cell:nth-child(1) { grid-column: auto; grid-row: auto; border: 0; padding: 0; }
.mag-grid[data-count="1"] .mag-cell:nth-child(1) .mag-img { aspect-ratio: 16 / 7; flex: none; }

.mag-grid[data-count="2"] { grid-template-columns: 2fr 1fr; }
.mag-grid[data-count="2"] .mag-cell:nth-child(1) { grid-column: auto; grid-row: auto; border-bottom: 0; padding-bottom: 0; }
.mag-grid[data-count="2"] .mag-cell:nth-child(1) a { height: auto; }
.mag-grid[data-count="2"] .mag-cell:nth-child(1) .mag-img { aspect-ratio: 16 / 10; flex: none; }
.mag-grid[data-count="2"] .mag-cell:nth-child(2) { border-bottom: 0; }

.mag-grid[data-count="3"] .mag-cell:nth-child(1),
.mag-grid[data-count="3"] .mag-cell:nth-child(3) { border-bottom: 0; padding-bottom: 0; }

.mag-grid[data-count="4"] .mag-cell:nth-child(4),
.mag-grid[data-count="5"] .mag-cell:nth-child(5) { border-right: 0; }

/* readable over the white patch of the hide too */

@media (max-width: 760px) {
  .magazine { padding: 3rem var(--gutter) 3rem; }
  .mag-grid[data-count] { grid-template-columns: 1fr; }
  .mag-grid[data-count] .mag-cell { border-bottom: var(--rule); padding: 1.5rem 0; }
  .mag-grid[data-count] .mag-cell:last-child { border-bottom: 0; }
  .mag-cell:nth-child(1) a { height: auto; }
  .mag-cell:nth-child(1) .mag-img,
  .mag-grid[data-count] .mag-cell:nth-child(1) .mag-img { aspect-ratio: 3 / 2; flex: none; }

  .magazine-head {
    position: relative;
    height: auto;
    display: flex;
    flex-wrap: wrap;           /* phones:  the ———— / KLARITY / ———— magazín */
    align-items: center;
    gap: 1.5cqw 3cqw;
  }

  .magazine-head > span { position: static; }
  .mh-the, .mh-mag { font-size: 4.6cqw; }
  .mh-klarity { flex-basis: 100%; font-size: 16.5cqw; line-height: 1; text-align: center; }
  .mh-rule { flex: 1; width: auto; height: 1.2cqw; }

  .mag-grid { grid-template-columns: 1fr; margin: 2rem 0 0; }

  .mag-cell,
  .mag-cell:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    padding: 1.5rem 0;
    border-right: 0;
    border-bottom: var(--rule);
  }

  .mag-cell:first-child { padding-top: 0; }
  .mag-cell:last-child { border-bottom: 0; padding-bottom: 0; }
  .mag-date { margin-top: 0.9rem; }
  .mag-title { margin: 0.4rem 0 0.7rem; }
}

/* ---------- CONTACT ---------- */
/* Heading block follows the 16:9 mockup (8.png) at 1600 wide, in cqw:
   "kontaktujte"  Syncopate Bold 7.12cqw, tracking 0.27em, ink 32-1459,
                  baseline y=136.7  -> box top 3.03cqw
   "mě"           Syncopate Regular 10.2cqw, tracking 0.25em, ink 38-400,
                  baseline y=343.7  -> 3.43cqw below the first line
   lede           Arsenal Bold, tracking 0.35em, justified, x 532-1436,
                  first line top y=242 -> 15.15cqw
   The form spans the same edges: left = the "k", right = end of the lede. */

.contact {
  /* black frame around a SAND panel ("Kontaktní formulář.png": frame 90px
     sides/top, 108px bottom at 1600); the panel is the size container, so
     the whole layout scales down with it */
  background: var(--black);
  padding: 5.63vw 5.63vw 6.75vw;
}

.contact-panel {
  container-type: inline-size;
  background: var(--sand);
  padding-bottom: 4cqw;
}

.contact-intro {
  position: relative;
  padding-top: 2.25cqw;
  min-height: 24.5cqw;
}

.contact-headline {
  margin: 0;
  color: var(--black);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
}

.contact-headline span { display: block; white-space: nowrap; }

.ct-caps {
  margin-left: 2.1cqw;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 6.85cqw;
  letter-spacing: 0.218em;
}

.ct-soft {
  margin: 2.85cqw 0 0 1.85cqw;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 9.65cqw;
  letter-spacing: 0.25em;
}

.contact-lede {
  position: absolute;
  left: 34.19cqw;
  width: 53.9cqw;
  top: 12cqw;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.277cqw;
  line-height: 1.63;
  letter-spacing: 0.35em;
  text-align: center;
}

/* --- form: compact 2 x 2 grid so the whole section fits one desktop screen --- */

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4cqw;
  row-gap: 2.2cqw;
  margin: 0 10.25cqw 0 2cqw;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5cqw;
}

.field-wide { grid-column: 1 / -1; }

.field label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: max(0.75rem, 0.95cqw);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field-opt {
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.05em;
  color: #6b6b6b;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: max(1rem, 1.3cqw);
  line-height: 1.4;
  padding: 0.4cqw 0 0.6cqw;
  border: 0;
  border-bottom: var(--border) solid var(--black);
  border-radius: 0;
  background: transparent;
  color: var(--black);
  resize: none;
}

/* the hint inside each field: light and quiet */
.field input::placeholder,
.field textarea::placeholder {
  font-weight: 400;
  color: #a3a3a3;
  opacity: 1;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
}

.field.has-error input,
.field.has-error textarea { border-bottom-color: var(--red); }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  margin-top: 0;
}

.contact-form .btn {
  font-size: max(0.85rem, 1.1cqw);
  letter-spacing: 0.25em;
  padding: 1cqw 3.2cqw;
  cursor: pointer;
}

.form-note {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
}

.form-note.success { color: var(--black); }
.form-note.error { color: var(--red); }

/* phones: headline keeps its proportions, lede and form stack */
@media (max-width: 760px) {
  /* black frame stays, thinner; the SAND panel gets real breathing room */
  .contact { padding: 0.9rem 0.9rem 1.2rem; }
  .contact-panel { padding: 0 1.4rem 2.25rem; }
  .contact-intro { min-height: 0; padding-top: 2.25rem; }
  .ct-caps, .ct-soft { margin-left: 0; }
  .ct-caps { font-size: 8.3cqw; letter-spacing: 0.15em; }
  .ct-soft { font-size: 13cqw; margin-top: 0.4rem; }

  .contact-lede {
    position: static;
    width: auto;
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.55;
    letter-spacing: 0.06em;
    text-align: left;
  }

  .contact-form {
    grid-template-columns: 1fr;
    row-gap: 1.75rem;
    margin: 2.25rem 0 0;
  }

  .form-actions { flex-direction: column; align-items: stretch; gap: 0.9rem; }

  .field { gap: 0.5rem; }
  .field input, .field textarea { padding: 0.4rem 0 0.6rem; }
  .contact-form .btn { width: 100%; padding: 1.1rem; }
}

/* ---------- FOOTER ---------- */

.site-footer {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 1.2fr 1.6fr;
  gap: 2.5rem clamp(2rem, 4vw, 3.5rem);
  padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) 2rem;
  border-top: 2px solid var(--black);
  background: var(--sand);           /* SAND ground, black type */
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}

.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--red); }

.sf-brand .logo { display: inline-block; font-size: clamp(1.05rem, 1.5vw, 1.4rem); margin-bottom: 0.75rem; white-space: normal; }
.sf-brand p { max-width: 30ch; color: rgba(26, 26, 26, 0.75); }

.sf-col { display: flex; flex-direction: column; gap: 0.35rem; }

.sf-col a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.sf-col p:not(.sf-title) { color: rgba(26, 26, 26, 0.75); }

.sf-title {
  margin-bottom: 0.5rem !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.sf-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(26, 26, 26, 0.25);
  font-size: 0.9rem;
  color: rgba(26, 26, 26, 0.6);
}

.sf-legal { display: flex; gap: 1.5rem; }
.sf-legal a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1000px) {
  .site-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-footer { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 6rem; }
}

/* ---------- NEWSLETTER FORM (footer + under every article) ---------- */
.news-form { margin-top: 0.5rem; }

.news-row { display: flex; }

.news-row input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}

.news-row input::placeholder { color: inherit; opacity: 0.55; }
.news-row input:focus { outline: none; border-color: var(--red); }

.news-row button {
  padding: 0 1.1rem;
  border: 0;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.news-row button:hover { background: var(--black); }
.news-row button[disabled] { opacity: 0.6; cursor: wait; }

.site-footer .news-consent,
.news-consent {
  margin-top: 0.6rem !important;
  font-size: 0.8rem;
  line-height: 1.5;
  opacity: 0.75;
}

.news-consent a { text-decoration: underline !important; text-underline-offset: 2px; }
.site-footer .sf-col .news-consent a { font-size: inherit; font-weight: 400; }

.news-note { margin-top: 0.5rem !important; font-weight: 700; }
.news-note:empty { display: none; }
.news-note.error { color: var(--red); }
.site-footer .news-note.success { color: var(--black) !important; }

/* ---------- FLOATING CTA ---------- */
/* Always visible, bottom right: plain black with white text, no frame.
   Hidden while the contact form or footer is on screen (script.js). */

.float-cta {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: calc(clamp(1rem, 2.5vw, 2rem) + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  padding: 1rem 1.6rem;
  background: var(--black);
  color: var(--white);
  border: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s ease, opacity 0.25s ease, transform 0.25s ease;
}

.float-cta:hover,
.float-cta:focus-visible { background: #333333; }

.float-cta.is-hidden {
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
}

@media (max-width: 760px) {
  .float-cta { padding: 0.85rem 1.1rem; font-size: 0.7rem; letter-spacing: 0.14em; }
}

/* form consent line */
.form-consent {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #6b6b6b;
}

.form-consent a { color: inherit; text-underline-offset: 3px; }

/* ---------- SECTION RHYTHM ---------- */
/* Every full-bleed section is framed by the same SAND band. Order:
   hero → žádná průměrnost → services → clients → about → process → quote →
   magazine → contact (black frame) → footer. The black contact frame runs
   straight into the footer, with no band between them. */
.testimonial,
.about { margin-bottom: var(--band); }

/* thank-you state after the form is sent */
.form-sent {
  margin: 0 10.25cqw 0 2cqw;
  padding: 2.5cqw 0 1cqw;
  border-top: var(--border) solid var(--black);
  font-family: var(--font-body);
  font-size: max(1.05rem, 1.35cqw);
  line-height: 1.6;
}

.form-sent:focus { outline: none; }
.form-sent p { margin: 0 0 0.6em; max-width: 52ch; }

.form-sent-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: max(1.4rem, 2.6cqw);
  line-height: 1.15;
  color: var(--red);
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

@media (max-width: 760px) {
  .form-sent { margin: 2.5rem 0 0; padding-top: 1.5rem; }
}

/* ---------- CLIENTS ---------- */
/* Plain white strip: label, a scrolling row of logos (4 visible), and an
   arrow on the right. All logos one colour (black), sized for equal optical
   weight via --h (rem). Order = order in the HTML. */

.clients {
  /* same SAND above and below the content: the services above already end
     with one band, so the top padding is shorter by that band */
  --pad: clamp(2.5rem, 5vw, 4rem);
  padding: max(0px, calc(var(--pad) - var(--band))) var(--gutter) var(--pad);
}

.clients-inner {
  --visible: 4;
  --gap: clamp(1.5rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;   /* arrow column mirrored left -> logos truly centred */
  align-items: center;
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: clamp(1.25rem, 2.5vw, 2rem);
  max-width: 1100px;
  margin: 0 auto;
}

.clients-title {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  font-size: clamp(0.65rem, 0.8vw, 0.78rem);
  line-height: 1.6;
  letter-spacing: 0.16em;
  color: var(--red);
}

.clients-stage {
  grid-column: 2;
  display: grid;
  min-height: 11rem;               /* tall enough for the nkz group frame */
}

/* frames stacked in one cell; only the active one is visible */
.cl-frame {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.cl-frame.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease 0.1s, visibility 0s;
}

.cl-row { gap: var(--gap); flex-wrap: wrap; }
.cl-row > li { display: flex; align-items: center; justify-content: center; min-width: 9rem; }

.clients-stage img {
  height: calc(var(--h) * 1rem * var(--logo-scale, 1));
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* nkz.studio in frame 1: clickable, with a +3 badge hinting at its clients */
.cl-open {
  position: relative;
  display: inline-flex;
  padding: 0.4rem 0.6rem;
  border: 0;
  background: none;
  cursor: pointer;
}

.cl-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.9rem;
  padding: 0.2em 0.45em;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.cl-open:hover .cl-badge,
.cl-open:focus-visible .cl-badge { background: var(--black); }

/* frame 2: nkz.studio on top, a bracket, its three clients underneath */
.cl-group { flex-direction: column; gap: 0; }

.cl-parent { margin: 0; }

.cl-bracket {
  display: block;
  width: min(36rem, 100%);
  height: 1.6rem;
  margin: 0.6rem 0 0.4rem;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transform-origin: 50% 0;
}

.cl-kids {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(42rem, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cl-kids li { display: flex; align-items: center; justify-content: center; min-height: 4rem; }

.cl-caption {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

/* the reveal: the kids start inside the nkz logo and fan out */
.cl-group .cl-bracket { transform: scaleY(0); transition: transform 0.35s ease 0.15s; }
.cl-group .cl-kids li {
  opacity: 0;
  transform: translate(var(--fx, 0), -4.5rem) scale(0.2);
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}
.cl-group .cl-kids li:nth-child(1) { --fx: 100%; }
.cl-group .cl-kids li:nth-child(3) { --fx: -100%; }
.cl-group .cl-caption { opacity: 0; transition: opacity 0.3s ease 0.6s; }

.cl-group.is-active .cl-bracket { transform: none; }
.cl-group.is-active .cl-kids li { opacity: 1; transform: none; }
.cl-group.is-active .cl-kids li:nth-child(1) { transition-delay: 0.2s; }
.cl-group.is-active .cl-kids li:nth-child(2) { transition-delay: 0.28s; }
.cl-group.is-active .cl-kids li:nth-child(3) { transition-delay: 0.36s; }
.cl-group.is-active .cl-caption { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .cl-frame, .cl-group .cl-kids li, .cl-group .cl-bracket, .cl-group .cl-caption { transition: none; }
}

.clients-next {
  grid-column: 3;
  width: 2.5rem;
  height: 3rem;
  padding: 0.25rem;
  border: 0;
  background: none;
  cursor: pointer;
}

.clients-next svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--black);
  stroke-width: 3;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.clients-next:hover svg,
.clients-next:focus-visible svg { stroke: var(--red); transform: translateX(3px); }

/* soft CTA, last frame */
.clients-cta { margin: 0; }
.clients-cta a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.7rem, 0.85vw, 0.8rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--red);
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.2em;
}

.clients-cta a:hover { color: var(--black); }

@media (max-width: 1000px) {
  .clients { --logo-scale: 0.8; }
  .clients-inner { --visible: 3; }
}

@media (max-width: 760px) {
  .clients-inner { grid-template-columns: 2rem 1fr 2rem; --visible: 2; column-gap: 0.75rem; }
  .clients-next { width: 2rem; }
  .clients { --logo-scale: 0.75; }
}

/* ---------- PROCESS ---------- */
/* Growth infographic: three brand-red arches rising 1 : 2 : 3, the first
   step small and easy, then up together. Heading is quiet (Syncopate
   Regular), all text plain black on white so the arches lead.
   Arches grow in when the section scrolls into view (script.js). */

.process {
  padding: clamp(3rem, 6vw, 5.5rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  background: var(--sand);
}

.process-stage {
  container-type: inline-size;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.process-title {
  margin: 0 0 clamp(2.5rem, 5cqw, 4rem);
  text-align: center;
  font-weight: 400;
  font-size: max(0.85rem, 1.5cqw);
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: var(--black);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;   /* arch / title / text */
  column-gap: 5cqw;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* every step shares the same rows, so all arches stand on one baseline */
.process-steps li {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  justify-items: center;   /* arch + text centred in each column */
  text-align: center;
}

.ps-bar {
  display: block;
  align-self: end;
  width: 50%;
  height: var(--bar-h);
  background: var(--red);
  border-radius: 999px 999px 0 0;
  transform-origin: bottom;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.process-steps li:nth-child(1) { --bar-h: 11cqw; }
.process-steps li:nth-child(2) { --bar-h: 22cqw; }
.process-steps li:nth-child(3) { --bar-h: 33cqw; }

.process-steps li:nth-child(2) .ps-bar { transition-delay: 0.15s; }
.process-steps li:nth-child(3) .ps-bar { transition-delay: 0.3s; }

/* before it scrolls into view (only when JS runs) */
.js .process:not(.is-visible) .ps-bar { transform: scaleY(0); }

.ps-title {
  margin: 2.4cqw 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: max(0.9rem, 1.45cqw);
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
}

.ps-num { color: var(--black); }

.process-steps p {
  width: 100%;
  max-width: 22em;
  margin: 1.1cqw 0 0;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: max(0.95rem, 1.2cqw);
  line-height: 1.55;
  color: var(--black);
}

/* phones: each step is a row – small arch on the left, text on the right;
   the arches still rise step by step */
@media (max-width: 760px) {
  .process-title { margin-bottom: 2rem; font-size: 0.85rem; text-align: left; }

  .process-steps {
    grid-template-columns: 1fr;
    row-gap: 2rem;
    align-items: start;
  }

  .process-steps { grid-template-rows: none; }

  .process-steps li {
    display: grid;
    grid-row: auto;
    grid-template-rows: none;
    grid-template-columns: 4.5rem 1fr;
    column-gap: 1.25rem;
    align-items: end;
    justify-items: start;
    text-align: left;
  }

  .ps-bar { grid-column: 1; grid-row: 1 / span 2; width: 100%; align-self: end; }
  .ps-title, .process-steps p { grid-column: 2; }
  .process-steps li:nth-child(1) { --bar-h: 3rem; }
  .process-steps li:nth-child(2) { --bar-h: 6rem; }
  .process-steps li:nth-child(3) { --bar-h: 9rem; }

  .ps-title { margin-top: 0; font-size: 0.95rem; }
  .process-steps p { margin-top: 0.4rem; font-size: 1rem; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .js .process:not(.is-visible) .ps-bar { transform: none; }
}

/* ---------- SERVICES: expandable details ---------- */

.services-list { position: relative; z-index: 2; padding-bottom: 8cqw; }

.svc-toggle {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 1.4cqw;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
}

.svc-toggle:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }

.svc-plus { position: relative; flex: none; width: 1.6cqw; height: 1.6cqw; }

.svc-plus::before,
.svc-plus::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.svc-plus::after { transform: rotate(90deg); }
.svc-toggle[aria-expanded="true"] .svc-plus::after { opacity: 0; }

.services-list .num,
.services-list .svc-line { transition: color 0.25s ease, background 0.25s ease; }
.services-list li.is-open .num { color: var(--red); }
.services-list li.is-open .svc-line { background: var(--red); }

.svc-more {
  grid-column: 3;
  grid-row: 2;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s ease;
}

.services-list li.is-open .svc-more { grid-template-rows: 1fr; }

.svc-more-inner { overflow: hidden; max-width: 52cqw; padding-top: 1.2cqw; }

.svc-more dl { margin: 1.6cqw 0 0; }

.svc-more dl > div {
  display: grid;
  grid-template-columns: 10cqw 1fr;
  gap: 1.5cqw;
  padding: 0.7cqw 0;
  border-top: 1px solid rgba(243, 243, 233, 0.35);
}

.svc-more dt {
  padding-top: 0.35em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: max(0.62rem, 0.75cqw);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.svc-more dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: max(1rem, 1.3cqw);
  line-height: 1.45;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.svc-cta {
  display: inline-block;
  margin: 1.4cqw 0 0.6cqw;
  padding: 1cqw 1.8cqw;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: max(0.7rem, 0.85cqw);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.svc-cta:hover { background: var(--sand); color: var(--red); }

@media (max-width: 760px) {
  /* darken the light wall behind the text on phones */
  .services::before,
  .services::after { z-index: 1; }
  .services-list::before {
    content: '';
    position: absolute;
    /* stop at the SAND bands, so they stay SAND like on desktop */
    inset: calc(-3.5rem + var(--band)) calc(var(--gutter) * -1) calc(-4rem + var(--band));
    background: linear-gradient(180deg, rgba(26, 26, 26, 0.5), rgba(26, 26, 26, 0.35));
    z-index: -1;
  }
  .services-list { padding-bottom: 0; }
  .services-list li { grid-template-rows: none; }
  .svc-more { grid-column: 1 / -1; grid-row: auto; }
  .svc-more-inner { max-width: none; }
  .svc-plus { width: 1rem; height: 1rem; }
  .svc-more dl > div { grid-template-columns: 1fr; gap: 0.2rem; padding: 0.6rem 0; }
  .svc-cta { padding: 0.9rem 1.1rem; }
}

/* deep-linked service (#branding …) lands below the sticky header */
.services-list li[id] { scroll-margin-top: 6rem; }

/* ---------- MAGAZINE on phones: one compact carousel, newest first ---------- */
.mag-carousel { margin-top: 2rem; }

.mag-carousel-track {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.mag-carousel-track::-webkit-scrollbar { display: none; }

/* 88 % wide cards: the next one peeks in and invites a swipe */
.mag-carousel-track .mag-cell {
  flex: 0 0 88%;
  padding: 0;
  border: 0;
  scroll-snap-align: start;
}

.mag-carousel-track .mag-img { aspect-ratio: 3 / 2; }
.mag-carousel-track .mag-title { font-size: 1.15rem; }

.mag-carousel-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: var(--rule);
}

.mag-carousel-count {
  flex: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--black);
}

.mag-arrow {
  width: 2.25rem;
  height: 2.75rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: none;
  cursor: pointer;
}

.mag-arrow svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--black);
  stroke-width: 3;
}


/* LinkedIn in the footer contact column */
.sf-social { display: inline-flex; width: 1.75rem; height: 1.75rem; margin-top: 0.6rem; }
.sf-social svg { width: 100%; height: 100%; fill: var(--black); transition: fill 0.15s ease; }
.sf-social:hover svg, .sf-social:focus-visible svg { fill: var(--red); }

/* phones: nkz.studio's three clients side by side need smaller logos */
@media (max-width: 760px) {
  .clients-stage { min-height: 10rem; }
  .cl-row { row-gap: 1rem; }
  .cl-kids { column-gap: 0.75rem; }
  .cl-kids img { --logo-scale: 0.5; }
  .cl-kids li { min-height: 3rem; }
}
