/* Gláma+Kím motion and interaction: the old Breakdance custom stylesheets, in their
   original order. Loads before components.css, so a rule here that must beat a
   component class carries extra specificity (html, body or a parent class). */

/* --- Scroll reveal --------------------------------------------------------------
   A calm settle: short travel, long duration, gentle deceleration; opacity leads.
   main.js adds html.gk-reveal-ready, so without JS nothing is hidden.
   The transition lives on .is-in only: on .gk-reveal the browser would animate
   INTO the hidden state when the class lands. */
:root {
  --gk-reveal-dur:  1200ms;
  --gk-reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gk-reveal-rise: 20px;
  --gk-reveal-col:  120ms;  /* between cards side by side in a row */
  --gk-reveal-part: 140ms;  /* between a card's image and its caption */
}

html.gk-reveal-ready .gk-reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(var(--gk-reveal-rise));
  transition: none;
}

html.gk-reveal-ready .gk-reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity   var(--gk-reveal-dur) var(--gk-reveal-ease) var(--gk-reveal-d, 0ms),
              transform var(--gk-reveal-dur) var(--gk-reveal-ease) var(--gk-reveal-d, 0ms);
}

/* Side-by-side cascade: --gk-col on the grid cell inherits to whatever is revealed
   inside. The column comes from nth-child, not offsetTop, so it holds at every
   breakpoint and through resizes. Each row restarts at zero. Default: two-up. */
html.gk-reveal-ready .gk-loop-item { --gk-col: 0; }
html.gk-reveal-ready .gk-loop-item:nth-child(even) { --gk-col: 1; }

html.gk-reveal-ready .gk-reveal {
  --gk-reveal-d: calc(var(--gk-col, 0) * var(--gk-reveal-col));
}

/* Home category cards travel half the default (image 10px, caption 5px); the
   caption follows the image so the two read as one gesture. */
html.gk-reveal-ready .gk-pcard-media.gk-reveal {
  --gk-reveal-rise: 10px;
}

html.gk-reveal-ready .gk-pcard-body.gk-reveal {
  --gk-reveal-rise: 5px;
  --gk-reveal-d: calc(var(--gk-col, 0) * var(--gk-reveal-col) + var(--gk-reveal-part));
}

/* Grids with other column counts need their own moduli; a delay out of step with
   the columns reads as a stutter. The resets carry :nth-child(n) for specificity
   parity (a media query adds none), so source order decides, not the wider rule. */
/* Work grid: 3 / 2 / 1. */
html.gk-reveal-ready .gk-workgrid .gk-loop > .gk-loop-item { --gk-col: 0; }
html.gk-reveal-ready .gk-workgrid .gk-loop > .gk-loop-item:nth-child(3n + 2) { --gk-col: 1; }
html.gk-reveal-ready .gk-workgrid .gk-loop > .gk-loop-item:nth-child(3n + 3) { --gk-col: 2; }

@media (max-width: 1023px) {
  html.gk-reveal-ready .gk-workgrid .gk-loop > .gk-loop-item:nth-child(n)  { --gk-col: 0; }
  html.gk-reveal-ready .gk-workgrid .gk-loop > .gk-loop-item:nth-child(2n) { --gk-col: 1; }
}

@media (max-width: 479px) {
  html.gk-reveal-ready .gk-workgrid .gk-loop > .gk-loop-item:nth-child(n) { --gk-col: 0; }
}

/* Team grid: 4 / 3 / 2 / 1. */
html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item { --gk-col: 0; }
html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(4n + 2) { --gk-col: 1; }
html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(4n + 3) { --gk-col: 2; }
html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(4n + 4) { --gk-col: 3; }

@media (max-width: 1439px) {
  html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(n)     { --gk-col: 0; }
  html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(3n + 2) { --gk-col: 1; }
  html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(3n + 3) { --gk-col: 2; }
}

@media (max-width: 1023px) {
  html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(n)  { --gk-col: 0; }
  html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(2n) { --gk-col: 1; }
}

@media (max-width: 479px) {
  html.gk-reveal-ready .gk-teamgrid .gk-loop > .gk-loop-item:nth-child(n) { --gk-col: 0; }
}

/* Greinar article grid: 3 / 2 / 1. */
html.gk-reveal-ready .gk-posts-loop .gk-loop > .gk-loop-item { --gk-col: 0; }
html.gk-reveal-ready .gk-posts-loop .gk-loop > .gk-loop-item:nth-child(3n + 2) { --gk-col: 1; }
html.gk-reveal-ready .gk-posts-loop .gk-loop > .gk-loop-item:nth-child(3n + 3) { --gk-col: 2; }

@media (max-width: 1023px) {
  html.gk-reveal-ready .gk-posts-loop .gk-loop > .gk-loop-item:nth-child(n)  { --gk-col: 0; }
  html.gk-reveal-ready .gk-posts-loop .gk-loop > .gk-loop-item:nth-child(2n) { --gk-col: 1; }
}

@media (max-width: 479px) {
  html.gk-reveal-ready .gk-posts-loop .gk-loop > .gk-loop-item:nth-child(n) { --gk-col: 0; }
}

/* Captions under article, person and work cards follow their image, travelling less. */
html.gk-reveal-ready .gk-postcard-text.gk-reveal {
  --gk-reveal-rise: 10px;
  --gk-reveal-d: calc(var(--gk-col, 0) * var(--gk-reveal-col) + var(--gk-reveal-part));
}

