/* deart studio — components.css
   Reusable components. Values come only from tokens.css via var(--...). */

/* ---------- Button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
  border: 0;
  border-radius: var(--radius-0);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.btn--accent {
  background-color: var(--accent);
  color: var(--btn-accent-text);
}

.btn:disabled {
  cursor: progress;
}

@media (hover: hover) {
  .btn:not(:disabled):hover {
    background-color: var(--btn-hover-bg);
    color: var(--btn-hover-text);
  }
}

/* ---------- Link with arrow (Links component) ---------- */

/* Reused for "Svi projekti" and "Zakažite poziv". Underline is a border in
   currentColor, so on hover text and line turn accent together. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: var(--border-thin) solid currentColor;
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  color: var(--text);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

/* Inherits currentColor: same as the text, accent on hover. */
.link-arrow__icon {
  width: var(--icon-size-s);
  height: auto;
}

/* Smaller text variant ("Zakažite poziv"). */
.link-arrow--small {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

@media (hover: hover) {
  .link-arrow:hover {
    color: var(--accent);
  }
}

/* ---------- Project card ---------- */

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-decoration: none;
}

.card__image {
  height: var(--card-image-h);
  border-radius: var(--radius-0);
  background-color: var(--card-image-bg);
}

.card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.card__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.card__title {
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  letter-spacing: normal;
}

/* Always takes its space; only opacity changes, so the layout never shifts. */
.card__arrow {
  flex-shrink: 0;
  width: var(--icon-size);
  height: var(--icon-size);
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.card:focus-visible .card__arrow {
  opacity: 1;
}

@media (hover: hover) {
  .card:hover .card__arrow {
    opacity: 1;
  }
}

.card__category {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-muted);
}

/* ---------- Filter chip ---------- */

/* Toggle button; state lives in aria-pressed. Border width is the same in every
   state, so the chip never changes size. */
.chip {
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  border: var(--border-thin) solid var(--text-muted);
  border-radius: var(--radius-0);
  background-color: var(--bg);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  color: var(--text-muted);
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.chip[aria-pressed="true"] {
  border-color: var(--text);
  background-color: var(--text);
  color: var(--bg);
}

/* Not in Figma; approved exception (see CLAUDE.md). */
@media (hover: hover) {
  .chip[aria-pressed="false"]:hover {
    border-color: var(--text);
  }
}

/* ---------- Form field ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  color: var(--text);
}

/* Fixed height in every state: the 2px focus/error frame is a 1px border plus
   a 1px inset shadow, so it never adds to the box. No hover state. */
.field__control {
  box-sizing: border-box;
  width: 100%;
  height: var(--field-h);
  padding: var(--space-3);
  border: var(--border-thin) solid var(--text-muted);
  border-radius: var(--radius-0);
  background-color: var(--bg);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
}

.field__control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.field__control:focus,
.field__control:focus-visible {
  outline: none;
  border-color: var(--text);
  box-shadow: inset 0 0 0 var(--border-thin) var(--text);
}

/* Error wins over focus, so the problem stays visible while typing. */
.field__control[aria-invalid="true"] {
  border-color: var(--accent-pressed);
  box-shadow: inset 0 0 0 var(--border-thin) var(--accent-pressed);
}

.field__control--textarea {
  height: auto;
  min-height: var(--textarea-h);
  resize: vertical;
}

.field__error {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--accent-pressed);
}

/* Select: native element without its own arrow; ↓ sits in the right padding. */
.field__select {
  position: relative;
}

.field__select .field__control {
  appearance: none;
  padding-right: calc(var(--space-3) + var(--select-arrow-w) + var(--field-gap));
  cursor: pointer;
}

/* Placeholder option ("" + required) stays muted until a service is chosen. */
.field__select .field__control:invalid {
  color: var(--text-muted);
}

.field__select option {
  color: var(--text);
}

.field__select-arrow {
  position: absolute;
  inset-block: 0;
  right: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--select-arrow-w);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-muted);
  pointer-events: none;
}

