/* deart studio — pages.css
   Page-specific sections. Values come only from tokens.css via var(--...). */

/* ---------- Home: hero ---------- */

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding-top: var(--space-6);
  padding-bottom: var(--space-7);
}

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

/* Intentional exception to the global text-wrap: balance on headings:
   line breaks must follow the Figma layout. */
.hero__title {
  max-width: var(--hero-title-max);
  text-wrap: wrap;
}

.hero__text {
  max-width: var(--text-max);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-muted);
}

.hero__cta {
  align-self: stretch;
}

/* ---------- Home: portfolio ---------- */

.portfolio__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-block: var(--space-7);
}

.portfolio__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(var(--portfolio-cols), minmax(0, 1fr));
  gap: var(--space-4);
}

/* Mobile shows only the first four cards. */
.portfolio__grid > li:nth-child(n + 5) {
  display: none;
}

/* ---------- Home: services ---------- */

.services__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-block: var(--space-7);
}

.services__list {
  border-top: var(--border-thin) solid var(--line);
}

.services__list > li {
  border-bottom: var(--border-thin) solid var(--line);
}

/* Mobile: title + arrow on one row, description below. */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title arrow"
    "text  text";
  align-items: start;
  row-gap: var(--space-3);
  padding-block: var(--space-4);
  text-decoration: none;
}

.service__title {
  grid-area: title;
  transition: color var(--dur-fast) var(--ease-out);
}

/* Text glyph in the heading style (Geist U+2197, loaded from geist-arrow.woff2). */
.service__arrow {
  grid-area: arrow;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  transition:
    color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.service__text {
  grid-area: text;
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-muted);
}

@media (min-width: 1024px) {
  .services__inner {
    gap: var(--space-6);
    padding-block: var(--space-8);
  }

  /* 12-column grid: title 1–5, description 6–11, arrow 12. */
  .service {
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    grid-template-areas: none;
    column-gap: var(--gutter);
    row-gap: 0;
    padding-block: var(--space-5);
  }

  .service__title {
    grid-area: auto;
    grid-column: 1 / 6;
  }

  .service__text {
    grid-area: auto;
    grid-column: 6 / 12;
    font-size: var(--fs-body);
    line-height: var(--lh-body);
  }

  .service__arrow {
    grid-area: auto;
    grid-column: 12;
    justify-self: end;
  }

  .service:focus-visible .service__title,
  .service:focus-visible .service__arrow {
    color: var(--accent);
    opacity: 1;
  }
}

/* Desktop with a pointer: arrow hidden at rest, appears with the title colour change. */
@media (min-width: 1024px) and (hover: hover) {
  .service__arrow {
    opacity: 0;
  }

  .service:hover .service__title,
  .service:hover .service__arrow {
    color: var(--accent);
    opacity: 1;
  }
}

/* ---------- Home: process ("Kako radimo") ---------- */
/* No Figma frame: approved by text (see CLAUDE.md). Same spacing as the services section.
   Each step starts with a thin --line on top; the line is ::before (absolute), so the
   space under it is the step's padding and drawing it never changes the layout. */
.process__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-block: var(--space-7);
}

.process__title {
  margin-bottom: var(--space-5);
}

.process__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
}

.process__step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: var(--space-4);
}

.process__step::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: var(--border-thin);
  background-color: var(--line);
}

.process__num {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--text-muted);
}

.process__step-title {
  margin-top: var(--space-3);
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  letter-spacing: normal;
  color: var(--text);
}

.process__text {
  margin-top: var(--space-2);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-muted);
}

.process__note {
  margin-top: var(--space-5);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-muted);
}

.process__call {
  margin-top: var(--space-4);
}

@media (min-width: 1024px) {
  .process__inner {
    padding-block: var(--space-8);
  }

  .process__title {
    margin-bottom: var(--space-6);
  }

  /* 12-column grid, each step 3 columns. */
  .process__list {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    align-items: start;
    column-gap: var(--gutter);
  }

  .process__step {
    grid-column: span 3;
  }
}

/* ---------- Home: about ---------- */

.about {
  background-color: var(--bg-alt);
}

.about__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-block: var(--space-7);
}

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

.about__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about__title {
  max-width: var(--about-title-max);
}

.about__text {
  max-width: var(--text-max);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-muted);
}