html.gk-reveal-ready .gk-person-text.gk-reveal {
  --gk-reveal-rise: 10px;
  --gk-reveal-d: calc(var(--gk-col, 0) * var(--gk-reveal-col) + var(--gk-reveal-part));
}

html.gk-reveal-ready .gk-workcard-body.gk-reveal {
  --gk-reveal-rise: 10px;
  --gk-reveal-d: calc(var(--gk-col, 0) * var(--gk-reveal-col) + var(--gk-reveal-part));
}

/* One item per row on phones, so no column offset. */
@media (max-width: 767px) {
  html.gk-reveal-ready .gk-loop-item:nth-child(even) { --gk-col: 0; }
}

/* --- Header chrome entrance (on load, not scroll) --------------------------------
   A keyframe with fill-mode both holds the from-state from the first paint, with no
   JS: hiding the header from JS would paint the logo and then snap it away. */
@keyframes gk-chrome-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* 160ms everywhere. On Home the splash loader covers the page until ~3400ms, so the
   chrome starts at 2900ms and settles in through the loader's fade; change both
   together. main.css narrows the Home value to visits where the loader played. */
:root      { --gk-chrome-in-at: 160ms;  }
body.home  { --gk-chrome-in-at: 2900ms; }

.gk-header-brand {
  animation: gk-chrome-in var(--gk-reveal-dur) var(--gk-reveal-ease) var(--gk-chrome-in-at) both;
}

.gk-navtrigger {
  animation: gk-chrome-in var(--gk-reveal-dur) var(--gk-reveal-ease)
             calc(var(--gk-chrome-in-at) + 120ms) both;
}

/* The filter bar is above the fold too. One gesture for the whole bar: cascading
   ten links reads as fussy. */
.gk-catbar {
  animation: gk-chrome-in var(--gk-reveal-dur) var(--gk-reveal-ease)
             calc(var(--gk-chrome-in-at) + 240ms) both;
}

@media (prefers-reduced-motion: reduce) {
  html.gk-reveal-ready .gk-reveal:not(.is-in) { opacity: 1; transform: none; }
  html.gk-reveal-ready .gk-reveal.is-in { transition: none; }
  .gk-header-brand, .gk-navtrigger, .gk-catbar { animation: none; }
}


/* --- Team grid: 3-up from 1120 to 1439px ------------------------------------------
   4-up at 1120px makes 208px cards and breaks 11 of 16 names onto two lines; at
   1440 the cards are 288px and every name fits. The leading html outranks the
   per-row count in main.css. */
@media (min-width: 1120px) and (max-width: 1439px) {
  html .gk-teamgrid > .gk-loop { --gk-per-row: 3; }
}


/* --- Card image zoom ------------------------------------------------------------
   A slow settle into the photo, matched to the scroll reveal. The zoom runs on the
   <img>; its media box clips and carries the reveal transform, so the two never
   fight. Hover-capable pointers only (no zoom stuck after a tap); focus gets it too. */