/* ---------- Consent checkbox ---------- */

.consent {
  display: grid;
  grid-template-columns: var(--checkbox-size) minmax(0, 1fr);
  align-items: start;
  column-gap: var(--space-2);
  row-gap: var(--space-2);
}

/* Real checkbox, restyled. The margin centres the square on the first text line. */
.consent__box {
  appearance: none;
  display: grid;
  place-content: center;
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  margin-top: calc((var(--fs-body-small) * var(--lh-body-small) - var(--checkbox-size)) / 2);
  border: var(--border-thin) solid var(--text-muted);
  border-radius: var(--radius-0);
  background-color: var(--bg);
  cursor: pointer;
}

.consent__box::before {
  content: "";
  width: var(--checkbox-mark);
  height: var(--checkbox-mark);
  background-color: var(--text);
  opacity: 0;
}

.consent__box:checked::before {
  opacity: 1;
}

.consent__label {
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
}

.consent__link {
  transition: color var(--dur-fast) var(--ease-out);
}

.consent__error {
  grid-column: 1 / -1;
}

/* Accent on light background: allowed only as a hover state (see CLAUDE.md). */
@media (hover: hover) {
  .consent__link:hover {
    color: var(--accent);
  }
}

/* ---------- Site header ---------- */

/* Not sticky: the header scrolls away with the page. */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-header__logo {
  display: block;
  color: var(--text);
}

.site-header__logo svg {
  width: var(--logo-width);
  height: auto;
}

.site-header__actions {
  display: none;
}

/* ---------- Navigation ---------- */

.site-nav__list {
  display: flex;
  gap: var(--space-4);
}

.site-nav__link {
  display: block;
  padding-block: var(--space-2);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  text-decoration: none;
}

/* Active page ("page") or its section, e.g. Portfolio on a project page ("true"):
   2px line on the bottom edge, inside the box (padding 8 top and bottom), so the
   link keeps its height and nothing shifts. */
.site-nav__link:is([aria-current="page"], [aria-current="true"]) {
  box-shadow: inset 0 calc(-1 * var(--border-strong)) 0 var(--text);
}

/* ---------- Language switch ---------- */

.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  color: var(--text-muted);
}

.lang-switch__current {
  color: var(--text);
}

.lang-switch__link {
  text-decoration: none;
}

/* ---------- Menu toggle (mobile) ---------- */

/* 44 × 44 touch area; the 24 px icon sits flush right on the page margin. */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: var(--tap-target);
  height: var(--tap-target);
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
}

.menu-toggle svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

/* ---------- Mobile menu ---------- */

/* Full-screen overlay. Closing: opacity fades out, visibility flips only after
   --dur-base so the fade is visible and the closed menu leaves the tab order. */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--dur-base) var(--ease-out),
    visibility 0s linear var(--dur-base);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--dur-base) var(--ease-out),
    visibility 0s linear 0s;
}

/* Auto inline margins of .container would shrink it inside the flex column. */
.mobile-menu > .container {
  margin-inline: 0;
}

.mobile-menu__top {
  flex-shrink: 0;
}

.mobile-menu__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.mobile-menu__link {
  display: block;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  text-decoration: none;
}

.mobile-menu__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  padding-bottom: var(--space-6);
}

.mobile-menu__footer .btn {
  align-self: stretch;
}

/* Scroll lock while the menu is open (class set by menu.js). */
html.is-menu-open {
  overflow: hidden;
}

/* ---------- Site footer ---------- */

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-top: var(--space-7);
  padding-bottom: var(--space-6);
}

/* Mobile: brand full width, Navigation | Social side by side, Collaboration below. */
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--space-3);
  row-gap: var(--space-5);
  padding-block: var(--footer-pad-y-inner);
}

.footer__brand {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.footer__logo {
  display: block;
  color: var(--text);
}

.footer__logo svg {
  width: var(--footer-logo-width);
  height: auto;
}

.footer__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-style: normal;
  color: var(--text-muted);
}

