@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("font/hanken-grotesk-latin-ext.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: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("font/hanken-grotesk-latin.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: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("font/spectral-400-latin-ext.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: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("font/spectral-400-latin.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;
}

@layer reset, base, layout, components, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img { display: block; max-width: 100%; height: auto; }
  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  a { color: inherit; }
}

@layer base {
  :root {
    --bg: #131a22;
    --bg-2: #1a2330;
    --ink: #ece9e2;
    --ink-2: #a3a7ad;
    --oak: #e8891d;
    --walnut: #2b3a4a;
    --brand: #e8891d;
    --rule: color-mix(in oklab, var(--ink) 14%, transparent);

    --serif: "Spectral", Georgia, "Times New Roman", serif;
    --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

    --step--1: clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
    --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
    --step-2: clamp(1.7rem, 1.4rem + 1.4vw, 2.6rem);
    --step-3: clamp(2.3rem, 1.6rem + 3vw, 4.4rem);
    --step-4: clamp(2.6rem, 1.3rem + 4.9vw, 6rem);

    --gutter: clamp(1.25rem, 4vw, 4rem);
    --section: clamp(5rem, 12vw, 11rem);
    --panel-title: clamp(1.75rem, 1.05rem + 2.1vw, 3rem);
    color-scheme: dark;
  }

  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--step-0);
    font-weight: 300;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }
  h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
  }
  h2 { font-size: var(--step-3); }
  h3 { font-size: var(--step-1); font-weight: 400; letter-spacing: -0.01em; }
  p { max-width: 58ch; text-wrap: pretty; }
  a { text-decoration: none; }
  :focus-visible { outline: 2px solid var(--oak); outline-offset: 4px; }
  ::selection { background: var(--walnut); color: var(--ink); }

  .skip {
    position: absolute; inset-inline-start: 1rem; top: -4rem;
    background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 100;
  }
  .skip:focus { top: 1rem; }
}