:root {
  --gk-zoom-scale: 1.03;
  --gk-zoom-dur:   1400ms;
  --gk-zoom-ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gk-workcard-img,
.gk-pcard-img,
.gk-postcard-img {
  transform: scale(1);
  transition: transform var(--gk-zoom-dur) var(--gk-zoom-ease);
  backface-visibility: hidden;
}

@media (hover: hover) and (pointer: fine) {
  .gk-workcard:hover .gk-workcard-img,
  .gk-pcard:hover .gk-pcard-img,
  .gk-postcard:hover .gk-postcard-img {
    transform: scale(var(--gk-zoom-scale));
  }
}

.gk-workcard:focus-visible .gk-workcard-img,
.gk-pcard:focus-visible .gk-pcard-img,
.gk-postcard:has(:focus-visible) .gk-postcard-img {
  transform: scale(var(--gk-zoom-scale));
}

@media (prefers-reduced-motion: reduce) {
  .gk-workcard-img,
  .gk-pcard-img,
  .gk-postcard-img { transition: none; transform: none !important; }
}

/* --- Team grid row spacing: rows need more air than columns (each card has four
   lines under the portrait). html for specificity over the loop's gap. */
html .gk-teamgrid > .gk-loop { row-gap: 64px; }

@media (max-width: 479px) {
  html .gk-teamgrid > .gk-loop { row-gap: 48px; }
}

/* --- Menu link stagger ----------------------------------------------------------
   body.gk-nav-open fades the overlay in over 0.32s; the main links then settle in
   one after another and the bottom row follows as one gesture.
   Closing: links fade with the overlay and their transform resets only after it is
   hidden (0.32s), so the reset is never seen and the stagger replays on every open. */
:root {
  --gk-menu-dur:     600ms;
  --gk-menu-ease:    cubic-bezier(0.22, 0.61, 0.36, 1);
  --gk-menu-start:   120ms;  /* after the overlay begins to fade in */
  --gk-menu-step:    70ms;   /* between one link and the next */
  --gk-menu-rise:    12px;
}

.gk-navoverlay-link,
.gk-navoverlay .gk-navoverlay-bottom {
  opacity: 0;
  transform: translateY(var(--gk-menu-rise));
  transition: opacity 200ms ease, transform 0s linear 320ms;
}

body.gk-nav-open .gk-navoverlay-link {
  opacity: 1;
  transform: none;
  transition: opacity   var(--gk-menu-dur) var(--gk-menu-ease) var(--gk-menu-d, var(--gk-menu-start)),
              transform var(--gk-menu-dur) var(--gk-menu-ease) var(--gk-menu-d, var(--gk-menu-start));
}

body.gk-nav-open .gk-navoverlay-link:nth-child(1) { --gk-menu-d: calc(var(--gk-menu-start) + 0 * var(--gk-menu-step)); }
body.gk-nav-open .gk-navoverlay-link:nth-child(2) { --gk-menu-d: calc(var(--gk-menu-start) + 1 * var(--gk-menu-step)); }
body.gk-nav-open .gk-navoverlay-link:nth-child(3) { --gk-menu-d: calc(var(--gk-menu-start) + 2 * var(--gk-menu-step)); }
body.gk-nav-open .gk-navoverlay-link:nth-child(4) { --gk-menu-d: calc(var(--gk-menu-start) + 3 * var(--gk-menu-step)); }
body.gk-nav-open .gk-navoverlay-link:nth-child(5) { --gk-menu-d: calc(var(--gk-menu-start) + 4 * var(--gk-menu-step)); }
body.gk-nav-open .gk-navoverlay-link:nth-child(6) { --gk-menu-d: calc(var(--gk-menu-start) + 5 * var(--gk-menu-step)); }
body.gk-nav-open .gk-navoverlay-link:nth-child(7) { --gk-menu-d: calc(var(--gk-menu-start) + 6 * var(--gk-menu-step)); }

/* The bottom row keeps its 0.8 opacity. The .gk-navoverlay parent is for
   specificity over that class rule in components.css, which loads later. */
body.gk-nav-open .gk-navoverlay .gk-navoverlay-bottom {
  opacity: 0.8;
  transform: none;
  transition: opacity   var(--gk-menu-dur) var(--gk-menu-ease) calc(var(--gk-menu-start) + 5 * var(--gk-menu-step)),
              transform var(--gk-menu-dur) var(--gk-menu-ease) calc(var(--gk-menu-start) + 5 * var(--gk-menu-step));
}

@media (prefers-reduced-motion: reduce) {
  .gk-navoverlay-link,
  .gk-navoverlay .gk-navoverlay-bottom { transform: none; transition: none; }
  body.gk-nav-open .gk-navoverlay-link { opacity: 1; transition: none; }
  body.gk-nav-open .gk-navoverlay .gk-navoverlay-bottom { opacity: 0.8; transition: none; }
}

/* --- Link underline animation ---------------------------------------------------
   A line that draws in from the left on hover and leaves to the right (the origin
   flips), so it reads as one sweep, not a rewind. currentColor, sized in em.
   Position: the line hangs off the bottom of the line box. For Inter the baseline
   sits (line-height - 1.21em) / 2 + 0.24em above the box bottom; each link type sets
   that as --gk-line-base, and the line's top sits --gk-line-gap below the baseline,
   so the gap under the letters is the same everywhere. */
:root {
  --gk-line-dur:    450ms;
  --gk-line-ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
  --gk-line-weight: 2px;   /* whole pixels only, see below */
  --gk-line-gap:    max(4px, 0.12em);   /* baseline to top of line */
}

.gk-navoverlay-link,
.gk-navoverlay-sub,
.gk-footer .gk-contact,
.gk-footer .gk-navlink,
.gk-footer .gk-footer-legal-link,
.gk-person-email,
.gk-loadmore-button,
.gk-catbar-link,
.gk-quote-sub a,
.gk-projmeta-type a {
  position: relative;
}

/* The team email is a block as wide as the card; shrink it to the address. */
.gk-person-email {
  width: fit-content;
}

/* Whole-pixel thickness: a fractional height rounds differently with each link's
   sub-pixel position, and some lines thickened at rest. Menu links: 3px at
   desktop, 2px once they drop to 32/28px. */
.gk-navoverlay-link { --gk-line-weight: 3px; }
@media (max-width: 1023px) {
  .gk-navoverlay-link { --gk-line-weight: 2px; }
}

/* Baseline height above the line-box bottom, one per line-height in use. */
.gk-navoverlay-link,
.gk-navoverlay-sub,
.gk-footer .gk-footer-legal-link,
.gk-person-email,
.gk-loadmore-button,
.gk-catbar-link                  { --gk-line-base: 0.295em; }  /* lh 1.32 */
.gk-footer .gk-navlink           { --gk-line-base: 0.135em; }  /* lh 1    */
.gk-footer .gk-contact           { --gk-line-base: 0.435em; }  /* lh 1.6  */
/* An inline link's ::after is placed against the font's content area (1.21em), not
   the line box, so its baseline sits just the descent above, whatever the lh. */
.gk-quote-sub a,
.gk-projmeta-type a              { --gk-line-base: 0.242em; }  /* inline  */

/* Footer links are blocks as wide as their column: shrink them to the text. Their
   permanent and hover text-decoration give way to the drawn line, footer only. */
.gk-footer .gk-contact,
.gk-footer .gk-navlink {
  width: fit-content;
}
.gk-footer .gk-contact,
.gk-footer .gk-contact:hover,
.gk-footer .gk-navlink:hover,
.gk-footer .gk-footer-legal-link:hover {
  text-decoration: none;
}

.gk-navoverlay-link::after,
.gk-navoverlay-sub::after,
.gk-footer .gk-contact::after,
.gk-footer .gk-navlink::after,
.gk-footer .gk-footer-legal-link::after,
.gk-person-email::after,
.gk-loadmore-button::after,
.gk-catbar-link::after,
.gk-quote-sub a::after,
.gk-projmeta-type a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--gk-line-base, 0.295em) - var(--gk-line-gap) - var(--gk-line-weight));
  height: var(--gk-line-weight);
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--gk-line-dur) var(--gk-line-ease);
  will-change: transform;   /* stay on one layer so rest and motion render alike */
  pointer-events: none;
}