@media (min-width: 1024px) {
  /* 12-column grid: label 1–4, text block 5–12, aligned to the top. */
  .about__inner {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    align-items: start;
    column-gap: var(--gutter);
    padding-block: var(--space-8);
  }

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

  .about__body {
    grid-column: 5 / 13;
    gap: var(--space-5);
  }

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

/* ---------- Home: CTA ---------- */

.cta__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-block: var(--space-7);
}

/* h2 styled as h1. Intentional exception to the global text-wrap: balance
   on headings: line breaks must follow the Figma layout. */
.cta__title {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  text-wrap: wrap;
}

.cta__btn {
  align-self: stretch;
}

@media (min-width: 1024px) {
  /* 12-column grid: title in columns 1–8, button on its own row, left. */
  .cta__inner {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    column-gap: var(--gutter);
    row-gap: var(--space-5);
    padding-block: var(--space-8);
  }

  .cta__title {
    grid-column: 1 / 9;
  }

  .cta__btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (min-width: 1024px) {
  .portfolio__inner {
    gap: var(--space-6);
    padding-block: var(--space-8);
  }

  .portfolio__grid > li:nth-child(n + 5) {
    display: block;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    padding-top: var(--space-8);
    padding-bottom: var(--hero-pad-bottom-desktop);
  }

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

  .hero__cta {
    align-self: flex-start;
  }
}

/* ---------- Page intro (Kontakt, Portfolio) ---------- */

.page-intro__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding-block: var(--space-6);
}

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

/* Intentional exception to the global text-wrap: balance on headings:
   line breaks must follow the Figma layout. */
.page-intro__title {
  max-width: var(--hero-title-max);
  text-wrap: wrap;
}

.page-intro__text {
  max-width: var(--text-max);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text-muted);
}

/* ---------- Contact: form + info ---------- */

/* Mobile: source order (form, then info). */
.contact-main__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-bottom: var(--space-7);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contact-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

.contact-form__submit {
  align-self: stretch;
}

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

/* Send error (below the button), no frame. Approved by text, not in Figma (see CLAUDE.md).
   First line in --accent-pressed like the field errors, second in --text. */
.contact-form__status {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
}

.contact-form__status[hidden] {
  display: none;
}

.contact-form__status-title {
  color: var(--accent-pressed);
}

/* E-mail link: no underline, no hover; focus ring from base.css. */
.contact-form__status a {
  text-decoration: none;
}

/* Success message (cloned from #form-success-template into .form-success, which is
   the role="status" live region). Replaces the Figma frame "Contact - Success";
   approved by text (see CLAUDE.md). No frame. */
.form-success {
  scroll-margin-top: var(--space-4);
}

.form-success__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.form-success__mark {
  display: block;
  color: var(--accent);
}

.form-success__mark svg {
  display: block;
  width: auto;
  height: var(--success-mark-h);
}

.form-success__title {
  margin-top: var(--space-4);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  color: var(--text);
  text-wrap: balance;
}

.form-success__text {
  margin-top: var(--space-4);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
}

.form-success__text + .form-success__text {
  margin-top: var(--space-2);
}

.form-success__text--muted {
  color: var(--text-muted);
}

.form-success__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  font-style: normal;
}

.contact-info__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

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

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

.contact-info__value {
  margin: 0;
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
}

.contact-info__value a {
  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) {
  .contact-info__value a:hover {
    color: var(--accent);
  }
}

@media (min-width: 1024px) {
  .page-intro__inner {
    padding-top: var(--space-8);
    padding-bottom: var(--space-7);
  }

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

  /* 12-column grid: info 1–4 on the left, form 5–12, both on row 1. */
  .contact-main__inner {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    align-items: start;
    gap: var(--gutter);
    padding-bottom: var(--space-8);
  }

  .contact-main__form {
    grid-column: 5 / 13;
    grid-row: 1;
  }

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

  .contact-info {
    grid-column: 1 / 5;
    grid-row: 1;
  }

  .contact-form__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--gutter);
  }

  .contact-form__submit {
    align-self: flex-start;
  }
}

/* ---------- Portfolio: projects ---------- */

.projects__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-bottom: var(--space-7);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Hidden items (li[hidden]) drop out, so the grid closes the gaps itself. */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(var(--portfolio-cols), minmax(0, 1fr));
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .projects__inner {
    gap: var(--space-6);
    padding-bottom: var(--space-8);
  }
}

