:root {
  --bg-deep:    oklch(0.17 0.008 250);  /* žulový charcoal, NE #000 */
  --bg-raised:  oklch(0.21 0.008 250);
  --bg-carved:  oklch(0.14 0.008 250);  /* tmavší zářez */
  --ink:        oklch(0.93 0.010 85);   /* kostěná bílá, NE #fff */
  --ink-muted:  oklch(0.70 0.012 85);
  --accent:     oklch(0.65 0.060 175);  /* verdigris — patina bronzu */
  --accent-deep:oklch(0.44 0.055 180);
  --hairline:   oklch(0.30 0.010 250);
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Cinzel", serif;
  --font-body: "Source Sans 3", sans-serif;
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

img.is-missing {
  display: none;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0;
  line-height: 1.15;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}

p {
  margin: 0;
  max-width: 65ch;
}

.container {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section[id],
.material[id] {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  margin-bottom: clamp(28px, 4vw, 48px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

#scroll-sentinel {
  position: absolute;
  top: 8px;
  width: 1px;
  height: 1px;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.nav.is-scrolled {
  background: var(--bg-deep);
  border-bottom-color: var(--hairline);
}

.nav__inner {
  width: min(1200px, 100% - 48px);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  color: var(--ink);
  flex: none;
}

.logo-mark--small {
  width: 28px;
  height: 28px;
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav__brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav__brand-sub {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--ink-muted);
  transition: color 300ms var(--ease-out);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

.nav__links a.nav__tel {
  font-weight: 600;
  color: var(--ink);
}

.nav__links a.nav__tel:hover {
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 36px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.btn--primary {
  background: var(--ink);
  color: var(--bg-deep);
}

@media (hover: hover) {
  .btn--primary:hover {
    background: var(--accent);
    color: var(--bg-deep);
  }
}

.btn--ghost {
  border-color: var(--hairline);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--ink);
}

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

.hero {
  position: relative;
  min-height: min(100svh, 840px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-color: var(--bg-raised);
  background-image: url("../assets/img/hero-granite.webp");
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: hero-settle 8s var(--ease-out) forwards;
}

@keyframes hero-settle {
  to { transform: scale(1); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      oklch(0.12 0.008 250 / 0.84) 0%,
      oklch(0.12 0.008 250 / 0.34) 44%,
      oklch(0.12 0.008 250 / 0.5) 72%,
      oklch(0.12 0.008 250 / 0.84) 100%
    ),
    linear-gradient(
      to bottom,
      oklch(0.12 0.008 250 / 0.45) 0%,
      oklch(0.12 0.008 250 / 0.12) 45%,
      oklch(0.12 0.008 250 / 0.72) 100%
    );
}

.hero__content {
  position: relative;
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
  padding-block: calc(var(--nav-h) + 40px) 64px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero__emblem {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--ink);
}

.hero__mark {
  width: clamp(140px, 15vw, 230px);
  height: auto;
  color: var(--ink);
}

.js .hero__emblem[data-reveal] {
  transition-duration: 1100ms;
}

.hero__emblem-name {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.1;
}

.hero__emblem-sub {
  margin-top: 12px;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero__emblem-year {
  position: relative;
  margin-top: 26px;
  padding-top: 22px;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__emblem-year::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 1px;
  background: var(--accent);
}

.hero__ch {
  display: inline-block;
  white-space: nowrap;
}

.js .hero__title.is-carving .hero__ch span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.18em);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: inherit;
}

.js .hero__title.is-carved .hero__ch span {
  opacity: 1;
  transform: none;
}

.hero__title {
  font-size: clamp(52px, 8vw, 120px);
  letter-spacing: 0.04em;
  line-height: 1.08;
  margin-bottom: 28px;
}

.hero__sub {
  font-size: 19px;
  color: var(--ink);
  max-width: 52ch;
  margin-bottom: 44px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

.about__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.about__pull {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.2;
  padding-top: 8px;
  border-top: 1px solid var(--accent);
}

.about__years {
  margin-top: clamp(40px, 5vw, 64px);
}

.about__years-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 132px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--accent);
}

.about__years-text {
  display: block;
  margin-top: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.about__body > p {
  font-size: 19px;
}

.about__body > p + p {
  margin-top: 20px;
}

.about__values {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 36px 0 0;
  padding: 0;
}

.about__values li {
  padding: 4px 28px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.about__values li:first-child {
  padding-left: 0;
}

.about__values li + li {
  border-left: 1px solid var(--hairline);
}

/* ---------- Motto ---------- */

.motto {
  position: relative;
  background-color: var(--bg-raised);
  background-image:
    linear-gradient(oklch(0.13 0.008 250 / 0.86), oklch(0.13 0.008 250 / 0.86)),
    url("../assets/img/motto-stone.webp");
  background-size: cover;
  background-position: center;
  padding-block: clamp(64px, 8vw, 112px);
  text-align: center;
  overflow: hidden;
}

.motto::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.motto__line {
  margin-inline: auto;
  padding-inline: 24px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 1.2;
}

.motto__line::before,
.motto__line::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin-inline: auto;
  background: var(--accent);
}

.motto__line::before {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.motto__line::after {
  margin-top: clamp(28px, 4vw, 44px);
}

/* ---------- Services ---------- */

.services {
  background: var(--bg-carved);
}

.services__grid {
  display: grid;
  grid-template-columns: 7fr 4fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.service {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: baseline;
  padding: 36px 24px;
  border-top: 1px solid var(--hairline);
  transition: background 300ms var(--ease-out);
}

.js .service[data-reveal] {
  transition:
    background 300ms var(--ease-out),
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out);
  transition-delay: 0ms, var(--reveal-delay, 0ms), var(--reveal-delay, 0ms);
}

.service:last-child {
  border-bottom: 1px solid var(--hairline);
}

.service:hover {
  background: var(--bg-raised);
}

.service__num {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 32px);
  color: var(--accent);
  min-width: 2.2ch;
}

.service__text h3 {
  font-size: clamp(20px, 2.2vw, 24px);
  margin-bottom: 10px;
}

.service__text p {
  color: var(--ink-muted);
}

.services__figure {
  margin: 0;
  background: var(--bg-raised);
  aspect-ratio: 3 / 4;
}

.services__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Craft ---------- */

.craft__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(2, clamp(200px, 24vw, 340px));
  gap: 16px;
}

.craft__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-raised);
}

.craft__img--workshop {
  grid-column: 1 / 9;
  grid-row: 1 / 3;
}

.craft__img--letters {
  grid-column: 9 / 13;
  grid-row: 1;
}

.craft__img--tools {
  grid-column: 9 / 13;
  grid-row: 2;
}

.craft__note {
  margin-top: clamp(24px, 3vw, 36px);
  color: var(--ink-muted);
}

/* ---------- Process / timeline ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transition: transform 1200ms var(--ease-out) 200ms;
}

.js .timeline::before {
  transform: scaleX(0);
  transform-origin: left;
}

.js .timeline.is-in::before {
  transform: scaleX(1);
}

.timeline__step {
  padding-top: 56px;
  position: relative;
}

.timeline__step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 37px;
  height: 37px;
  background: var(--bg-deep);
}

.timeline__num {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--accent);
  line-height: 37px;
}

.timeline__step h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.timeline__step p {
  color: var(--ink-muted);
  font-size: 15px;
}

/* ---------- Material ---------- */

.material {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-raised);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.material__media {
  background: var(--bg-raised);
  min-height: 420px;
}

.material__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material__body {
  padding: clamp(48px, 6vw, 88px) clamp(32px, 5vw, 80px);
  align-self: center;
}

.material__body .section-title {
  margin-bottom: 28px;
}

.material__body > p {
  font-size: 19px;
}

.material__price {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.material__price h3 {
  font-size: 17px;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.material__price p {
  color: var(--ink-muted);
}

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

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.contact__link {
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.3;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--hairline);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.contact__link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contact__info address {
  font-style: normal;
  font-size: 18px;
  line-height: 1.8;
}

.contact__map {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 24px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-deep);
  transition: color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.contact__map:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

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

.footer {
  background: var(--bg-carved);
  border-top: 1px solid var(--hairline);
  padding-block: 32px;
}

@supports (animation-timeline: view()) {
  .services__figure,
  .material__media {
    overflow: hidden;
  }

  .services__figure img,
  .material__media img {
    animation: img-drift linear both;
    animation-timeline: view();
  }

  @keyframes img-drift {
    from { transform: translateY(-4%) scale(1.1); }
    to   { transform: translateY(4%) scale(1.1); }
  }
}

.footer__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 14px;
  color: var(--ink-muted);
}

.footer__motto {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .about__grid,
  .services__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero__emblem {
    display: none;
  }

  .material {
    grid-template-columns: 1fr;
  }

  .material__media {
    min-height: 320px;
  }

  .services__figure {
    max-height: 420px;
    overflow: hidden;
  }

  .craft__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .craft__grid img {
    grid-column: auto;
    grid-row: auto;
    height: auto;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .timeline::before {
    top: 0;
    left: 18px;
    width: 1px;
    height: calc(100% - 60px);
  }

  .js .timeline::before {
    transform: scaleY(0);
    transform-origin: top;
  }

  .js .timeline.is-in::before {
    transform: scaleY(1);
  }

  .timeline__step {
    padding-top: 0;
    padding-left: 64px;
  }

  .nav__links a:not(.nav__tel) {
    display: none;
  }
}

@media (max-width: 560px) {
  .hero__cta .btn {
    width: 100%;
  }

  .about__values {
    flex-direction: column;
    gap: 4px;
  }

  .about__values li {
    padding: 4px 0;
  }

  .about__values li + li {
    border-left: 0;
    border-top: 1px solid var(--hairline);
    padding-top: 12px;
  }

  .service {
    padding: 28px 16px;
  }

  .footer__motto {
    margin-left: 0;
  }
}

/* ---------- Reduced motion ---------- */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__bg {
    transform: none;
  }

  .js .timeline::before {
    transform: none;
  }
}