.gk-navoverlay-link:hover::after,
.gk-navoverlay-link:focus-visible::after,
.gk-navoverlay-sub:hover::after,
.gk-navoverlay-sub:focus-visible::after,
.gk-footer .gk-contact:hover::after,
.gk-footer .gk-contact:focus-visible::after,
.gk-footer .gk-navlink:hover::after,
.gk-footer .gk-navlink:focus-visible::after,
.gk-footer .gk-footer-legal-link:hover::after,
.gk-footer .gk-footer-legal-link:focus-visible::after,
.gk-person-email:hover::after,
.gk-person-email:focus-visible::after,
.gk-loadmore-button:hover::after,
.gk-loadmore-button:focus-visible::after,
.gk-catbar-link:hover::after,
.gk-catbar-link:focus-visible::after,
.gk-quote-sub a:hover::after,
.gk-quote-sub a:focus-visible::after,
.gk-projmeta-type a:hover::after,
.gk-projmeta-type a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
  .gk-navoverlay-link::after,
  .gk-navoverlay-sub::after,
  .gk-footer .gk-contact::after,
  .gk-footer .gk-navlink::after,
  .gk-footer .gk-footer-legal-link::after,
  .gk-person-email::after,
  .gk-loadmore-button::after,
  .gk-catbar-link::after,
  .gk-quote-sub a::after,
  .gk-projmeta-type a::after { transition: none; }
}

/* Card titles can run to two lines, so the line is a background on an inline
   wrapper (.gk-title-line) and box-decoration-break gives each line its own stroke.
   Same weight, gap, timing and sweep as the links above: the background anchors
   left while drawing in and right while leaving; the jump happens at full width. */
.gk-title-line {
  --gk-line-base: 0.242em;   /* inline box: baseline sits this far above its bottom */
  padding-bottom: calc(var(--gk-line-gap) + var(--gk-line-weight));
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% var(--gk-line-weight);
  background-position: right 0 bottom var(--gk-line-base);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size var(--gk-line-dur) var(--gk-line-ease);
}

.gk-workcard:hover .gk-title-line,
.gk-workcard:focus-visible .gk-title-line,
.gk-pcard:hover .gk-title-line,
.gk-pcard:focus-visible .gk-title-line,
.gk-postcard:hover .gk-title-line,
.gk-postcard:has(:focus-visible) .gk-title-line {
  background-size: 100% var(--gk-line-weight);
  background-position: left 0 bottom var(--gk-line-base);
}

@media (prefers-reduced-motion: reduce) {
  .gk-title-line { transition: none; }
}


/* --- Footer contact column: equal thirds are ~199px at 1024-1119px, narrower than
   the email (~251px), which spilled into the next column. A floor of its own
   content width keeps it on one line; wider screens are unaffected. */
.gk-footer .gk-footer-col-contact {
  min-width: max-content;
}

/* --- Load more projects (blocks.js) ------------------------------------------------
   18px, 500, --mark, with the drawn underline. Generous space below so it does not
   sit on the footer; the numbered fallback without JS gets the same. */
.gk-workgrid .gk-loadmore {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 30px;
  padding: 0 30px;
  min-height: 60px;
  margin-bottom: 80px;
}

.gk-loadmore-button {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--mark);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--step-meta);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
  text-decoration: none;
  cursor: var(--gk-cursor-plus);
}
.gk-loadmore-button[aria-busy="true"] {
  cursor: progress;
}

@media (max-width: 1023px) {
  .gk-workgrid .gk-loadmore { margin-bottom: 60px; }
}
@media (max-width: 767px) {
  .gk-workgrid .gk-loadmore { margin-bottom: 48px; }
}

/* --- Home hero slider --------------------------------------------------------------
   A soft multi-stop gradient (no visible band) under the white caption and dots so
   they hold up on light photos. A positioned ::before paints above the image and
   below the caption, which comes later in the markup. */
.gk-hero-slide::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.30) 0%,
    rgba(0, 0, 0, 0.19) 30%,
    rgba(0, 0, 0, 0.08) 62%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

/* Dots: inactive at 0.45 (Swiper's 0.2 was too faint on busy photos), 0.75 and
   slightly larger on hover. Hover-capable pointers only. */
:root {
  --gk-dot-hover-scale:     1.4;
  --gk-dot-dur:             250ms;
  --gk-dot-inactive:        0.45;
  --gk-dot-inactive-hover:  0.75;
}

.gk-hero .gk-hero-dots {
  --gk-dot-rest: var(--gk-dot-inactive);
}

.gk-hero .gk-hero-dots .gk-hero-dot {
  transform: scale(1);
  transition: transform var(--gk-dot-dur) cubic-bezier(0.22, 0.61, 0.36, 1),
              opacity   var(--gk-dot-dur) ease;
}

