/* studiofotograf.cz – public site styles.
   Ported from the lucie-zeibich-v2 prototype (Tailwind) to plain CSS. */

/* ---------- Fonts (self-hosted, latin + latin-ext) ---------- */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../font/cormorant-garamond-italic-400-latin-ext.d4b577745e9f.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../font/cormorant-garamond-italic-400-latin.b0fa095eb2a6.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../font/cormorant-garamond-italic-600-latin-ext.9f6e4e4e6d8d.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../font/cormorant-garamond-italic-600-latin.fbcc53e0f79b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../font/cormorant-garamond-normal-400-latin-ext.e1f7cd82031b.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../font/cormorant-garamond-normal-400-latin.ec4225ec161b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../font/cormorant-garamond-normal-600-latin-ext.05dc3fd49fab.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../font/cormorant-garamond-normal-600-latin.e15c62ae5a22.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../font/dm-sans-normal-400-latin-ext.9598e1855de9.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../font/dm-sans-normal-400-latin.d4c68940b772.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../font/dm-sans-normal-500-latin-ext.65e248f8d952.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../font/dm-sans-normal-500-latin.aac44a48f4e7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;

  color-scheme: light;

  --ink: #000;
  --ink-soft: rgb(0 0 0 / 0.7);
  /* 0.56 is the lowest alpha that keeps small text at 4.5:1 on white. */
  --ink-muted: rgb(0 0 0 / 0.56);
  --line: rgb(0 0 0 / 0.08);
  --line-strong: rgb(0 0 0 / 0.15);
  --paper: #fff;
  --paper-soft: #fafafa;
  --paper-dim: #f0f0f0;

  --text-xs: 0.72rem;
  --text-sm: 0.875rem;
  --text-base: 0.9rem;

  --radius-sm: 0.75rem;
  --radius-pill: 999px;

  --dur-fast: 0.15s;
  --dur: 0.2s;
  --dur-slow: 0.55s;

  --z-header: 50;
  --z-modal: 200;
  --z-lightbox: 300;
  --dark: #161614;

  --shell-max: 80rem;
  --shell-pad: 1.25rem;
  --radius-lg: 1.5rem;
  --radius-md: 1rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 48rem) {
  :root {
    --shell-pad: 2rem;
  }
}

/* ---------- Reset & base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets would otherwise land under the fixed header. */
  scroll-padding-top: 5rem;
  /* Overlays lock body scroll; keep the gutter so the page does not jump. */
  scrollbar-gutter: stable;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--shell-pad);
  z-index: var(--z-lightbox);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-base);

  &:focus {
    top: 1rem;
  }
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  /* Matches the footer so the rounded page corners always reveal dark. */
  background-color: var(--dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: var(--z-header);
  background: rgb(255 255 255 / 0.9);
  border-bottom: 1px solid rgb(0 0 0 / 0.05);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  backdrop-filter: blur(8px);
}

.site-nav {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 1rem var(--shell-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  text-decoration: none;
  transition: color var(--dur);

  &::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.35em;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s var(--ease-out);
  }

  &:hover {
    color: rgb(0 0 0 / 0.6);
  }

  &:is(:hover, :focus-visible)::after {
    transform: scaleX(1);
  }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  transition: background var(--dur);

  &:hover {
    background: rgb(0 0 0 / 0.05);
  }

  svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgb(0 0 0 / 0.05);
  padding: 1rem var(--shell-pad);

  &.is-open,
  html:not(.js) & {
    display: block;
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: var(--text-base);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
}

/* Without JS the menu cannot open, so the links stay unfolded and the header
   scrolls away instead of covering the top of the page with them. */
html:not(.js) .menu-toggle {
  display: none;
}

html:not(.js) .site-header {
  position: static;
}

@media (min-width: 48rem) {
  .nav-links {
    display: flex;
  }

  .menu-toggle,
  .mobile-menu,
  .mobile-menu.is-open,
  html:not(.js) .mobile-menu {
    display: none;
  }
}

/* ---------- Page shell ---------- */

.page-surface {
  position: relative;
  z-index: 1;
  background: var(--paper);
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
}

.site-shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 7rem var(--shell-pad) 5rem;
}

