@font-face {
  font-family: "DM Serif Text";
  src: url("../fonts/dm-serif-text-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  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 Serif Text";
  src: url("../fonts/dm-serif-text-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "Outfit";
  src: url("../fonts/outfit-latin-ext-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Logo manual palette: Uhlie, Ráno, Zem, Jeseň */
  --uhlie: #474542;
  --rano: #e8e3da;
  --zem: #9e8b70;
  --jesen: #b08047;
  --jesen-text: #8a6232; /* Jeseň darkened for small text on light grounds (AA) */

  --bg: #f4f1ec; /* Ráno 50 % */
  --surface: var(--rano);
  --card: #faf8f5;
  --line: rgba(71, 69, 66, 0.14);
  /* headline + logo colour kept from the original site */
  --ink: #24260a;
  --ink-deep: #10260a;
  --text: var(--uhlie);
  --muted: #6c6964;
  --accent: var(--jesen);
  --on-ink: #f4f1ec;

  --font-display: "DM Serif Text", Georgia, serif;
  --font-text: "Outfit", system-ui, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 3vw, 32px);
  --section: clamp(64px, 8vw, 104px);
  --header-height: 76px;
  --radius: 20px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-press: 140ms;
  --t-hover: 200ms;
  --t-reveal: 700ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

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

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

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

strong {
  font-weight: 600;
}

::selection {
  background: var(--ink);
  color: var(--on-ink);
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 999px;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--uhlie);
  color: var(--on-ink);
  font: 500 16px/1 var(--font-text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-hover) var(--ease-out), color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out);
}

.button:hover {
  background: var(--ink);
}

.button:active {
  transform: scale(0.97);
}

.button--small {
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

.button--ghost {
  background: transparent;
  color: var(--uhlie);
  box-shadow: inset 0 0 0 1.5px var(--uhlie);
}

.button--ghost:hover {
  background: var(--uhlie);
  color: var(--on-ink);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--bg);
  transition: box-shadow var(--t-hover) var(--ease-out);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.site-header__logo img {
  width: 128px;
}

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

.site-nav__menu summary {
  display: none;
}

.site-nav__list {
  display: flex;
  gap: clamp(20px, 2.6vw, 32px);
}

.site-nav__list a {
  position: relative;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0.001);
  transform-origin: left;
  transition: transform var(--t-hover) var(--ease-out);
}

.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after {
  transform: scaleX(1);
}

/* Hero */

.hero {
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: min(640px, calc(100svh - var(--header-height)));
  padding-block: clamp(24px, 4vw, 48px) 0;
}

.hero__content {
  padding-bottom: clamp(24px, 4vw, 56px);
}

.hero__title {
  font: 400 clamp(38px, 4.6vw, 62px)/1.08 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--ink-deep);
  max-width: 17ch;
  animation: rise 900ms var(--ease-out) 100ms both;
}

.hero__lead {
  max-width: 46ch;
  margin-top: 22px;
  color: var(--muted);
  animation: rise 900ms var(--ease-out) 220ms both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  animation: rise 900ms var(--ease-out) 340ms both;
}

/* Justice: empty slots reserve the place, one fixed canvas draws the statue into the active slot */
.justicia-slot--hero {
  align-self: end;
  height: clamp(380px, 46vw, 600px);
}

.justicia {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

/* Sections */

.section {
  padding-block: var(--section);
}

.section__title {
  font: 400 clamp(32px, 3.4vw, 44px)/1.12 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink-deep);
}

.section__title--center {
  text-align: center;
}

/* About */

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

.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  grid-template-areas:
    "slot text"
    "slot facts";
  column-gap: clamp(32px, 6vw, 88px);
  row-gap: 28px;
  align-items: center;
}

.about__text {
  grid-area: text;
  align-self: end;
}

.facts {
  grid-area: facts;
  align-self: start;
}

.justicia-slot--about {
  grid-area: slot;
  height: clamp(360px, 38vw, 520px);
}

.about__text {
  display: grid;
  gap: 18px;
}

.about__text .section__title {
  margin-bottom: 6px;
  max-width: 18ch;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border-radius: var(--radius);
}

.facts__row {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 16px 22px;
  background: var(--surface);
}

.facts dt {
  font-size: 14px;
  color: var(--jesen-text);
}

.facts dd {
  font-weight: 500;
}

/* Services */

.services {
  background: var(--surface);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(32px, 4vw, 48px);
}

.service {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--card);
  border-radius: var(--radius);
  transition: transform var(--t-hover) var(--ease-out), background-color var(--t-hover) var(--ease-out);
}

.service:hover {
  transform: translateY(-3px);
  background: #fbf9f6;
}

.service__title {
  display: flex;
  gap: 12px;
  font: 400 clamp(23px, 2.1vw, 28px)/1.15 var(--font-display);
  color: var(--ink-deep);
}