@layer layout {
  .top {
    position: fixed; inset-inline: 0; top: 0; z-index: 20;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: 1.1rem var(--gutter);
    color: var(--ink);
    border-bottom: 1px solid transparent;
    transition: background .45s ease, backdrop-filter .45s ease, border-color .45s ease, padding .45s ease;
  }
  .top.is-stuck {
    background: color-mix(in oklab, var(--bg) 86%, transparent);
    backdrop-filter: blur(14px) saturate(1.3);
    border-bottom-color: var(--rule);
    padding-block: .7rem;
  }
  @supports not (backdrop-filter: blur(1px)) {
    .top.is-stuck { background: color-mix(in oklab, var(--bg) 96%, transparent); }
  }
  .brand { display: inline-flex; justify-self: start; }
  .logo { height: 1.85rem; width: auto; display: block; }
  .logo-mark { display: block; height: 2rem; width: auto; margin-bottom: 1rem; }
  .nav { display: flex; gap: 2.2rem; font-size: var(--step--1); letter-spacing: .02em; }
  .nav a { position: relative; padding-block: .25rem; }
  .nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.7,0,.2,1); }
  .nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
  .top-phone { justify-self: end; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
  .burger { display: none; justify-self: end; width: 2.6rem; height: 2.6rem; position: relative; }
  .burger span, .burger span::before, .burger span::after {
    content: ""; position: absolute; left: .5rem; right: .5rem; height: 1px; background: currentColor; transition: transform .3s, top .3s;
  }
  .burger span { top: 50%; }
  .burger span::before { top: -6px; }
  .burger span::after { top: 6px; }
  .burger[aria-expanded="true"] span { background: transparent; }
  .burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
  .burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

  .mobile-nav {
    position: fixed; inset: 0; z-index: 15; background: var(--bg);
    display: grid; align-content: center; gap: 1.2rem; padding: var(--gutter);
    font-family: var(--serif); font-size: var(--step-2);
  }
  .mobile-nav[hidden] { display: none; }

  main > section { padding-inline: var(--gutter); }

  /* Hero */
  .hero {
    position: relative; min-height: 100svh; display: grid; align-content: end;
    padding-block: var(--gutter); padding-inline: var(--gutter) !important;
    isolation: isolate;
  }
  .hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
  .hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
  .hero-media::after {
    content: ""; position: absolute; inset: 0;
    background:
      linear-gradient(to bottom, color-mix(in oklab, var(--bg) 60%, transparent), transparent 22%),
      linear-gradient(to top, var(--bg) 0%, color-mix(in oklab, var(--bg) 80%, transparent) 38%, color-mix(in oklab, var(--bg) 30%, transparent) 75%),
      linear-gradient(to right, color-mix(in oklab, var(--bg) 75%, transparent), color-mix(in oklab, var(--bg) 35%, transparent) 55%, transparent 80%);
  }
  .hero-text { max-width: 72rem; }
  .hero h1 { font-size: var(--step-4); letter-spacing: -0.03em; }
  .hero h1 .line { display: block; overflow: hidden; padding-bottom: .22em; margin-bottom: -.22em; }
  .hero h1 .line > span { display: block; }
  .hero-sub { margin-top: 1.5rem; font-size: var(--step-1); color: var(--ink); max-width: 34ch; font-weight: 300; }
  .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2.2rem; margin-top: 2.2rem; }
  .hero-foot {
    display: flex; justify-content: space-between; gap: 1rem;
    margin-top: clamp(2rem, 6vw, 4rem); padding-top: 1rem; border-top: 1px solid var(--rule);
    font-size: var(--step--1); color: var(--ink-2);
  }

  /* Expanding panels */
  .panels {
    display: flex; gap: 4px; height: clamp(34rem, 78vh, 46rem);
    padding-inline: 4px !important; margin-top: 4px;
  }
  .panel--kuchyne { --img: url(img/kuchyne-bila-dub-hero-1600.webp); }
  .panel--interiery { --img: url(img/obyvak-orech-1600.webp); }
  .panel--komercni { --img: url(img/hotel-lobby-hero-1600.webp); }
  .panel {
    position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
    background: var(--bg-2) var(--img) center / cover no-repeat;
    isolation: isolate; cursor: pointer;
    transition: flex-grow .8s cubic-bezier(.7,0,.2,1);
  }
  .panel::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to top, var(--bg) 0%, color-mix(in oklab, var(--bg) 40%, transparent) 45%, color-mix(in oklab, var(--bg) 35%, transparent) 100%);
    transition: opacity .8s;
  }
  .panel.is-open { flex-grow: 3.2; cursor: default; }
  .panel-inner {
    position: absolute; inset-inline: 0; bottom: 0;
    padding: var(--gutter); display: grid; align-content: end;
  }
  .panel-head { display: block; width: max-content; text-align: left; }
  .panel-title {
    display: block; font-family: var(--serif); font-size: var(--panel-title);
    font-weight: 400; line-height: 1; letter-spacing: -0.02em; white-space: nowrap;
    transform-origin: 0 100%; rotate: 0deg;
    transition: rotate .8s cubic-bezier(.7,0,.2,1);
  }
  .panel:not(.is-open) .panel-title { rotate: -90deg; }
  .panel-body {
    display: grid; grid-template-rows: 0fr; opacity: 0;
    transition: grid-template-rows .8s cubic-bezier(.7,0,.2,1), opacity .35s;
  }
  .panel.is-open .panel-body {
    grid-template-rows: 1fr; opacity: 1;
    transition: grid-template-rows .8s cubic-bezier(.7,0,.2,1), opacity .5s .3s;
  }
  .panel-body-in { overflow: hidden; max-width: 42rem; }
  .panel-body p { color: var(--ink); padding-top: 1.4rem; }
  .panel-body .link { display: inline-block; margin-top: 1.1rem; }

  /* Story */
  .story {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gutter);
    padding-block: var(--section);
  }
  .story-text { position: sticky; top: 20vh; align-self: start; }
  .story-text h2 { font-size: var(--step-3); margin-bottom: 1.5rem; max-width: 18ch; }
  .story-text p + p { margin-top: 1rem; }
  .story-text p { color: var(--ink-2); max-width: 46ch; }
  .story-media { display: grid; gap: clamp(2rem, 6vw, 5rem); }
  .story-media figure { display: grid; gap: .6rem; }
  .story-media figure:nth-child(2) { justify-self: end; width: 72%; }
  .story-media figure:nth-child(3) { width: 84%; }
  .story-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
  .story-media figure:nth-child(2) img { aspect-ratio: 4 / 5; }
  figcaption { font-size: var(--step--1); color: var(--ink-2); }

  /* Work strip */
  .work { padding-block: 0 var(--section); }
  .work-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
  .work-head p { color: var(--ink-2); }
  .strip {
    display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 34rem); gap: 1.2rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip figure { scroll-snap-align: start; display: grid; gap: .6rem; }
  .strip button { display: block; width: 100%; }
  .strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .4s; }
  .strip button:hover img { opacity: .8; }
  .strip-nav { display: flex; gap: .5rem; margin-top: 1.5rem; }
  .strip-btn { width: 3rem; height: 3rem; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center; transition: border-color .3s, background .3s; }
  .strip-btn:hover { border-color: var(--oak); background: color-mix(in oklab, var(--oak) 12%, transparent); }

  /* Process */
  .process {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter);
    padding-block: var(--section); border-top: 1px solid var(--rule);
  }
  .process-head { position: sticky; top: 20vh; align-self: start; }
  .process-head p { color: var(--ink-2); margin-top: 1rem; }
  .steps { display: grid; }
  .steps li {
    display: grid; grid-template-columns: 4rem 1fr; gap: 0 1.5rem; align-items: baseline;
    padding-block: 2rem; border-top: 1px solid var(--rule);
  }
  .steps li:last-child { border-bottom: 1px solid var(--rule); }
  .step-n { font-family: var(--serif); font-size: var(--step-3); font-weight: 400; color: var(--oak); line-height: 1; grid-row: span 2; }
  .steps h3 { margin-bottom: .5rem; }
  .steps p { color: var(--ink-2); }

  /* Materials */
  .materials {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--gutter);
    padding-block: var(--section); background: var(--bg-2);
    margin-inline: 4px; padding-inline: calc(var(--gutter) - 4px) !important;
  }
  .mat-corian h2 { max-width: 16ch; margin-bottom: 1.5rem; }
  .mat-corian p { color: var(--ink-2); }
  .mat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 2rem; margin-top: 2rem; max-width: 40rem; }
  .mat-list li { padding-left: 1.2rem; position: relative; }
  .mat-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5rem; height: 1px; background: var(--oak); }
  .mat-partners { border-left: 1px solid var(--rule); padding-left: var(--gutter); }
  .mat-partners h3 { color: var(--ink-2); font-family: var(--sans); font-size: var(--step--1); font-weight: 400; margin-bottom: 1.2rem; }
  .mat-partners ul { display: grid; }
  .mat-partners li {
    font-family: var(--serif); font-size: var(--step-1); font-weight: 400; line-height: 1.2;
    padding-block: .85rem; border-top: 1px solid var(--rule);
  }
  .mat-partners li:last-child { border-bottom: 1px solid var(--rule); }

  /* Studio */
  .studio {
    display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--gutter); align-items: center;
    padding-block: var(--section);
  }
  .studio-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
  .studio-text h2 { max-width: 14ch; margin-bottom: 1.2rem; }
  .studio-lead { font-size: var(--step-1); font-weight: 300; }
  .contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2rem; margin-top: 2rem; }
  .contact dt { font-size: var(--step--1); color: var(--ink-2); margin-bottom: .2rem; }
  .contact dd { font-variant-numeric: tabular-nums; }
  .contact a:hover { color: var(--oak); }

  .foot {
    display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--gutter);
    padding: 2.5rem var(--gutter) 3rem; border-top: 1px solid var(--rule);
    font-size: var(--step--1); color: var(--ink-2); line-height: 1.7;
  }
  .foot strong { color: var(--ink); font-weight: 500; }
  .foot a:hover { color: var(--ink); }
  .foot-note { align-self: end; }

  @media (max-width: 900px) {
    .nav, .top-phone { display: none; }
    .burger { display: block; grid-column: 3; }
    .panels { flex-direction: column; height: auto; }
    .panel { min-height: 24rem; }
    .panel.is-open { flex-grow: 1; }
    .panel:not(.is-open) .panel-title { rotate: 0deg; }
    .panel:not(.is-open) { min-height: 10rem; }
    .panel { display: grid; align-content: end; }
    .panel-inner { position: static; }
    .story, .process, .materials, .studio { grid-template-columns: 1fr; }
    .story-text, .process-head { position: static; }
    .story-media figure:nth-child(2), .story-media figure:nth-child(3) { width: 100%; justify-self: stretch; }
    .mat-partners { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 2rem; }
    .foot { grid-template-columns: 1fr; }
  }
  @media (max-width: 560px) {
    .mat-list, .contact { grid-template-columns: 1fr; }
    .hero-foot span:last-child { display: none; }
    .steps li { grid-template-columns: 2.6rem 1fr; }
  }
}