@media (hover: hover) and (pointer: fine) {
  .gk-hero .gk-hero-dots .gk-hero-dot:hover {
    transform: scale(var(--gk-dot-hover-scale));
    transition: transform var(--gk-dot-dur) cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity   var(--gk-dot-dur) ease;
  }
  .gk-hero .gk-hero-dots .gk-hero-dot:not(.is-active):hover {
    opacity: var(--gk-dot-inactive-hover);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gk-hero .gk-hero-dots .gk-hero-dot,
  .gk-hero .gk-hero-dots .gk-hero-dot:hover { transition: none; }
}
/* Arrows: on hover-capable pointers hidden until the pointer (or keyboard focus) is
   in the slider; hovering one plays a short nudge the way it points. Touch keeps
   them visible so they stay reachable. The buttons carry no transform of their own,
   so the nudge can own it. */
:root {
  --gk-arrow-fade:  300ms;
  --gk-arrow-nudge: 6px;
  --gk-arrow-dur:   520ms;
}

@keyframes gk-arrow-nudge-next {
  0%, 100% { transform: translateX(0); }
  45%      { transform: translateX(var(--gk-arrow-nudge)); }
}
@keyframes gk-arrow-nudge-prev {
  0%, 100% { transform: translateX(0); }
  45%      { transform: translateX(calc(-1 * var(--gk-arrow-nudge))); }
}

@media (hover: hover) and (pointer: fine) {
  .gk-hero .gk-hero-slider > .gk-hero-prev,
  .gk-hero .gk-hero-slider > .gk-hero-next {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--gk-arrow-fade) ease;
  }

  .gk-hero .gk-hero-slider:hover > .gk-hero-prev,
  .gk-hero .gk-hero-slider:hover > .gk-hero-next,
  .gk-hero .gk-hero-slider:focus-within > .gk-hero-prev,
  .gk-hero .gk-hero-slider:focus-within > .gk-hero-next {
    opacity: 1;
    pointer-events: auto;
  }

  .gk-hero .gk-hero-slider > .gk-hero-next:hover {
    animation: gk-arrow-nudge-next var(--gk-arrow-dur) cubic-bezier(0.37, 0, 0.63, 1);
  }
  .gk-hero .gk-hero-slider > .gk-hero-prev:hover {
    animation: gk-arrow-nudge-prev var(--gk-arrow-dur) cubic-bezier(0.37, 0, 0.63, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gk-hero .gk-hero-slider > .gk-hero-prev,
  .gk-hero .gk-hero-slider > .gk-hero-next { transition: none; animation: none !important; }
}
/* Caption: slides crossfade over 1.6s; the incoming caption waits --gk-cap-delay
   until the image is mostly in, then fades up. The outgoing one fades out fast and
   resets its transform only once invisible, so the two never overlap. */
:root {
  --gk-cap-delay: 900ms;
  --gk-cap-dur:   800ms;
  --gk-cap-out:   300ms;
  --gk-cap-rise:  8px;
}

.gk-hero .gk-hero-item .gk-hero-caption {
  opacity: 0;
  transform: translateY(var(--gk-cap-rise));
  transition: opacity var(--gk-cap-out) ease,
              transform 0s linear var(--gk-cap-out);
}

.gk-hero .gk-hero-item.is-active .gk-hero-caption {
  opacity: 1;
  transform: none;
  transition: opacity   var(--gk-cap-dur) cubic-bezier(0.22, 0.61, 0.36, 1) var(--gk-cap-delay),
              transform var(--gk-cap-dur) cubic-bezier(0.22, 0.61, 0.36, 1) var(--gk-cap-delay);
}

@media (prefers-reduced-motion: reduce) {
  .gk-hero .gk-hero-item .gk-hero-caption { transform: none; transition: opacity var(--gk-cap-out) ease; }
  .gk-hero .gk-hero-item.is-active .gk-hero-caption { transition: opacity var(--gk-cap-out) ease; }
}

/* Full-screen hero (client request 2026-10-22), minus the admin bar so editors see
   the same framing. svh ignores phone browser bars, vh is the fallback; the floor
   stops squat photos on short windows. .gk-hero outranks the components.css rule. */
.gk-hero .gk-hero-slide {
  height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
  height: calc(100svh - var(--wp-admin--admin-bar--height, 0px));
  min-height: 420px;
}


/* --- Logo and menu hover: ease slightly smaller -------------------------------------
   The brand link and menu button hold their transform through the gk-chrome-in
   keyframe (fill-mode both), so the scale goes on what sits inside: the logos
   (towards the left edge, on the gutter) and the icons (about their centre).
   Hover-capable pointers only; keyboard focus gets the same cue. */
:root {
  --gk-chrome-hover-scale: 0.97;
  --gk-chrome-hover-dur:   350ms;
}

.gk-header-brand .gk-header-logo,
.gk-navoverlay-brand .gk-header-logo,
.gk-footer-brand .gk-footer-logo {
  transform-origin: left center;
  transition: transform var(--gk-chrome-hover-dur) cubic-bezier(0.22, 0.61, 0.36, 1);
}
.gk-navtrigger .gk-navtrigger-icon,
.gk-navclose .gk-navclose-icon {
  transform-origin: center;
  transition: transform var(--gk-chrome-hover-dur) cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .gk-header-brand:hover .gk-header-logo,
  .gk-navoverlay-brand:hover .gk-header-logo,
  .gk-navtrigger:hover .gk-navtrigger-icon,
  .gk-navclose:hover .gk-navclose-icon,
  .gk-footer-brand:hover .gk-footer-logo {
    transform: scale(var(--gk-chrome-hover-scale));
  }
}
.gk-header-brand:focus-visible .gk-header-logo,
.gk-navoverlay-brand:focus-visible .gk-header-logo,
.gk-navtrigger:focus-visible .gk-navtrigger-icon,
.gk-navclose:focus-visible .gk-navclose-icon {
  transform: scale(var(--gk-chrome-hover-scale));
}

@media (prefers-reduced-motion: reduce) {
  .gk-header-brand .gk-header-logo,
  .gk-navoverlay-brand .gk-header-logo,
  .gk-navtrigger .gk-navtrigger-icon,
  .gk-navclose .gk-navclose-icon,
  .gk-footer-brand .gk-footer-logo { transition: none; }
}

/* --- Header on scroll ---------------------------------------------------------------
   main.js sets on <body>: gk-header-compact (scrolled > 10px), gk-header-hidden
   (past 500px, scrolling down), gk-header-solid (Home, hero no longer behind it).
   Fixed on every page: a sticky header that shrinks would drag the page up by the
   height it loses. Inner pages reserve the full height at the top of <body>; Home
   needs none because the header overlays the hero. "html body" outranks the
   header's own rules in components.css, which loads later. */
:root {
  --gk-header-slide: 600ms;
  --gk-header-size:  450ms;   /* height / logo change when compacting */
  --gk-header-ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --gk-header-full:  var(--chrome-h);   /* 120px */
  --gk-header-mini:  80px;
}
@media (max-width: 479px) {
  :root {
    --gk-header-full: 80px;
    --gk-header-mini: 64px;
  }
}

html body .gk-header {
  position: fixed;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + 0px);
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--gk-header-full);
  transition: transform var(--gk-header-slide) var(--gk-header-ease),
              height var(--gk-header-size) var(--gk-header-ease),
              background-color var(--gk-header-size) ease,
              border-color var(--gk-header-size) ease;
}