/* ---------- Portfolio: photo view ("Photo / Video" chip) ---------- */
/* No Figma frame: approved by text (see CLAUDE.md). Shown instead of the card grid when
   the Photo / Video chip is active (portfolio-filter.js; html.is-photo-view is set in
   <head> when the address already asks for it, so the swap never shows on load). */
.projects--photo .projects__inner,
html.is-photo-view .projects__inner {
  padding-bottom: 0;
}

html.is-photo-view .projects__grid {
  display: none;
}

/* !important: beats the global [hidden] rule in base.css until portfolio-filter.js
   removes the hidden attribute and the html.is-photo-view class. */
html.is-photo-view .photo-view[hidden] {
  display: block !important;
}

.photo-view {
  padding-top: var(--space-5);
  padding-bottom: var(--space-7);
}

.photo-view__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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

.photo-view .photo-strip {
  margin-top: var(--space-5);
}

@media (min-width: 1024px) {
  .photo-view {
    padding-top: var(--space-6);
    padding-bottom: var(--space-8);
  }

  /* 12 columns: title 1–5, text 8–12. */
  .photo-view__head {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    align-items: start;
    column-gap: var(--gutter);
  }

  .photo-view__title {
    grid-column: 1 / 6;
  }

  .photo-view__text {
    grid-column: 8 / 13;
    font-size: var(--fs-body);
    line-height: var(--lh-body);
  }

  .photo-view .photo-strip {
    margin-top: var(--space-6);
  }
}

/* ---------- Photo strip (portfolio photo view and series pages) ---------- */
/* A horizontal row of 2:3 images. The first image starts at the left edge of the content
   column and the row runs to the right edge of the screen (bleed). Only the row scrolls
   sideways; the page never does. Scroll-snap aligns items to the content edge.
   photo-strip.js adds mouse dragging, the previous/next buttons and arrow keys; without
   it the row is a plain horizontal scroller. */
.photo-strip {
  --photo-strip-start: max(var(--page-margin), calc((100% - var(--container-max)) / 2));
}

.photo-strip__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: var(--photo-strip-start);
  padding-inline: var(--photo-strip-start) var(--page-margin);
  scrollbar-width: none;
}

.photo-strip__viewport::-webkit-scrollbar {
  display: none;
}

.photo-strip__list {
  display: flex;
  gap: var(--gutter);
  width: max-content;
}

/* min-content: the item is as wide as its image; captions wrap inside it. */
.photo-strip__item {
  flex: none;
  width: min-content;
  scroll-snap-align: start;
}

.photo-strip__link {
  display: block;
  text-decoration: none;
}

.photo-strip__media {
  display: block;
  height: var(--photo-strip-h);
  aspect-ratio: var(--ratio-photo);
  overflow: hidden;
  background-color: var(--card-image-bg);
}

.photo-strip__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-strip__title {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  color: var(--text);
}

.photo-strip__meta {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-muted);
}

/* Previous / next: pointer devices only. They keep their space before photo-strip.js is
   ready (visibility), so nothing moves when they appear. */
.photo-strip__controls {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .photo-strip__controls {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-4);
    visibility: hidden;
  }

  .photo-strip.is-ready .photo-strip__controls {
    visibility: visible;
  }

  .photo-strip.is-ready .photo-strip__viewport {
    cursor: grab;
  }

  .photo-strip.is-dragging .photo-strip__viewport {
    cursor: grabbing;
    scroll-snap-type: none;
    user-select: none;
  }
}

.photo-strip__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  padding: 0;
  border: var(--border-thin) solid var(--text);
  border-radius: var(--radius-0);
  background: none;
  color: var(--text);
}

.photo-strip__btn svg {
  width: var(--icon-size);
  height: var(--icon-size);
}

.photo-strip__btn[aria-disabled="true"] {
  border-color: var(--line);
  color: var(--text-muted);
  cursor: default;
}

/* ---------- Photo series page ---------- */
.series-strip {
  padding-bottom: var(--space-7);
}

.series-nav__inner {
  padding-bottom: var(--space-7);
}

.series-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-5);
  row-gap: var(--space-4);
  padding-top: var(--space-5);
  border-top: var(--border-thin) solid var(--line);
}

/* "Back to portfolio" sits at the far end on wide screens. */
.series-nav__back {
  margin-left: auto;
}

@media (min-width: 1024px) {
  .series-strip {
    padding-bottom: var(--space-8);
  }

  .series-nav__inner {
    padding-bottom: var(--space-8);
  }
}