@layer layout {
  /* Textové podstránky (zásady, 404) */
  .doc-page .top { position: sticky; }
  .doc-back { justify-self: end; grid-column: 3; font-size: var(--step--1); border-bottom: 1px solid var(--rule); padding-bottom: .15rem; }
  .doc-back:hover { border-color: var(--ink); }
  .doc {
    padding: clamp(4rem, 10vw, 8rem) var(--gutter) var(--section);
    max-width: 46rem; margin-inline: auto; min-height: 60svh;
  }
  .doc h1 { font-size: var(--step-3); margin-bottom: 1.2rem; }
  .doc h2 { font-size: var(--step-1); margin-top: 3rem; margin-bottom: .8rem; }
  .doc h3 { font-size: var(--step-0); font-family: var(--sans); font-weight: 500; margin-top: 1.8rem; margin-bottom: .4rem; }
  .doc p { color: var(--ink-2); max-width: none; }
  .doc p + p { margin-top: .9rem; }
  .doc strong { color: var(--ink); font-weight: 500; }
  .doc a { border-bottom: 1px solid var(--rule); }
  .doc a:hover { border-color: var(--ink); color: var(--ink); }
  .doc-lead { font-size: var(--step-1); color: var(--ink) !important; margin-bottom: 1rem; }
  .doc-date { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: var(--step--1); }
  .doc .hero-actions { margin-top: 2.5rem; }
}