/* the § from the logo marks each area of law */
.service__title::before {
  content: "§";
  flex: none;
  color: var(--jesen);
}

.service p {
  color: var(--muted);
  font-size: 16px;
}

/* Contact */

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.justicia-slot--contact {
  height: clamp(360px, 36vw, 500px);
}

.contact__card {
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  border-radius: var(--radius);
}

.contact__intro {
  margin-bottom: 4px;
  color: var(--jesen-text);
}

.contact__list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.contact__list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 16px 20px;
  background: var(--card);
  border-radius: 14px;
}

.contact__label {
  font-size: 14px;
  color: var(--jesen-text);
}

.contact__list a {
  color: var(--ink-deep);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact__list a:hover,
.contact__list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact__note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

/* Footer */

.site-footer {
  padding-block: 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.site-footer a {
  text-underline-offset: 3px;
}

/* Cookie dialog */

.cookie {
  position: fixed;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 60;
  width: min(400px, calc(100vw - 2 * var(--gutter)));
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(16, 38, 10, 0.18);
}

.cookie[hidden] {
  display: none;
}

.cookie__title {
  margin-bottom: 8px;
  font: 400 22px/1.2 var(--font-display);
}

.cookie__text {
  font-size: 14px;
  line-height: 1.5;
}

.cookie__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.cookie__actions .button {
  flex: 1;
  min-height: 46px;
}

/* Entrances */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--t-reveal) var(--ease-out) var(--delay, 0ms), transform var(--t-reveal) var(--ease-out) var(--delay, 0ms);
  }

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

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}

/* Tablet */

@media (max-width: 900px) {
  .contact__inner {
    grid-template-columns: 1fr;
  }

  /* one column: text, then the statue, then the facts box */
  .about__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "slot"
      "facts";
  }

  .justicia-slot--about {
    height: min(80vw, 420px);
  }

  /* on one column the statue appears only in the hero and in About */
  .justicia-slot--contact {
    display: none;
  }
}

/* Phone */

@media (max-width: 720px) {
  :root {
    --header-height: 64px;
  }

  .site-header__logo img {
    width: 112px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav__menu {
    position: relative;
  }

  .site-nav__menu summary {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    list-style: none;
    transition: background-color var(--t-hover) var(--ease-out);
  }

  .site-nav__menu summary:hover,
  .site-nav__menu[open] summary {
    background: var(--surface);
  }

  /* hamburger: three bars, the outer two cross into an X when the menu is open */
  .burger {
    position: relative;
    display: block;
    width: 22px;
    height: 16px;
  }

  .burger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform var(--t-hover) var(--ease-out), opacity var(--t-hover) var(--ease-out);
  }

  .burger span:nth-child(1) {
    top: 0;
  }

  .burger span:nth-child(2) {
    top: 7px;
  }

  .burger span:nth-child(3) {
    top: 14px;
  }

  .site-nav__menu[open] .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-nav__menu[open] .burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
  }

  .site-nav__menu[open] .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav__menu summary::-webkit-details-marker {
    display: none;
  }

  /* open menu: the page dims and a floating sheet drops in below the bar */
  .site-nav__menu[open]::before {
    content: "";
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: -1;
    background: rgba(36, 35, 33, 0.28);
    animation: menu-fade 260ms var(--ease-out) both;
  }

  .site-nav__list {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    background: var(--card);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(36, 35, 33, 0.22);
    transform-origin: top right;
    animation: menu-drop 320ms var(--ease-out) both;
  }

  .site-nav__list li {
    animation: menu-item 380ms var(--ease-out) both;
  }

  .site-nav__list li:nth-child(2) {
    animation-delay: 50ms;
  }

  .site-nav__list li:nth-child(3) {
    animation-delay: 100ms;
  }

  .site-nav__list li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav__list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    border-radius: 14px;
    font: 400 26px/1.1 var(--font-display);
    color: var(--ink-deep);
    transition: background-color var(--t-hover) var(--ease-out);
  }

  .site-nav__list a::after {
    content: "§";
    position: static;
    height: auto;
    background: none;
    transform: none;
    font-size: 20px;
    color: var(--jesen);
  }

  .site-nav__list a:hover,
  .site-nav__list a:focus-visible {
    background: var(--surface);
  }

  @keyframes menu-fade {
    from {
      opacity: 0;
    }
  }

  @keyframes menu-drop {
    from {
      opacity: 0;
      transform: translateY(-10px) scale(0.97);
    }
  }

  @keyframes menu-item {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }

  .hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
    padding-top: 28px;
  }

  .hero__content {
    padding-bottom: 8px;
  }

  .justicia-slot--hero {
    height: 92vw;
    max-height: 460px;
  }

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

  .contact__list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .service:hover {
    transform: none;
  }

  .cookie {
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 20px;
  }
}