/* ---------- Project page: meta strip ---------- */

.project-meta__inner {
  padding-bottom: var(--space-7);
}

/* Mobile: 2 columns. Values wrap and the block grows (approved deviation:
   Figma clips them at one line). */
.project-meta__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  column-gap: var(--gutter);
  row-gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--border-thin) solid var(--line);
}

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

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

.project-meta__value {
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
  overflow-wrap: anywhere;
}

/* No underline and no hover (none in Figma); focus ring comes from base.css. */
.project-meta__value a {
  text-decoration: none;
}

/* ---------- Project page: content ---------- */

.project-content__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-bottom: var(--space-7);
}

/* Image placeholders; the fill matches the portfolio cards. */
.project-media {
  aspect-ratio: var(--ratio-media-pair);
  background-color: var(--card-image-bg);
}

.project-media--full {
  aspect-ratio: var(--ratio-media-full);
}

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

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

/* h2 styled as a small muted label. */
.project-text__label {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  letter-spacing: normal;
  color: var(--text-muted);
}

.project-text__body {
  max-width: var(--text-max);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
}

/* ---------- Project page: next project ---------- */

.project-next__inner {
  padding-bottom: var(--space-7);
}

/* Whole block is one link. No hover (none in Figma); focus ring from base.css. */
.project-next__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: var(--border-thin) solid var(--line);
  text-decoration: none;
}

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

.project-next__title {
  display: flex;
  align-items: center;
  min-height: var(--project-next-title-h);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--text);
}

@media (min-width: 1024px) {
  /* 12-column grid, each block spans 3 columns (302 at 1440). */
  .project-meta__list {
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  }

  .project-meta__item {
    grid-column: span 3;
  }

  .project-content__inner {
    padding-bottom: var(--space-8);
  }

  .project-pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  /* Label hugs its text, so the paragraph x differs per block (as in Figma). */
  .project-text {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .project-text__label {
    flex-shrink: 0;
  }

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

  .project-next__inner {
    padding-bottom: var(--space-8);
  }
}

/* ---------- Legal pages (privacy policy) ---------- */

/* Same padding as the portfolio projects section. */
.legal__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding-bottom: var(--space-7);
}

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

/* Same type as the project card title. */
.legal__title {
  font-size: var(--fs-card-title);
  line-height: var(--lh-card-title);
  letter-spacing: normal;
  color: var(--text);
}

.legal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: var(--text-max);
  font-size: var(--fs-body-small);
  line-height: var(--lh-body-small);
  color: var(--text);
}

/* Links in the policy text (e-mail, Calendly, Zoom): a permanent underline, so they stand
   out without relying on colour (WCAG 1.4.1). No hover; focus ring from base.css. */
.legal__body a {
  text-decoration: underline;
  text-decoration-thickness: var(--border-thin);
  text-underline-offset: var(--link-underline-offset);
}

@media (min-width: 1024px) {
  .legal__inner {
    padding-bottom: var(--space-8);
  }

  /* 12-column grid: heading 1–4, text 5–12. */
  .legal__item {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
    align-items: start;
    column-gap: var(--gutter);
  }

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

  .legal__body {
    grid-column: 5 / 13;
    font-size: var(--fs-body);
    line-height: var(--lh-body);
  }
}

/* ---------- Page intro: actions (404) ---------- */

/* Button + text link in one row; wraps on narrow screens. */
.page-intro__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

/* MOTION: reveal */
/* Scroll reveal for [data-reveal]. The hidden start state only exists with html.js
   (set inline in <head>), on screen, without reduced motion. motion.js adds
   .is-revealed once per element; --i (set by motion.js) staggers a batch.
   Keyframe animations, not transitions, so element transitions (button colours) stay. */
@media screen and (prefers-reduced-motion: no-preference) {
  html.js [data-reveal="text"]:not(.is-revealed) {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }

  /* Hidden with opacity, not clip-path: IntersectionObserver treats a fully clipped
     element as not intersecting, so it would never reveal. The clip runs in the animation. */
  html.js [data-reveal="media"]:not(.is-revealed) {
    opacity: 0;
  }

  html.js [data-reveal="media"]:not(.is-revealed) > * {
    transform: scale(var(--reveal-media-zoom));
  }

  html.js [data-reveal="text"].is-revealed {
    animation: reveal-text var(--reveal-dur) var(--ease-out) calc(var(--i, 0) * var(--reveal-stagger)) backwards;
  }

  html.js [data-reveal="media"].is-revealed {
    animation: reveal-media var(--reveal-dur) var(--ease-in-out) calc(var(--i, 0) * var(--reveal-stagger)) backwards;
  }

  html.js [data-reveal="media"].is-revealed > * {
    animation: reveal-media-zoom var(--reveal-dur) var(--ease-in-out) calc(var(--i, 0) * var(--reveal-stagger)) backwards;
  }
}