.section-block {
  padding-block: 2.5rem;

  &.no-bottom {
    padding-bottom: 0;
  }
}

@media (min-width: 48rem) {
  .section-block {
    padding-block: 4rem;
  }
}

.section-label {
  color: var(--ink-muted);
  font-size: var(--text-base);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 48rem;
  margin-top: 1rem;
}

.lead-copy {
  max-width: 48rem;
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color var(--dur), border-color var(--dur);

  & svg {
    transition: translate 0.28s var(--ease-out);
  }

  &:hover {
    color: var(--ink);
    border-color: var(--ink-muted);
  }

  &:hover svg {
    translate: 3px 0;
  }

  svg {
    width: 0.75rem;
    height: 0.75rem;
  }
}

.more-link-row {
  margin-top: 2rem;
  text-align: center;

  &.left {
    text-align: left;
  }
}

/* Stretches a block to the full viewport width inside the shell. */
.full-bleed {
  position: relative;
  left: 50%;
  width: 100dvw;
  transform: translateX(-50%);
  overflow: hidden;
}

@media (min-width: 48rem) {
  .section-heading {
    font-size: 3rem;
    line-height: 1;
  }
}

/* ---------- Scroll reveal ---------- */

/* Stagger for .reveal; classes instead of inline styles because of the CSP. */
.delay-40 {
  --reveal-delay: 40ms;
}

.delay-60 {
  --reveal-delay: 60ms;
}

.delay-80 {
  --reveal-delay: 80ms;
}

.delay-100 {
  --reveal-delay: 100ms;
}

.delay-120 {
  --reveal-delay: 120ms;
}

.delay-140 {
  --reveal-delay: 140ms;
}

.delay-160 {
  --reveal-delay: 160ms;
}

.delay-180 {
  --reveal-delay: 180ms;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s var(--ease-out) var(--reveal-delay, 0ms),
    transform 0.65s var(--ease-out) var(--reveal-delay, 0ms);

  &.in-view {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-intro.is-visible,
  .aperture-icon.is-visible,
  .contact-modal-panel,
  .contact-thanks,
  .faq-item[open] .faq-answer {
    animation: none;
  }

  .hero-frame,
  .hero-photo,
  .gallery-tile-photo,
  .gallery-tile-title,
  .gallery-card-img,
  .gallery-masonry-img,
  .lightbox-img,
  .nav-link::after {
    transition: none;
  }
}

/* ---------- Aperture divider ---------- */

.aperture-divider {
  padding-block: 2.25rem;
}

.aperture-divider-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding-inline: 2rem;

  &::before,
  &::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgb(0 0 0 / 0.1);
  }
}

.aperture-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: rgb(0 0 0 / 0.2);
  flex-shrink: 0;
  transform-origin: center;

  &.is-visible {
    animation: apertureOpen 0.7s var(--ease-out) both;
  }
}

