/* Realization detail: one template for every aquarium. Story first (name, meaning, chapters, photos,
   build stages, life and care, a voice), technical details at the end, then the way to other projects.
   Same surfaces, hairlines and type scale as the rest of the site. */
.case-head, .case-story, .case-gallery, .case-process, .case-life, .case-care, .case-specs, .case-next { font-family: Satoshi, Arial, sans-serif; }
.case-label { max-width: none; margin: 0; color: #8f8f8d; font-size: 10px; letter-spacing: .13em; line-height: 1.4; text-transform: uppercase; }
.case-heading { margin-bottom: 20px; }
.case-heading h2 { max-width: none; font-family: Satoshi, Arial, sans-serif; font-size: clamp(34px, 3.2vw, 50px); font-weight: 500; letter-spacing: -.035em; line-height: 1.12; }
.case-heading p { max-width: 620px; margin: 8px 0 0; color: #a9a9a7; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.45; }

/* Head: the Realizace card at full size, so everything that matters is on the first screen:
   photos to click through on the left; label, name, the story in one line, three points, facts
   and a small index of the page on the right. */
.case-head { padding-top: clamp(28px, 3.4vw, 52px); }
.case-intro { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); padding: 10px; border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; }
.case-intro .project-gallery { aspect-ratio: 3 / 2; }
.case-intro-body { display: flex; flex-direction: column; min-width: 0; padding: 26px 30px 18px 40px; }
.case-intro-body h1 { margin: 12px 0 0; font-family: Astronoma, Arial, sans-serif; font-size: clamp(44px, 4.6vw, 72px); font-weight: 700; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
.case-subtitle { max-width: 18em; margin: 12px 0 0; color: #f5f5f0; font-size: clamp(20px, 1.7vw, 26px); letter-spacing: -.025em; line-height: 1.22; text-wrap: balance; }
.case-index { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; padding-top: 18px; border-top: 1px solid #ffffff1a; font-size: 13px; }
.case-index a { padding-bottom: 3px; border-bottom: 1px solid #ffffff38; color: #e9e9e4; transition: border-color .4s; }
.case-index a:hover, .case-index a:focus-visible { border-color: #f5f5f0; }

/* Story: the meaning of the name as the section heading, then four rows in one card. The chapter word sits
   in a fixed left column, so the eye runs down Zadání, Výzva, Řešení, Výsledek; the headline and detail follow. */
.case-story { padding-block: var(--section-space); }
.case-chapters { padding: 4px 32px 4px 52px; border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; }
.case-chapter { position: relative; --tick: calc(26px + clamp(22px, 1.9vw, 28px) * .6); display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 32px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid #ffffff14; }
.case-chapter:last-child { border-bottom: 0; }
.case-chapter h3 { margin: 0; color: #f5f5f0; font-size: clamp(22px, 1.9vw, 28px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.case-chapter h3 sup { margin-left: 5px; color: #8f8f8d; font-size: 10px; font-weight: 400; letter-spacing: .08em; vertical-align: 1.3em; font-variant-numeric: tabular-nums; }
/* A fine thread down the left edge ties the chapters into one story: a short mark at each chapter and a line
   running on to the next. On first view the thread draws itself from Zadání down to Výsledek. */
.case-chapter::before, .case-chapter::after { content: ""; position: absolute; left: -26px; top: var(--tick); background: #ffffff8c; }
.case-chapter::before { width: 10px; height: 1px; transition: opacity .5s calc(var(--i) * 350ms); }
.case-chapter::after { width: 1px; height: 100%; background: #ffffff38; transform-origin: top; transition: transform .7s cubic-bezier(.22, 1, .36, 1) calc(var(--i) * 350ms + 150ms); }
.case-chapter:last-child::after { content: none; }
.js-motion .case-chapters:not(.is-visible) .case-chapter::before { opacity: 0; }
.js-motion .case-chapters:not(.is-visible) .case-chapter::after { transform: scaleY(0); }
.case-chapter-lead { max-width: none; margin: 0; color: #f5f5f0; font-size: clamp(18px, 1.45vw, 21px); letter-spacing: -.02em; line-height: 1.3; }
.case-chapter p:not(.case-chapter-lead) { max-width: 44em; margin: 8px 0 0; color: #a4a4a1; font-size: 15px; line-height: 1.6; }

/* A voice from the place next to the chapters. Both cards share one height: the photo takes whatever the
   chapters leave over, the quote sits at the bottom, level with the last chapter. */
.case-story-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 16px; }
.case-quote-card { display: flex; flex-direction: column; padding: 10px 10px 0; border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; }
.case-quote-card > img { display: block; flex: 1 1 0; width: 100%; min-height: 220px; border-radius: 6px; object-fit: cover; object-position: 30% 30%; }
.case-quote-card figure { margin: 0; padding: 22px 18px 22px; }
.case-quote-card blockquote { margin: 14px 0 0; }
.case-quote-card blockquote p { max-width: none; margin: 0; color: #f5f5f0; font-size: clamp(21px, 1.75vw, 27px); font-weight: 500; letter-spacing: -.03em; line-height: 1.22; text-indent: -.4em; text-wrap: pretty; }
.case-quote-card figcaption { margin-top: 22px; padding-top: 16px; border-top: 1px solid #ffffff1a; color: #a4a4a1; font-size: 13px; line-height: 1.45; }
.case-quote-card figcaption strong { display: block; margin-bottom: 3px; color: #f5f5f0; font-size: 15px; font-weight: 500; }

/* Gallery: an even grid that holds any number of photos; six at first, the rest on request.
   A click opens the photo full size. */
.case-gallery { padding-bottom: var(--section-space); }
.case-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.case-shot[hidden] { display: none; }
.case-shot button { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 8px; background: #131415; cursor: zoom-in; }
.case-shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
.case-shot button:hover img, .case-shot button:focus-visible img { transform: scale(1.03); }
.case-shot button:focus-visible { outline: 1px solid #f5f5f0; outline-offset: 3px; }
.case-more { margin-top: 20px; font-size: 13px; }

.case-lightbox { width: min(1280px, calc(100% - 32px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: visible; border: 0; background: transparent; }
.case-lightbox::backdrop { background: #0b0c0de8; backdrop-filter: blur(6px); }
.case-lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 110px); margin: 0 auto; border-radius: 8px; object-fit: contain; }
.case-lightbox-count { margin: 14px 0 0; color: #a4a4a1; font-family: Satoshi, Arial, sans-serif; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.case-lightbox-btn { position: absolute; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: #f5f5f0eb; box-shadow: 0 2px 12px #00000040; cursor: pointer; }
.case-lightbox-btn svg { width: 15px; height: 15px; fill: none; stroke: #131415; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.case-lightbox-prev { top: calc(50% - 21px - 18px); left: 14px; }
.case-lightbox-next { top: calc(50% - 21px - 18px); right: 14px; }
.case-lightbox-close { top: 14px; right: 14px; }
.case-lightbox-btn:focus-visible { outline: 1px solid #f5f5f0; outline-offset: 3px; }

/* Build stages as seven tall columns. Each holds a little more water than the one before, from an empty
   wall to a full tank; a fine bright line marks the surface. The levels rise one after another when the
   section comes into view (and simply stand there for people who prefer less motion). */
.case-process { padding-bottom: var(--section-space); }
.case-stages { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.case-stage { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 360px; padding: 20px 16px; overflow: hidden; border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; }
.case-stage-index { max-width: none; margin: 0; color: #8f8f8d; font-size: 10px; letter-spacing: .13em; font-variant-numeric: tabular-nums; }
.case-stage h3 { margin: 10px 0 0; color: #f5f5f0; font-size: clamp(16px, 1.25vw, 19px); font-weight: 400; letter-spacing: -.02em; line-height: 1.2; }
.case-stage p:not(.case-stage-index) { max-width: none; margin: 8px 0 0; color: #a4a4a1; font-size: 13px; line-height: 1.5; }
.case-stage-water { position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; height: var(--level); overflow: hidden; border-top: 1px solid #ffffff59; background: linear-gradient(180deg, #ffffff12, #ffffff06); transform-origin: bottom; transition: transform 1.1s cubic-bezier(.22, 1, .36, 1) calc(var(--i) * 90ms); }
.case-stage-water img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.js-motion .case-stages:not(.is-visible) .case-stage-water { transform: scaleY(0); }

/* Who lives here: a cross-section of the tank, surface at the top. The bright top edge is the water line
   from the build stages; every level below is a shade deeper. The level names run down the left column
   like the story chapters, so the eye reads Hladina, Volná voda, Kořeny a sklo, Dno. */
.case-life { padding-bottom: var(--section-space); }
.case-depth { margin: 0; padding: 0; overflow: hidden; border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; list-style: none; }
.case-zone { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); transition: opacity .9s calc(var(--i) * 120ms); }
.case-zone + .case-zone { border-top: 1px solid #ffffff12; }
.case-zone > .case-label { padding: 30px 28px; border-right: 1px solid #ffffff1a; background: rgb(255 255 255 / calc(.085 - var(--i) * .022)); }
.case-zone:first-child > .case-label { box-shadow: inset 0 1px #ffffff73; }
.case-zone-list { padding: 26px 32px; }
.case-zone-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; align-content: center; }
.case-zone h3 { margin: 0; color: #f5f5f0; font-size: clamp(20px, 1.7vw, 25px); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.case-zone-list p { max-width: 26em; margin: 6px 0 0; color: #a4a4a1; font-size: 15px; line-height: 1.55; }
.js-motion .case-depth:not(.is-visible) .case-zone { opacity: 0; }

/* Care today: what is on us and what is on the client, side by side. The full list against two words
   is the point: the client's column stays nearly empty. */
.case-care { padding-bottom: var(--section-space); }
.case-care-card { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; }
.case-care-ours, .case-care-theirs { padding: 28px 32px 32px; }
.case-care-theirs { border-left: 1px solid #ffffff1a; background: #ffffff08; }
.case-care-ours ul { margin: 14px 0 0; padding: 0; list-style: none; }
.case-care-ours li { padding: 13px 0; border-bottom: 1px solid #ffffff12; color: #e9e9e4; font-size: clamp(17px, 1.35vw, 20px); letter-spacing: -.015em; line-height: 1.35; }
.case-care-ours li:last-child { border-bottom: 0; padding-bottom: 0; }
.case-care-big { max-width: none; margin: 18px 0 0; color: #f5f5f0; font-size: clamp(34px, 3.2vw, 50px); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.case-care-theirs p:not(.case-label):not(.case-care-big) { max-width: 20em; margin: 10px 0 0; color: #a4a4a1; font-size: 15px; line-height: 1.55; }


/* Technical details at the end, for whoever wants them. */
.case-specs { padding-bottom: var(--section-space); }
.case-spec-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 28px; margin: 0; padding: 28px 30px; border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; }
.case-spec-list div { padding-top: 14px; border-top: 1px solid #ffffff14; }
.case-spec-list dt { margin-bottom: 6px; color: #8f8f8d; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.case-spec-list dd { margin: 0; color: #e9e9e4; font-size: 16px; line-height: 1.4; font-variant-numeric: tabular-nums; }

/* Other projects. */
.case-next { padding-bottom: var(--section-space); }
.case-next-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.case-next-card { display: block; padding: 10px 10px 22px; border: 1px solid #ffffff1a; border-radius: 10px; background: #18191a; transition: border-color .6s; }
.case-next-card:hover, .case-next-card:focus-visible { border-color: #ffffff3d; }
.case-next-photo { overflow: hidden; aspect-ratio: 16 / 10; border-radius: 6px; background: #131415; }
.case-next-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.case-next-card:hover img { opacity: .94; }
.case-next-text { padding: 18px 8px 0; }
.case-next-text p:first-child { max-width: none; margin: 0 0 10px; color: #8f8f8d; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.case-next-text h3 { margin: 0; font-family: Astronoma, Arial, sans-serif; font-size: clamp(24px, 2vw, 32px); font-weight: 700; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
.case-next-subtitle { max-width: 22em; margin: 10px 0 0; color: #d6d6d1; font-size: clamp(16px, 1.3vw, 19px); letter-spacing: -.02em; line-height: 1.3; }

@media (max-width: 1000px) and (min-width: 761px) {
  .case-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-intro { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 8px; }
  .case-intro .project-gallery { aspect-ratio: auto; min-height: 100%; }
  .case-intro-body { padding: 16px 14px 10px 24px; }
  .case-stages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .case-stage { min-height: 280px; }
  .case-spec-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-story-grid { grid-template-columns: 1fr; }
  .case-quote-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 8px; }
  .case-quote-card > img { height: 100%; }
  .case-quote-card figure { padding: 14px 12px 10px 22px; }
}
@media (max-width: 760px) {
  .case-intro { display: block; padding: 7px 7px 20px; border-radius: 9px; }
  .case-intro-body { padding: 18px 9px 0; }
  .case-intro-body h1 { font-size: 44px; }
  .case-subtitle { font-size: 20px; }
  .case-chapters { padding: 2px 18px 2px 34px; border-radius: 9px; }
  .case-chapter { --tick: 33px; grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .case-chapter::before, .case-chapter::after { left: -20px; }
  .case-chapter::before { width: 8px; }
  .case-chapter h3 { font-size: 22px; }
  .case-chapter-lead { font-size: 18px; }
  .case-heading h2 { font-size: 34px; }
  .case-shots { grid-template-columns: 1fr 1fr; gap: 8px; }
  .case-more { width: 100%; justify-content: space-between; }
  .case-lightbox-btn { width: 36px; height: 36px; }
  .case-lightbox-prev { left: 8px; }
  .case-lightbox-next { right: 8px; }
  .case-lightbox-close { top: 8px; right: 8px; }
  /* Phone: rows under each other; the water becomes a thin level along the bottom edge, filling left to right. */
  .case-stages { grid-template-columns: 1fr; gap: 8px; }
  .case-stage { min-height: 0; padding: 16px 16px 20px; border-radius: 9px; }
  .case-stage h3 { margin-top: 6px; font-size: 17px; }
  .case-stage-water { right: auto; width: var(--level); height: 3px; border-top: 0; background: #ffffff66; transform-origin: left; }
  .case-stage-water img { display: none; }
  .js-motion .case-stages:not(.is-visible) .case-stage-water { transform: scaleX(0); }
  .case-depth { border-radius: 9px; }
  .case-zone { grid-template-columns: 1fr; }
  .case-zone > .case-label { padding: 10px 18px; border-right: 0; }
  .case-zone-list { grid-template-columns: 1fr; gap: 14px; padding: 16px 18px 20px; }
  .case-zone h3 { font-size: 20px; }
  .case-care-card { grid-template-columns: 1fr; border-radius: 9px; }
  .case-care-ours, .case-care-theirs { padding: 22px 18px; }
  .case-care-theirs { border-top: 1px solid #ffffff1a; border-left: 0; }
  .case-care-big { margin-top: 12px; font-size: 34px; }
  .case-story-grid { grid-template-columns: 1fr; gap: 10px; }
  .case-quote-card { display: block; padding: 7px 7px 0; border-radius: 9px; }
  .case-quote-card > img { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .case-quote-card figure { padding: 18px 9px 20px; }
  .case-quote-card blockquote p { font-size: 22px; }
  .case-spec-list { grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px 18px; border-radius: 9px; }
  .case-next-grid { grid-template-columns: 1fr; gap: 10px; }
  .case-next-card { padding: 7px 7px 18px; border-radius: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-next-card, .case-next-photo img, .case-shot img, .case-stage-water, .case-zone, .case-chapter::before, .case-chapter::after { transition: none; }
}