@layer components {
  .btn {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .95rem 1.6rem; border: 1px solid var(--ink);
    font-size: var(--step--1); letter-spacing: .02em; font-weight: 400;
    transition: background .35s, color .35s, border-color .35s;
  }
  .btn:hover, .btn:focus-visible { background: var(--ink); color: var(--bg); }
  .link { font-size: var(--step--1); letter-spacing: .02em; border-bottom: 1px solid var(--rule); padding-bottom: .15rem; transition: border-color .3s; }
  .link:hover { border-color: var(--ink); }

  .lightbox {
    border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 92vh;
    color: var(--ink);
  }
  .lightbox::backdrop { background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(6px); }
  .lightbox img { max-height: 82vh; width: auto; margin-inline: auto; }
  .lightbox-cap { text-align: center; margin-top: .8rem; color: var(--ink-2); font-size: var(--step--1); }
  .lightbox-close {
    position: absolute; top: -2.6rem; right: 0; font-size: 1.8rem; line-height: 1; width: 2.4rem; height: 2.4rem;
  }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    .hero h1 .line > span {
      translate: 0 130%;
      animation: rise 1.1s cubic-bezier(.2,.7,.2,1) forwards;
    }
    .hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
    .hero h1 .line:nth-child(3) > span { animation-delay: .24s; }
    .hero-sub, .hero-actions, .hero-foot { opacity: 0; animation: fade 1s .6s ease forwards; }
    .hero-foot { animation-delay: .9s; }

    @supports (animation-timeline: scroll()) {
      .hero-media img { animation: drift linear both; animation-timeline: scroll(); animation-range: 0 100vh; }
    }
  }
  @keyframes rise { to { translate: 0 0; } }
  @keyframes fade { to { opacity: 1; } }
  @keyframes drift { from { scale: 1; translate: 0 0; } to { scale: 1.12; translate: 0 8%; } }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  }
}