body:not(.home) {
  padding-top: var(--gk-header-full);
}

/* Home restates fixed: "body.home .gk-header" (absolute) outranks the rule above.
   A transparent hairline lets the solid state fade one in without a shift. */
html body.home .gk-header {
  position: fixed;
  top: calc(var(--wp-admin--admin-bar--height, 0px) + 0px);
  z-index: 50;
  border-bottom: 1px solid transparent;
}

/* Compact: shorter bar, smaller logo box, menu button hit area to match. */
html body.gk-header-compact .gk-header {
  height: var(--gk-header-mini);
}
.gk-header-brand {
  transition: width var(--gk-header-size) var(--gk-header-ease),
              height var(--gk-header-size) var(--gk-header-ease);
}
body.gk-header-compact .gk-header .gk-header-brand { width: 84px; height: 46px; }
body.gk-header-compact .gk-header .gk-navtrigger  { height: var(--gk-header-mini); }
@media (max-width: 1023px) {
  body.gk-header-compact .gk-header .gk-header-brand { width: 72px; height: 40px; }
}
@media (max-width: 479px) {
  body.gk-header-compact .gk-header .gk-header-brand { width: 60px; height: 33px; }
}

/* Slide the whole header (plus the admin-bar offset) out of view. */
body.gk-header-hidden .gk-header {
  transform: translateY(calc(-100% - var(--wp-admin--admin-bar--height, 0px)));
}

/* Home, hero scrolled away: the normal header look. */
body.home.gk-header-solid .gk-header {
  background-color: var(--bg-header);
  border-bottom-color: var(--rule);
}
body.home.gk-header-solid .gk-header-logo-default { display: block; }
body.home.gk-header-solid .gk-header-logo-invert  { display: none; }
body.home.gk-header-solid .gk-navtrigger-icon     { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html body .gk-header,
  .gk-header-brand { transition: none; }
}

/* --- Intro above a card grid: even space around the paragraph ------------------------
   The intro's bottom padding stacks with the projects grid's top padding, so it is
   trimmed to make padding + grid top = the space above (100 = 40 + 60, 80 = 20 + 60,
   60 = 10 + 50, 48 = 8 + 40). Only where an intro is directly followed by a
   projects grid. */
.gk-block:has(+ .gk-block .gk-projects) > .gk-intro > .gk-sec-inner {
  padding-bottom: 40px;
}
@media (max-width: 1119px) {
  .gk-block:has(+ .gk-block .gk-projects) > .gk-intro > .gk-sec-inner { padding-bottom: 20px; }
}
@media (max-width: 1023px) {
  .gk-block:has(+ .gk-block .gk-projects) > .gk-intro > .gk-sec-inner { padding-bottom: 10px; }
}
@media (max-width: 767px) {
  .gk-block:has(+ .gk-block .gk-projects) > .gk-intro > .gk-sec-inner { padding-bottom: 8px; }
}

/* --- Splash loader logo (inc/loader.php) --------------------------------------------
   The logo plays in three parts, timed and sized from the old gk_opener3.mp4:
   Glama at 0.32s, + at 0.67s, Kim at 1.07s, 0.76s each; linear opacity, an
   ease-out-cubic rise from ~36% of the logo height below; 42% of the viewport wide.
   Geometry from the three SVGs (shared scale, baseline y 51.91, artboard 358 x 53). */