.footer__name {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.footer__contact a {
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

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

.footer__col-title {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-muted);
}

/* min-height (not height) so a long label can wrap on narrow columns. */
.footer__link {
  display: flex;
  align-items: center;
  min-height: var(--footer-link-h);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: var(--border-thin) solid var(--text);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-muted);
}

.footer__top-link {
  align-self: flex-start;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

/* Accent on light background: allowed only as a hover state (see CLAUDE.md). */
@media (hover: hover) {
  .footer__contact a:hover,
  .footer__link:hover,
  .footer__top-link:hover {
    color: var(--accent);
  }
}

/* ---------- Desktop ---------- */

@media (min-width: 1024px) {
  .site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-6);
  }

  .menu-toggle,
  .mobile-menu {
    display: none;
  }

  .site-footer__inner {
    gap: var(--space-7);
  }

  /* 12-column grid: brand 1–4, Navigation 5–6, Social 7–8, Collaboration 9–12
     (left-aligned; 9–12 so its 16px links stay on one line at 1024). */
  .footer__top {
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    align-items: start;
    gap: var(--gutter);
  }

  .footer__brand {
    grid-column: 1 / 5;
  }

  .footer__col--nav {
    grid-column: 5 / 7;
  }

  .footer__col--social {
    grid-column: 7 / 9;
  }

  .footer__col--wide {
    grid-column: 9 / 13;
  }

  .footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-4);
  }

  .footer__top-link {
    align-self: auto;
  }

  /* Desktop type sizes from Figma: column titles, contact lines and the bottom row 14px,
     column links 16px; line-height stays --lh-small. Rows keep --footer-link-h. */
  .footer__col-title,
  .footer__contact,
  .footer__bottom {
    font-size: var(--fs-label);
  }

  .footer__link {
    font-size: var(--fs-body-small);
  }
}

/* MOTION: text-roll */
/* motion.js wraps the label in .roll > .roll__track > two .roll__text (the second is an
   aria-hidden copy). The frame shows one line; --roll-bleed adds room above and below
   for diacritics (Ž, Č, Ć) and the equal negative margin keeps the element's size.
   The copy starts one full bleed below the frame, so its top never peeks in. */
.roll {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  padding-block: var(--roll-bleed);
  margin-block: calc(-1 * var(--roll-bleed));
}

.roll__track {
  position: relative;
  display: block;
  transition: transform var(--dur-base) var(--ease-out);
}

.roll__text {
  display: block;
}

.roll__text[aria-hidden="true"] {
  position: absolute;
  top: calc(100% + 2 * var(--roll-bleed));
  right: 0;
  left: 0;
}

@media (hover: hover) {
  a:hover > .roll > .roll__track,
  .btn:not(:disabled):hover > .roll > .roll__track,
  .chip:hover > .roll > .roll__track {
    transform: translateY(calc(-100% - 2 * var(--roll-bleed)));
  }
}

/* Reduced motion: the copy is identical, so nothing needs to move. */
@media (prefers-reduced-motion: reduce) {
  a:hover > .roll > .roll__track,
  .btn:not(:disabled):hover > .roll > .roll__track,
  .chip:hover > .roll > .roll__track {
    transform: none;
  }
}
/* END MOTION: text-roll */

/* MOTION: nav-underline */
/* Inactive header links only: a 1px line draws in from the left on hover and retracts
   to the right on leave. It sits on the bottom edge inside the padding, so the link
   keeps its height; the active link keeps its 2px box-shadow line. */
.site-nav__link:not([aria-current]) {
  position: relative;
}

.site-nav__link:not([aria-current])::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--border-thin);
  background-color: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}

@media (hover: hover) {
  .site-nav__link:not([aria-current]):hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }
}
/* END MOTION: nav-underline */

/* MOTION: button-wipe */
/* Same end state as the existing hover (theme inversion), reached by a fill that grows
   from the bottom. The fill sits under the label (z-index -1 inside the button's own
   stacking context) and never outside the button box, so no overflow clipping is
   needed and the focus outline stays visible. The base background stays put. */