@keyframes reveal-text {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }
}

@keyframes reveal-media {
  from {
    clip-path: inset(0 0 100% 0);
  }
}

@keyframes reveal-media-zoom {
  from {
    transform: scale(var(--reveal-media-zoom));
  }
}
/* END MOTION: reveal */

/* MOTION: form-success */
/* After a successful send: the form fades out (contact-form.js waits for this
   transition, 0 with reduced motion), then the success block comes in with the scroll
   reveal (data-reveal on its rows, motion.js). The mark also uncovers from the bottom
   up, with the same delay as its row. The send error fades in and rises a little each
   time it appears. */
.contact-form {
  transition: opacity var(--dur-base) var(--ease-out);
}

.contact-form.is-leaving {
  opacity: 0;
}

@media screen and (prefers-reduced-motion: no-preference) {
  html.js .form-success__mark.is-revealed svg {
    animation: success-mark var(--dur-slow) var(--ease-in-out) calc(var(--i, 0) * var(--reveal-stagger)) backwards;
  }

  .contact-form__status:not([hidden]) {
    animation: status-in var(--dur-base) var(--ease-out);
  }
}

@keyframes success-mark {
  from {
    clip-path: inset(100% 0 0 0);
  }
}

@keyframes status-in {
  from {
    opacity: 0;
    transform: translateY(var(--space-2));
  }
}
/* END MOTION: form-success */

/* MOTION: services-cards */
/* Service rows on the home page (each row is one link). On hover (pointer devices) and
   on keyboard focus a --text fill grows from the bottom, like the button wipe, and
   reaches --service-fill-bleed beyond the row on both sides; it is absolute, so the
   layout never moves. The focus ring is drawn around the fill (outline on ::before).

   Text: with motion.js on pointer devices (.has-copy) the original title and text never
   change colour; a light copy of them (.service__copy, aria-hidden, text from data-text
   via ::before) lies exactly over them and is uncovered with clip-path in sync with the
   fill, so text is light exactly where the fill is. Without the copy (no JS, reduced
   motion, keyboard on touch) the text simply changes colour.

   ↗: never part of the copy (a clip would cut it when it moves). The one original ↗ is
   --accent (readable on the page and on the fill) and moves up-right by
   --card-arrow-shift. Touch: no hover; :active tints the row --bg-alt. */
.service {
  position: relative;
  isolation: isolate;
}

.service::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline: calc(-1 * var(--service-fill-bleed));
  z-index: -1;
  background-color: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--dur-base) var(--ease-out);
}

.service:focus-visible {
  outline: none;
}