:root {
  --gk-ld-dur:  760ms;
  --gk-ld-ease: cubic-bezier(0.33, 1, 0.68, 1);   /* ease-out-cubic */
}

.gk-loader-logo {
  position: relative;
  width: clamp(220px, 42vw, 804px);
  aspect-ratio: 358 / 53;
  margin: 0 auto;
}

.gk-loader-logo .gk-loader-part {
  position: absolute;
  display: block;
  height: auto;
  max-width: none;
  margin: 0;
  opacity: 0;
  animation: gk-ld-fade var(--gk-ld-dur) linear var(--gk-ld-delay) forwards,
             gk-ld-rise var(--gk-ld-dur) var(--gk-ld-ease) var(--gk-ld-delay) both;
}

/* Travel is a % of each part's own height; the + is shorter (32 of 53 units). */
.gk-loader-logo .gk-loader-glama { left: 0;      top: 0;      width: 53.91%; --gk-ld-rise: 36%; --gk-ld-delay: 320ms; }
.gk-loader-logo .gk-loader-plus  { left: 56.62%; top: 28.26%; width: 8.94%;  --gk-ld-rise: 59%; --gk-ld-delay: 670ms; }
.gk-loader-logo .gk-loader-kim   { left: 68.85%; top: 0;      width: 31.28%; --gk-ld-rise: 36%; --gk-ld-delay: 1070ms; }

@keyframes gk-ld-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gk-ld-rise {
  from { transform: translateY(var(--gk-ld-rise)); }
  to   { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gk-loader-logo .gk-loader-part { animation: none; opacity: 1; }
}

/* --- A project card whose Link is empty falls back to "#": make it inert, with no
   jump to the top, no zoom and no underline promising a link. */
.gk-pcard[href="#"] {
  pointer-events: none;
  cursor: default;
}

/* --- A full-width Image as the last block sits on the footer: the 60px under the
   block list would only show as a strip of background. */
.gk-blocks:has(> .gk-block:last-child > .gk-imgband[data-image-type="Full Width"]) {
  padding-bottom: 0;
}


/* --- Narrower text columns (client feedback, October 2026) --------------------------
   Intro and paragraph text stop at 1120px, centred, text left-aligned. The menu
   overlay keeps its original inset; the wider --inset-text is for page content. */
html body .gk-intro-text,
html body .gk-para {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.gk-navoverlay-main { --inset-text: 150px; }
@media (max-width: 1119px) { .gk-navoverlay-main { --inset-text: 100px; } }
@media (max-width: 1023px) { .gk-navoverlay-main { --inset-text: 60px; } }
@media (max-width: 767px)  { .gk-navoverlay-main { --inset-text: 24px; } }


/* --- Project navigation (inc/projects.php) ------------------------------------------
   Previous / next project, in the order of the listing the visitor came from. Card
   title type, the cards' drawn underline, and a chevron that nudges the way it
   points. On the grid inset, in line with the gallery. */
.gk-projnav-set {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: 80px var(--inset-wide) 100px;
}
.gk-projnav-set[hidden] { display: none; }

.gk-projnav-link,
.gk-projnav-link:hover {
  color: var(--mark);
  text-decoration: none;
}
.gk-projnav-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 45%;
  font-size: var(--step-meta);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--track-loose);
}
.gk-projnav-next {
  margin-left: auto;
  text-align: right;
}
.gk-projnav-arrow {
  flex: none;
  transition: transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gk-projnav-link:hover .gk-title-line,
.gk-projnav-link:focus-visible .gk-title-line {
  background-size: 100% var(--gk-line-weight);
  background-position: left 0 bottom var(--gk-line-base);
}
@media (hover: hover) and (pointer: fine) {
  .gk-projnav-prev:hover .gk-projnav-arrow { transform: translateX(-4px); }
  .gk-projnav-next:hover .gk-projnav-arrow { transform: translateX(4px); }
}

@media (max-width: 1023px) {
  .gk-projnav-set { padding: 60px var(--inset-wide) 80px; }
}
@media (max-width: 767px) {
  .gk-projnav-set { gap: 24px; padding: 48px var(--inset-wide) 64px; }
  .gk-projnav-link { max-width: 48%; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .gk-projnav-arrow { transition: none; }
}


/* --- Gallery lightbox (blocks.js) ---------------------------------------------------
   The photo as large as the window allows on the page colour, arrows at the sides,
   close top right, a counter below. Arrows nudge like the hero's. */
.gk-gallery-img { cursor: var(--gk-cursor-plus); }
.gk-gallery-img:focus-visible { outline: 2px solid var(--mark); outline-offset: 3px; }

html.gk-lightbox-lock { overflow: hidden; }

.gk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 96px;
  align-items: center;
  background: rgba(240, 237, 230, 0.97);
  color: var(--mark);
  opacity: 0;
  transition: opacity 250ms ease;
}
.gk-lightbox[hidden] { display: none; }
.gk-lightbox.is-open { opacity: 1; }

.gk-lightbox-stage {
  grid-column: 2;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  padding: 72px 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gk-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 300ms ease;
}
.gk-lightbox-img.is-loaded { opacity: 1; }

.gk-lightbox-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: var(--gk-cursor-plus);
  transition: transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.gk-lightbox-btn[hidden] { display: none; }
.gk-lightbox-btn:focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
.gk-lightbox-prev { grid-column: 1; grid-row: 1; justify-self: center; }
.gk-lightbox-next { grid-column: 3; grid-row: 1; justify-self: center; }
.gk-lightbox-close { position: absolute; top: 20px; right: 24px; }
.gk-lightbox-stage { grid-row: 1; }

.gk-lightbox-count {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 14px;
  letter-spacing: var(--track-loose);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .gk-lightbox-prev:hover { transform: translateX(-4px); }
  .gk-lightbox-next:hover { transform: translateX(4px); }
  .gk-lightbox-close:hover { transform: scale(0.92); }
}

@media (max-width: 767px) {
  .gk-lightbox { grid-template-columns: minmax(0, 1fr); }
  .gk-lightbox-stage { grid-column: 1; padding: 64px 0; }
  .gk-lightbox-prev,
  .gk-lightbox-next { position: absolute; bottom: 12px; }
  .gk-lightbox-prev { left: 12px; }
  .gk-lightbox-next { right: 12px; }
  .gk-lightbox-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gk-lightbox, .gk-lightbox-img, .gk-lightbox-btn { transition: none; }
}


/* --- Phone type scale (client feedback, October 2026) --------------------------------
   Below 768px the type steps shrink: headings and quotes by about a fifth, labels,
   card titles and body to 16-17px, small print to 14px. :root:root outranks the
   plain :root they are declared on. Elements with their own phone sizes in
   components.css (which loads later) are set directly, with html body for weight. */
@media (max-width: 767px) {
  :root:root {
    --step-display: 40px;
    --step-h1: 36px;
    --step-h2: 32px;
    --step-h3: 30px;
    --step-h4: 28px;
    --step-h5: 26px;
    --step-h6: 22px;
    --step-title: 20px;
    --step-label: 18px;
    --step-meta: 16px;
    --step-fine: 14px;
    --body-lead: 17px;
    --body-base: 17px;
    --body-sm: 16px;
  }

  html body .gk-intro-title { font-size: 32px; line-height: 1.12; }
  html body .gk-intro-text { font-size: 17px; }
  html body .gk-footer .gk-contact,
  html body .gk-footer .gk-contact-alt,
  html body .gk-footer .gk-navlink { font-size: 17px; }
  html body .gk-contact-heading { font-size: 22px; }
  html body .gk-info-heading { font-size: 20px; }
  html body .gk-info-label,
  html body .gk-info-line,
  html body .gk-info-link { font-size: 16px; }
}


/* --- Language switch (inc/lang.php) -------------------------------------------------
   "IS / EN" in the header and the menu overlay's top bar, pushed against the menu
   (or close) button, whose 100px hit area gives the gap. The current language is
   full strength, the rest half until hovered. Colour follows the menu icon: light
   over the Home hero until the header turns solid. Settles in just after the brand. */
html body .gk-header > .gk-header-lang,
html body .gk-navoverlay-top > .gk-header-lang {
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}

.gk-header > .gk-header-lang {
  animation: gk-chrome-in var(--gk-reveal-dur) var(--gk-reveal-ease)
             calc(var(--gk-chrome-in-at) + 60ms) both;
}

.gk-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: var(--step-meta);
  font-weight: 500;
  letter-spacing: var(--track-tight);
  line-height: 1;
  color: var(--mark);
  white-space: nowrap;
}