@keyframes apertureOpen {
  from {
    transform: rotate(-45deg) scale(0.75);
    opacity: 0.3;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: 3rem;
}

.hero-intro {
  text-align: center;
  animation: fadeUpIn 0.9s var(--ease-out) both;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin-top: 1rem;
}

/* Small tracked uppercase labels: buttons, text links and back links. */
.hero-cta,
.contact-cta-btn,
.contact-form-submit,
.pricing-cta,
.more-link,
.gallery-back,
.contact-social-link {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  color: var(--ink-muted);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1rem 0.5rem 0.85rem;
  background: rgb(0 0 0 / 0.03);
  transition: color var(--dur), border-color var(--dur), background var(--dur);

  &:hover {
    color: var(--ink);
    border-color: rgb(0 0 0 / 0.35);
    background: rgb(0 0 0 / 0.06);
  }

  svg {
    width: 0.8rem;
    height: 0.8rem;
    flex-shrink: 0;
  }
}

@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Five tilted photo frames. Below 64rem only frames 2-4 are shown and they
   overlap heavily; on wide screens all five sit side by side. */
.hero-strip {
  --hero-gap: 0rem;
  --hero-overlap: clamp(10rem, 57vw, 16rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--hero-gap);
  width: 100%;
  min-height: clamp(18rem, 36vh, 24rem);
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  overflow: visible;
}

.film-frame {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.75rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.hero-frame {
  --hero-rotate: 0deg;
  --hero-hover-rotate: 0deg;
  /* A frame with a photo from a gallery is a link to it. */
  display: block;
  color: inherit;
  text-decoration: none;
  flex: 0 0 auto;
  width: clamp(14rem, 72vw, 19rem);
  aspect-ratio: 4 / 5;
  rotate: var(--hero-rotate);
  transform-origin: center bottom;
  touch-action: manipulation;
  transition-duration: 180ms;
  transition-property: translate, scale, rotate, box-shadow, filter;
  transition-timing-function: var(--ease-out);

  &.wide-only {
    display: none;
  }

  &:hover {
    z-index: 6;
    rotate: var(--hero-hover-rotate);
    translate: 0 -1rem;
    scale: 1.03;
    filter: saturate(1.06) contrast(1.02);
    box-shadow: 0 28px 45px -24px rgb(0 0 0 / 0.35), 0 12px 20px -18px rgb(0 0 0 / 0.28);
  }
}

/* Monochrome at rest, colour under the cursor; touch screens have no hover
   and would never see the colour, so they get it straight away. */
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter var(--dur-slow) var(--ease-out);
}

.hero-frame:hover .hero-photo {
  filter: none;
}

@media (hover: none) {
  .hero-photo {
    filter: none;
  }
}

.hero-frame-1 { --hero-rotate: -4.5deg; --hero-hover-rotate: -2.75deg; z-index: 1; }
.hero-frame-2 { --hero-rotate: 3.25deg; --hero-hover-rotate: 1.8deg; z-index: 3; }
.hero-frame-3 { --hero-rotate: -1.5deg; --hero-hover-rotate: -0.4deg; z-index: 5; }
.hero-frame-4 { --hero-rotate: 2.5deg; --hero-hover-rotate: 1.3deg; z-index: 4; }
.hero-frame-5 { --hero-rotate: -3.6deg; --hero-hover-rotate: -2deg; z-index: 2; }

/* Frame 2 is the first visible one below 64rem, so it gets no overlap there. */
.hero-frame-3,
.hero-frame-4,
.hero-frame-5 {
  margin-left: calc(-1 * var(--hero-overlap));
}

@media (min-width: 48rem) {
  .hero {
    padding-block: 4rem;
  }

  .hero-strip {
    --hero-overlap: clamp(9rem, 34vw, 16rem);
    min-height: clamp(24rem, 48vh, 34rem);
    padding-inline: 2rem;
  }

  .hero-frame {
    width: clamp(18rem, 56vw, 27rem);
  }
}

@media (min-width: 64rem) {
  .hero-strip {
    --hero-gap: clamp(0.15rem, 0.6vw, 0.5rem);
    --hero-overlap: clamp(1.9rem, 2.8vw, 3rem);
    align-items: flex-end;
    min-height: 0;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    padding-inline: clamp(1.75rem, 4vw, 3.25rem);
  }

  .hero-frame {
    width: calc((100% - (4 * var(--hero-gap))) / 5);
    max-height: 56vh;

    &.wide-only {
      display: block;
    }
  }

  .hero-frame-2 {
    margin-left: calc(-1 * var(--hero-overlap));
  }
}

@media (min-width: 80rem) {
  .hero-strip {
    --hero-gap: clamp(0.2rem, 0.7vw, 0.7rem);
    --hero-overlap: clamp(2.35rem, 2.9vw, 3.6rem);
    padding-inline: clamp(2.25rem, 5vw, 4.5rem);
  }
}

/* ---------- About ---------- */

.about-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 2rem;
}

.display-heading {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;

  em {
    font-style: italic;
    font-weight: 400;
  }
}

.about-photo-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 480px;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 48rem) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* ---------- Gallery tiles (home) ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

.gallery-tile {
  display: block;
  position: relative;
  height: 14rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-dim);
  text-decoration: none;
  color: inherit;
}