.service:focus-visible::before {
  transform: scaleY(1);
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

@media (hover: hover) {
  .service:hover::before {
    transform: scaleY(1);
  }
}

/* ---- ↗ ---- */
/* Leaving: the colour goes back slowly, so it is still --accent while the fill retracts
   past the ↗ (where it is visible at rest, i.e. narrow screens with a pointer). */
.service__arrow {
  transition:
    color var(--dur-base) var(--ease-in-out),
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

/* Desktop with a pointer: hidden at rest, so it waits in --accent and only fades in. */
@media (min-width: 1024px) and (hover: hover) {
  .service__arrow {
    color: var(--accent);
  }
}

.service:focus-visible .service__arrow {
  color: var(--accent);
  opacity: 1;
  transform: translate(var(--card-arrow-shift), calc(-1 * var(--card-arrow-shift)));
  transition:
    color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

@media (hover: hover) {
  .service:hover .service__arrow {
    color: var(--accent);
    opacity: 1;
    transform: translate(var(--card-arrow-shift), calc(-1 * var(--card-arrow-shift)));
    transition:
      color var(--dur-fast) var(--ease-out),
      opacity var(--dur-fast) var(--ease-out),
      transform var(--dur-base) var(--ease-out);
  }
}

/* ---- Light copy of title and text: same grid as the row, exactly over the original ---- */
.service__copy {
  position: absolute;
  inset: 0;
  display: inherit;
  grid-template-columns: inherit;
  grid-template-areas: inherit;
  align-items: inherit;
  column-gap: inherit;
  row-gap: inherit;
  padding-block: inherit;
  pointer-events: none;
  user-select: none;
  clip-path: inset(100% 0 0 0);
  transition: clip-path var(--dur-base) var(--ease-out);
}

.service__copy [data-text]::before {
  content: attr(data-text);
}

.service.has-copy .service__copy > .service__title,
.service.has-copy .service__copy > .service__text {
  color: var(--bg);
}

.service.has-copy:focus-visible .service__copy {
  clip-path: inset(0);
}

/* The original keeps its rest colours (the copy carries the light ones). */
.service.has-copy:focus-visible > .service__title {
  color: var(--text);
}

@media (hover: hover) {
  .service.has-copy:hover .service__copy {
    clip-path: inset(0);
  }

  .service.has-copy:hover > .service__title {
    color: var(--text);
  }
}

/* ---- No copy (no JS, reduced motion, keyboard on touch): plain colour change ---- */
.service:not(.has-copy):focus-visible .service__title,
.service:not(.has-copy):focus-visible .service__text {
  color: var(--bg);
}

@media (hover: hover) {
  .service:not(.has-copy):hover .service__title,
  .service:not(.has-copy):hover .service__text {
    color: var(--bg);
  }
}

/* ---- Touch: short tint while pressed, no size change ---- */
@media (hover: none) {
  .service {
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-fast) var(--ease-out);
  }

  .service:active {
    background-color: var(--bg-alt);
  }
}

/* ---- Reduced motion: state changes at once (durations are 0); the ↗ does not move ---- */
@media (prefers-reduced-motion: reduce) {
  .service:hover .service__arrow,
  .service:focus-visible .service__arrow {
    transform: none;
  }
}
/* END MOTION: services-cards */

/* MOTION: process */
/* "Kako radimo": the steps use the scroll reveal (data-reveal, staggered per step); the
   line on top of each step draws from left to right while its step is revealed, with the
   reveal duration (--reveal-dur: --dur-slow on desktop, shorter on phones) and the same
   delay. At rest, without JS and with reduced motion the line is simply there. */
@media screen and (prefers-reduced-motion: no-preference) {
  html.js .process__step::before {
    transform-origin: left;
  }

  html.js .process__step:not(.is-revealed)::before {
    transform: scaleX(0);
  }

  html.js .process__step.is-revealed::before {
    animation: process-line var(--reveal-dur) var(--ease-in-out) calc(var(--i, 0) * var(--reveal-stagger)) backwards;
  }
}

@keyframes process-line {
  from {
    transform: scaleX(0);
  }
}
/* END MOTION: process */

/* MOTION: photo-strip */
/* Photo strip: image zoom on hover (links only, pointer devices), a short press on touch,
   smooth button/arrow scrolling (photo-strip.js reads this behaviour), and the reveal of
   the first few items (data-reveal in the HTML). Reduced motion: no zoom, no smooth
   scrolling. */
.photo-strip__media img {
  transition: transform var(--dur-slow) var(--ease-out);
}

@media (hover: hover) {
  .photo-strip__link:hover .photo-strip__media img {
    transform: scale(var(--card-zoom));
  }
}

@media (hover: none) {
  .photo-strip__link {
    -webkit-tap-highlight-color: transparent;
    transition: transform var(--dur-fast) var(--ease-out);
  }

  .photo-strip__link:active {
    transform: scale(var(--press-scale));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .photo-strip__viewport {
    scroll-behavior: smooth;
  }

  .photo-strip.is-dragging .photo-strip__viewport {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-strip__link:hover .photo-strip__media img {
    transform: none;
  }
}
/* END MOTION: photo-strip */

/* MOTION: photo-marquee */
/* Portfolio photo view (data-marquee): the strip moves on its own (photo-strip.js,
   initMarquee). No controls under this strip (design choice): it pauses on hover, focus,
   drag and touch. While it runs (.is-marquee) snap and CSS smooth scrolling are off: snap
   would fight the constant motion and smooth scrolling would animate every frame. */
.photo-strip.is-marquee .photo-strip__viewport {
  scroll-snap-type: none;
  scroll-behavior: auto;
}
/* END MOTION: photo-marquee */