body.home:not(.gk-header-solid) .gk-header .gk-lang {
  color: var(--ink-invert);
}

.gk-lang-item {
  display: inline-block;
  padding: 12px 2px;
  color: inherit;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 250ms ease;
}

.gk-lang-item.is-current,
a.gk-lang-item:hover,
a.gk-lang-item:focus-visible {
  opacity: 1;
}

.gk-lang-sep {
  opacity: 0.5;
}

@media (max-width: 767px) {
  .gk-lang { font-size: 16px; }
}

/* Visually hidden text that screen readers still announce. */
.gk-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .gk-header > .gk-header-lang { animation: none; }
  .gk-lang-item { transition: none; }
}


/* --- TranslatePress editor: it places its pencil (<trp-span>) relative to the body's
   top padding, so on padded pages it landed one header height too high. */
body:not(.home) > trp-span {
  margin-top: var(--gk-header-full);
}

/* --- Plus cursor (client request 2026-12-02) ------------------------------------------
   Links, buttons, category links and gallery photos (which open the lightbox) show a
   plus instead of the hand. Class rules above set it too, where they used to say pointer. */
a[href],
button:not(:disabled),
[role="button"],
summary,
label[for],
select { cursor: var(--gk-cursor-plus); }

/* --- Project pages: same space above and below text (client request 2026-12-02) ----
   A gallery and a text block each kept their own --block-y padding, so text met a gallery
   with twice the space it had next to a full-width image (which has none). The text gives
   up its padding on the side that meets a gallery, leaving one --block-y everywhere. */
.gk-blocks--flush > .gk-block--gallery + .gk-block:is(.gk-block--paragraph, .gk-block--intro_paragraph) > .gk-sec > .gk-sec-inner { padding-top: 0; }
.gk-blocks--flush > .gk-block:is(.gk-block--paragraph, .gk-block--intro_paragraph):has(+ .gk-block--gallery) > .gk-sec > .gk-sec-inner { padding-bottom: 0; }