.gallery-tile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.gallery-tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgb(0 0 0 / 0.78) 0%, transparent 60%);
}

.gallery-tile:is(:hover, :focus-visible) {
  .gallery-tile-photo {
    transform: scale(1.05);
  }

  .gallery-tile-title {
    translate: 0 0;
  }
}

.gallery-tile-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  translate: 0 6px;
  transition: translate var(--dur-slow) var(--ease-out);
}

.gallery-tile-sub {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-top: 0.2rem;
}

@media (min-width: 48rem) {
  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 2.5rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.5rem 1.25rem;
  background: var(--paper);
  transition: background var(--dur) ease;

  &:hover {
    background: var(--paper-soft);
  }
}

.pricing-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(0 0 0 / 0.58);
}

.pricing-price {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  margin-top: 0.5rem;
}

.pricing-note {
  font-size: var(--text-sm);
  color: rgb(0 0 0 / 0.62);
  margin-top: 0.2rem;
  line-height: 1.5;
}

.pricing-includes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgb(0 0 0 / 0.07);

  li {
    position: relative;
    padding-left: 1rem;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--ink-muted);

    &::before {
      content: "—";
      position: absolute;
      left: 0;
      color: rgb(0 0 0 / 0.22);
    }
  }
}

.pricing-cta {
  display: inline-block;
  width: fit-content;
  margin-top: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgb(0 0 0 / 0.22);
  padding-bottom: 2px;
  transition: border-color var(--dur);

  &:hover {
    border-color: var(--ink);
  }
}

.pricing-page-note {
  max-width: 34rem;
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid rgb(0 0 0 / 0.1);
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--ink-muted);
}

@media (min-width: 40rem) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-card {
    padding: 2rem 1.75rem;

    /* A lone card in the last row spans the whole row. */
    &:last-child:nth-child(2n + 1) {
      grid-column: 1 / -1;
    }
  }
}

@media (min-width: 64rem) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing-card {
    &:last-child:nth-child(2n + 1) {
      grid-column: auto;
    }

    /* 1 card left in the last row: full width. */
    &:last-child:nth-child(3n + 1) {
      grid-column: 1 / -1;
    }

    /* 2 cards left in the last row: the first spans two columns. */
    &:nth-last-child(2):nth-child(3n + 1) {
      grid-column: span 2;
    }
  }
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 5rem;
}

.faq-label {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
}

.faq-heading {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);

  summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    user-select: none;

    &::-webkit-details-marker {
      display: none;
    }
  }

  &[open] > summary .faq-icon {
    transform: rotate(45deg);
  }
}

.faq-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: rgb(0 0 0 / 0.3);
  transition: transform 0.28s var(--ease-out);
}

.faq-item[open] .faq-answer {
  animation: fadeUpIn 0.3s var(--ease-out) both;
}

.faq-answer {
  max-width: 36rem;
  padding-bottom: 1.5rem;
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--ink-muted);
}

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

.contact-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0.75rem 1.75rem;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur), transform var(--dur-fast);

  &:hover {
    background: rgb(0 0 0 / 0.75);
  }

  &:active {
    transform: scale(0.98);
  }

  svg {
    width: 0.8rem;
    height: 0.8rem;
  }
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.contact-meta-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: var(--text-sm);
  color: var(--ink-muted);

  svg {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
  }
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: border-color var(--dur), background var(--dur);

  &:hover {
    border-color: rgb(0 0 0 / 0.3);
    background: var(--paper-soft);
  }
}

.contact-link-label {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.contact-link-value {
  margin-top: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}

.contact-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.contact-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem 0.45rem 0.7rem;
  color: rgb(0 0 0 / 0.6);
  text-decoration: none;
  border: 1px solid rgb(0 0 0 / 0.12);
  border-radius: var(--radius-pill);
  transition: border-color var(--dur), color var(--dur), background var(--dur);

  &:hover {
    color: var(--ink);
    border-color: rgb(0 0 0 / 0.35);
    background: rgb(0 0 0 / 0.03);
  }

  svg {
    width: 0.8rem;
    height: 0.8rem;
    flex-shrink: 0;
  }
}