.btn {
  position: relative;
  isolation: isolate;
  transition: color var(--dur-base) var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--btn-hover-bg);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-base) var(--ease-out);
}

@media (hover: hover) {
  .btn--accent:not(:disabled):hover {
    background-color: var(--accent);
  }

  .btn:not(:disabled):hover::before {
    transform: scaleY(1);
  }
}
/* END MOTION: button-wipe */

/* MOTION: card */
/* Image frame clips the zoom, so the card and image keep their size. The zoom targets a
   real <img>/<picture> inside .card__image; placeholders have none (no visible zoom yet).
   Arrow ↗ slides in from the bottom-left corner; on keyboard focus it shows, no zoom. */
.card__image {
  overflow: hidden;
}

.card__image > * {
  transition: transform var(--dur-slow) var(--ease-out);
}

.card__arrow {
  transform: translate(calc(-1 * var(--card-arrow-shift)), var(--card-arrow-shift));
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.card:focus-visible .card__arrow {
  transform: none;
}

@media (hover: hover) {
  .card:hover .card__arrow {
    transform: none;
  }

  .card:hover .card__image > * {
    transform: scale(var(--card-zoom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .card__arrow,
  .card:hover .card__image > * {
    transform: none;
  }
}

/* Touch (no hover): the ↗ is always shown, in --accent, where it ends up on desktop
   hover; no slide-in. It always takes its space, so the card size does not change. */
@media (hover: none) {
  .card__arrow {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* END MOTION: card */

/* MOTION: chip */
/* Active chip (aria-pressed="true"): the --text fill grows from the bottom like the
   button wipe; the chip losing the state drops its fill at the same time, so the fill
   seems to move from one chip to the other. Driven by aria-pressed, not hover, so it
   also runs on touch. The base active background goes back to --bg here so the fill
   comes only from ::before (delete this block and the old instant change returns).
   The fill never leaves the chip box, so nothing is clipped and the size stays. */
.chip {
  position: relative;
  isolation: isolate;
  transition:
    border-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

.chip[aria-pressed="true"] {
  background-color: var(--bg);
}

.chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-base) var(--ease-out);
}

.chip[aria-pressed="true"]::before {
  transform: scaleY(1);
}
/* END MOTION: chip */

/* MOTION: select */
/* Custom "Vrsta usluge" picker (assets/js/select.js, Contact page, hover + fine pointer
   only). The closed field is the existing .field__control inside .field__select, so it
   keeps the 58 px height, frame, focus and error states; no hover state. The panel is
   absolute below the field (no layout change) and draws over the fields below. */
.select__button {
  display: block;
  text-align: left;
}

.select__button.is-placeholder {
  color: var(--text-muted);
}

.select__value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field__select.is-enhanced .field__select-arrow {
  transition: transform var(--dur-base) var(--ease-out);
}

.field__select.is-open .field__select-arrow {
  transform: rotate(0.5turn);
}

.select__list {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: var(--z-dropdown);
  margin: 0;
  border: var(--border-thin) solid var(--text);
  border-radius: var(--radius-0);
  background-color: var(--bg);
  clip-path: inset(0 0 100% 0);
  transition: clip-path var(--dur-base) var(--ease-out);
}

.field__select.is-open .select__list {
  clip-path: inset(0);
}

/* Closing: reverse clip, shorter, no stagger (options stay visible while it runs). */
.field__select.is-closing .select__list,
.field__select.is-closing .field__select-arrow {
  transition-duration: var(--dur-fast);
}

.select__option {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  height: var(--option-h);
  padding-inline: var(--space-3);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(var(--space-2));
}

.field__select.is-open .select__option,
.field__select.is-closing .select__option {
  opacity: 1;
  transform: none;
}

/* Options come in one after another: delay = index × half of --stagger. */
.field__select.is-open .select__option {
  transition:
    opacity var(--dur-base) var(--ease-out) calc(var(--i, 0) * var(--stagger) / 2),
    transform var(--dur-base) var(--ease-out) calc(var(--i, 0) * var(--stagger) / 2);
}

/* Active option (mouse or keyboard): --bg-alt fill from the left, text moves right. */
.select__option::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-alt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out);
}

.select__option.is-active::before {
  transform: scaleX(1);
}

.select__option-text {
  transition: transform var(--dur-fast) var(--ease-out);
}

.select__option.is-active .select__option-text {
  transform: translateX(var(--space-2));
}

/* Selected option: small check in --text on the right. */
.select__check {
  flex-shrink: 0;
  width: var(--icon-size-s);
  height: var(--icon-size-s);
  visibility: hidden;
}

.select__option[aria-selected="true"] .select__check {
  visibility: visible;
}

/* Reduced motion: open and close at once, no clip, no stagger, no movement. */
@media (prefers-reduced-motion: reduce) {
  .select__list,
  .field__select.is-open .select__list {
    clip-path: none;
  }

  .field__select.is-open .select__option {
    transition-delay: 0s;
  }

  .select__option,
  .select__option.is-active .select__option-text {
    transform: none;
  }
}
/* END MOTION: select */

/* MOTION: press */
/* Touch devices only (no hover): short pressed state while a finger is down.
   Buttons, chips and project cards shrink slightly; links fade. transform/opacity
   only, so size and layout never change. The grey tap flash is removed only on
   these elements; :focus-visible stays. motion.js adds an empty touchstart
   listener so iOS Safari applies :active. */
@media (hover: none) {
  .btn,
  .chip,
  .card,
  .footer__link,
  .footer__top-link,
  .footer__contact a,
  .link-arrow,
  .mobile-menu__link {
    -webkit-tap-highlight-color: transparent;
  }

  .btn,
  .chip,
  .card {
    transition-property: color, border-color, transform;
    transition-duration: var(--dur-base), var(--dur-base), var(--dur-fast);
    transition-timing-function: var(--ease-out);
  }

  .btn:active,
  .chip:active,
  .card:active {
    transform: scale(var(--press-scale));
  }

  .footer__link,
  .footer__top-link,
  .footer__contact a,
  .link-arrow,
  .mobile-menu__link {
    transition-property: color, opacity;
    transition-duration: var(--dur-fast);
    transition-timing-function: var(--ease-out);
  }

  .footer__link:active,
  .footer__top-link:active,
  .footer__contact a:active,
  .link-arrow:active,
  .mobile-menu__link:active {
    opacity: var(--press-opacity);
  }
}
/* END MOTION: press */

/* MOTION: menu */
/* Hamburger → X while the menu is open (aria-expanded="true", set by menu.js): the top
   and bottom bars move to the middle and turn, the middle bar fades. The full-screen
   menu fades in over it with its own X in the same spot. Menu links come in one after
   another once the menu has faded in; on close they fade out quickly, no stagger.
   --i on each item comes from motion.js. */
.menu-toggle rect {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform var(--dur-base) var(--ease-out),
    opacity var(--dur-base) var(--ease-out);
}

.menu-toggle[aria-expanded="true"] rect:nth-child(1) {
  transform: translateY(var(--space-2)) rotate(0.125turn);
}

.menu-toggle[aria-expanded="true"] rect:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] rect:nth-child(3) {
  transform: translateY(calc(-1 * var(--space-2))) rotate(-0.125turn);
}

.mobile-menu__list > li {
  opacity: 0;
  transform: translateY(var(--space-2));
  transition:
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.mobile-menu.is-open .mobile-menu__list > li {
  opacity: 1;
  transform: none;
  transition-duration: var(--dur-base);
  transition-delay: calc(var(--dur-base) + var(--i, 0) * var(--stagger));
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu.is-open .mobile-menu__list > li {
    transition-delay: 0s;
  }

  .mobile-menu__list > li {
    transform: none;
  }
}
/* END MOTION: menu */