@media (min-width: 48rem) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 4rem;
  }
}

/* ---------- Contact form (modal and inline fallback) ---------- */

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;

  &[hidden] {
    display: none;
  }
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.55);
  backdrop-filter: blur(6px);
}

.contact-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 2.5rem 2rem;
  background: var(--paper);
  border-radius: var(--radius-lg);
  animation: modalIn 0.35s var(--ease-out) both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.contact-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);

  &:hover {
    background: rgb(0 0 0 / 0.06);
    color: var(--ink);
  }

  svg {
    width: 1rem;
    height: 1rem;
  }
}

.contact-modal-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.contact-modal-sub {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-form-label {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Widget classes come from ContactForm in app/forms.py. */
.contact-form-input,
.contact-form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
  background: var(--paper);
  /* 0.42 keeps the field outline at 3:1 against the page. */
  border: 1px solid rgb(0 0 0 / 0.42);
  border-radius: var(--radius-sm);
  resize: none;
  transition: border-color var(--dur);

  &:focus {
    border-color: var(--ink);
  }
}

.contact-form-error {
  font-size: var(--text-sm);
  color: #b3261e;
}

/* Honeypot field: off-screen for people, visible to bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-page-form {
  max-width: 520px;
}

.contact-thanks {
  animation: modalIn 0.35s var(--ease-out) both;
}

.contact-thanks-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.contact-form-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.9rem 2rem;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur), transform var(--dur-fast), opacity var(--dur);

  &:disabled {
    opacity: 0.6;
    cursor: progress;
  }

  &:hover {
    background: rgb(0 0 0 / 0.78);
  }

  &:active {
    transform: scale(0.99);
  }
}

/* Privacy note under the submit button. */
.contact-form-note {
  margin-top: 0.75rem;
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--ink-muted);

  a {
    color: inherit;
    text-underline-offset: 0.2em;
  }
}

/* ---------- Legal text (/osobni-udaje) ---------- */

.legal-text {
  max-width: 36rem;
  margin-top: 3rem;
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--ink-soft);

  h2 {
    margin-top: 2rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
  }

  p,
  ul {
    margin-top: 0.5rem;
  }

  ul {
    padding-left: 1.25rem;
    list-style: disc;
  }

  a {
    color: inherit;
    text-underline-offset: 0.2em;
  }
}

.legal-text-updated {
  color: var(--ink-muted);
}

/* ---------- Galleries page ---------- */

/* Subpage header: label, big heading, short lead. */
.page-intro {
  max-width: 40rem;

  .display-heading {
    margin-top: 0.75rem;
  }

  .lead-copy {
    max-width: 34rem;
  }
}

.galleries-count {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.3rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 1px solid rgb(0 0 0 / 0.1);
  border-radius: var(--radius-pill);
}

/* First card is featured: full row and taller. */
.galleries-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.gallery-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper-dim);
  text-decoration: none;
  color: inherit;

  &:is(:hover, :focus-visible) .gallery-card-img {
    transform: scale(1.04);
  }
}

.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.gallery-card-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 3rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgb(0 0 0 / 0.82) 0%, transparent 100%);
  pointer-events: none;
}

.gallery-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
}

.gallery-card-sub {
  margin-top: 0.2rem;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.gallery-card-featured {
  height: clamp(20rem, 42vh, 32rem);
}

.gallery-card-regular {
  height: clamp(14rem, 28vh, 22rem);
}

@media (min-width: 40rem) {
  .galleries-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-card-featured {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .galleries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Gallery detail ---------- */

.gallery-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--dur);

  &:hover {
    color: var(--ink);
  }

  svg {
    width: 0.75rem;
    height: 0.75rem;
  }
}

.gallery-detail-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}

.gallery-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.gallery-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-sm);
  color: var(--ink-muted);

  svg {
    width: 0.85rem;
    height: 0.85rem;
    flex-shrink: 0;
  }
}

.gallery-masonry {
  columns: 1;
  column-gap: 0.75rem;
  margin-top: 3rem;
}

.gallery-masonry-item {
  position: relative;
  display: block;
  break-inside: avoid;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--paper-dim);
  cursor: pointer;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgb(0 0 0 / 0);
    transition: background 0.3s ease;
    pointer-events: none;
  }

  &:is(:hover, :focus-visible) {
    .gallery-masonry-img {
      transform: scale(1.03);
      filter: brightness(0.88);
    }

    &::after {
      background: rgb(0 0 0 / 0.06);
    }
  }
}

.gallery-masonry-img {
  width: 100%;
  height: auto;
  transition: transform var(--dur-slow) var(--ease-out), filter 0.3s ease;
}

@media (min-width: 40rem) {
  .gallery-masonry {
    columns: 2;
  }
}

@media (min-width: 64rem) {
  .gallery-masonry {
    columns: 3;
  }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgb(10 10 9 / 0.94);
  backdrop-filter: blur(12px);

  &[hidden] {
    display: none;
  }
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 88dvh;
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 40px 100px rgb(0 0 0 / 0.7);
  opacity: 0;
  scale: 0.97;
  transition: opacity 0.22s ease, scale 0.22s ease;

  &.is-loaded {
    opacity: 1;
    scale: 1;
  }
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.07);
  color: rgb(255 255 255 / 0.65);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);

  &:hover {
    background: rgb(255 255 255 / 0.16);
    color: #fff;
  }

  svg {
    width: 1rem;
    height: 1rem;
  }
}

.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;

  &.prev {
    left: 1.25rem;
  }

  &.next {
    right: 1.25rem;
  }
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.6);
  white-space: nowrap;
}

/* ---------- Page CTA strip (subpages) ---------- */

.page-cta-strip {
  text-align: center;
  padding-block: 5rem;
}

.page-cta-label {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Same voice as .display-heading, one step smaller: upright, last word italic. */
.page-cta-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 0.75rem;
  margin-bottom: 2rem;

  em {
    font-style: italic;
    font-weight: 400;
  }
}

.page-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;

  .hero-cta {
    margin-top: 0;
  }
}

/* ---------- Footer ---------- */

/* Sticky at the bottom so the white page surface slides over it. */
.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  padding: 4rem 0 2.5rem;
  background: var(--dark);
  color: rgb(255 255 255 / 0.75);
}

.footer-shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.footer-brand {
  align-self: end;
}

.footer-logo {
  height: 6rem;
  width: auto;
  filter: invert(1);
  opacity: 0.9;
  /* The SVG has inner whitespace; pull it left to align with the text. */
  margin-left: -0.4rem;
}

/* Navigation and the contact details share the right-hand column. */
.footer-side {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  justify-self: end;
  text-align: right;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-contact-link {
  color: rgb(255 255 255 / 0.72);
  text-decoration: none;
  transition: color var(--dur);

  &:hover {
    color: #fff;
  }
}

.footer-link {
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.72);
  text-decoration: none;
  transition: color var(--dur);

  &:hover {
    color: #fff;
  }
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 2rem;
}

.footer-legal {
  font-size: var(--text-xs);
  line-height: 1.7;
  color: rgb(255 255 255 / 0.5);
}

.footer-legal a {
  color: inherit;
  text-underline-offset: 0.2em;
  transition: color var(--dur);

  &:hover {
    color: #fff;
  }
}

.footer-copy {
  font-size: var(--text-xs);
  color: rgb(255 255 255 / 0.55);
  white-space: nowrap;
}

@media (min-width: 40rem) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 64rem) {
  .footer-top {
    grid-template-columns: 1fr auto;
  }
}

/* Pressed states: a small squeeze on the buttons that trigger something. */
.hero-cta:active,
.contact-modal-close:active,
.lightbox-close:active,
.menu-toggle:active {
  scale: 0.96;
}

.lightbox-nav:active {
  scale: 0.94;
}

.contact-modal-close svg {
  transition: rotate 0.28s var(--ease-out);
}

.contact-modal-close:hover svg {
  rotate: 90deg;
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .hero-cta,
  .contact-cta-btn,
  .contact-modal,
  .lightbox {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .page-surface {
    border-radius: 0;
  }
}
