/* ============================================================
   NOKA Slovakia, s.r.o. — design tokens, layout, motion
   Palette C — Sage & Clay. Outfit (display) + Instrument Sans (body).
   ============================================================ */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrumentsans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  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: "Instrument Sans";
  src: url("../fonts/instrumentsans-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  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-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #F2F1EA;
  --surface: #EAE9E0;
  --ink: #2A2E27;
  --muted: #636B5C;
  --line: #DEDDD2;
  --accent: #B8674A;
  --accent-text: #9C5238;
  --accent-ink: #FBF3EF; /* text placed on solid accent fill */

  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;

  /* `ch` is the advance of "0" (11.72px here) but Slovak prose averages
     8.78px per character, so 65ch renders ~87 real characters — past the 45–80
     comfortable band. 56ch lands at ~75. */
  --measure: 56ch;
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 28px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --dur-press: 140ms;
  --dur-hover: 180ms;
  --dur-ui: 240ms;
  --dur-reveal: 700ms;

  --shadow-sm: 0 1px 2px rgba(42, 46, 39, 0.08);
  --shadow-md: 0 12px 32px -12px rgba(42, 46, 39, 0.22);

  --header-h: 72px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1C1F1A;
    --surface: #252923;
    --ink: #EDEBE2;
    --muted: #9AA292;
    --line: #333830;
    --accent: #D08765;
    --accent-text: #E09B79;
    --accent-ink: #23140D;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 40px -16px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1C1F1A;
  --surface: #252923;
  --ink: #EDEBE2;
  --muted: #9AA292;
  --line: #333830;
  --accent: #D08765;
  --accent-text: #E09B79;
  --accent-ink: #23140D;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 16px 40px -16px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* A transitioned property whose value comes from a custom property keeps
   serving its OLD value when only that custom property changes — so switching
   theme used to leave `body` (and anything else with a colour transition)
   stranded on the previous palette. main.js adds this class around the swap. */
:root.theme-switching,
:root.theme-switching *,
:root.theme-switching *::before,
:root.theme-switching *::after {
  transition: none !important;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 1.0625rem;
  transition: background-color var(--dur-ui) var(--ease-in-out), color var(--dur-ui) var(--ease-in-out);
}
img, picture, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  text-wrap: balance;
}
p { text-wrap: pretty; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  opacity: 0;
  transform: translateY(-140%);
  transition: transform var(--dur-ui) var(--ease-out), opacity var(--dur-ui) var(--ease-out);
}
.skip-link:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  font-family: var(--font-display);
}
.wordmark .word {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wordmark .sub {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--muted);
  margin-top: 0.2em;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  /* 44px is the comfortable touch target; this control only ever renders
     below the nav breakpoint, so the desktop header is unaffected. */
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  transition: transform var(--dur-press) var(--ease-out);
}
.nav-toggle:active {
  transform: scale(0.94);
}
.nav-toggle svg {
  width: 20px;
  height: 20px;
}
.nav-toggle .bar {
  transition: transform var(--dur-ui) var(--ease-in-out), opacity var(--dur-ui) var(--ease-out);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] .bar-top {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bar-bottom {
  transform: translateY(-5px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}
.main-nav ul {
  display: flex;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.main-nav a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  padding-block: 0.3rem;
  transition: color var(--dur-hover) var(--ease-out);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-ui) var(--ease-out);
}
.main-nav a:hover {
  color: var(--ink);
}
.main-nav a[aria-current="true"] {
  color: var(--ink);
}
.main-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme control — 3-state segmented, not a sun/moon toggle */
.theme-control {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.theme-control button {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  transition: color var(--dur-hover) var(--ease-out), background-color var(--dur-hover) var(--ease-out);
}
.theme-control button:active {
  transform: scale(0.97);
}
.theme-control button[aria-pressed="true"] {
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 759px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem var(--gutter) 2rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
  }
  .nav-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-panel .main-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }
  .nav-panel .main-nav a {
    display: block;
    padding-block: 0.6rem;
    font-size: 1.05rem;
  }
  .nav-panel .header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 0.5rem;
  }
  .nav-panel .theme-control {
    justify-content: space-between;
  }
  .nav-panel .theme-control button {
    flex: 1;
    /* Inside the touch menu these become real tap targets. The compact
       header version stays as-is for pointer users. */
    min-height: 44px;
  }
  .nav-panel .btn {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-panel {
    transition-duration: 0s;
    transform: none;
  }
  .nav-toggle .bar {
    transition-duration: 0s;
  }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-text);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.65rem 1.3rem;
  /* Padding alone lands this at 43.6px — a hair under the comfortable touch
     target, which is worth pinning for the page's only call to action. */
  min-height: 44px;
  border-radius: 999px;
  transition: transform var(--dur-press) var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity var(--dur-hover) var(--ease-out);
}
.btn:hover::after {
  opacity: 1;
}
.btn:active {
  transform: scale(0.97);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
  position: relative;
}
.hero .container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.hero-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-mark .word {
  display: block;
  font-size: clamp(3.25rem, 9vw, 7rem);
}
.hero-mark .sub {
  display: block;
  font-size: clamp(0.8rem, 1.4vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--accent-text);
  margin-top: 0.6rem;
}
.hero-headline {
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-lede {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
}
.hero-scroll-cue {
  position: absolute;
  bottom: clamp(1.5rem, 4vh, 3rem);
  left: var(--gutter);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.hero-scroll-cue svg {
  width: 14px;
  height: 14px;
  animation: cue-bob 1.8s var(--ease-in-out) infinite;
}
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue svg { animation: none; }
}

/* ---------- Reveal (scroll-triggered, once) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-stagger > * {
    transition-duration: 0s;
    transform: none;
    opacity: 1;
  }
}

/* ---------- Section label ---------- */
.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ---------- O firme (asymmetric two-column) ---------- */
.o-firme .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 860px) {
  .o-firme .container {
    grid-template-columns: 0.85fr 1.4fr;
    gap: 4rem;
    align-items: start;
  }
  .o-firme .col-label {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}
.o-firme h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  max-width: 14ch;
}
.o-firme .col-prose p {
  max-width: var(--measure);
  font-size: 1.1rem;
}
.o-firme .col-prose p + p {
  margin-top: 1.4rem;
}

/* ---------- Filozofia (staggered pull-quotes) ---------- */
.filozofia {
  background: var(--surface);
}
.filozofia .container {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4rem);
}
.filozofia-quote {
  max-width: 52ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: -0.01em;
  line-height: 1.28;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
}
.filozofia-quote:nth-of-type(2) {
  align-self: center;
  margin-left: clamp(0rem, 8vw, 6rem);
}
.filozofia-quote:nth-of-type(3) {
  align-self: flex-end;
  text-align: right;
  border-left: none;
  border-right: 3px solid var(--accent);
  padding-left: 0;
  padding-right: 1.5rem;
}

/* ---------- Sluzby (numbered ledger, not cards) ---------- */
.sluzby h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  max-width: 20ch;
  margin-bottom: 2.5rem;
}
.ledger-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 860px) {
  .ledger-groups {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}
.ledger-group h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ledger {
  border-top: 1px solid var(--line);
}
.ledger li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}
.ledger .idx {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent-text);
  min-width: 2ch;
}
.sluzby-closing {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
}
@media (min-width: 640px) {
  .sluzby-closing { grid-template-columns: 1fr 1fr; }
}
.sluzby-closing p {
  font-size: 1.05rem;
  color: var(--muted);
}

/* ---------- Kontakt ---------- */
.kontakt {
  background: var(--surface);
}
.kontakt .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 860px) {
  .kontakt .container {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}
.kontakt h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  margin-bottom: 1.5rem;
}
.kontakt address {
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1.7;
}
.kontakt address .company {
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1.3rem;
  display: block;
  margin-bottom: 0.4rem;
}
.registry-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.registry-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.registry-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.registry-list dt {
  color: var(--muted);
}
.registry-list dd {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer nav ul {
  display: flex;
  /* Four unwrappable links set a ~278px floor on the whole page, so anything
     narrower (a Fold cover screen, a classic scrollbar) scrolls sideways. */
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.site-footer a {
  transition: color var(--dur-hover) var(--ease-out);
}
.site-footer a:hover {
  color: var(--ink);
}

/* ---------- Motion hygiene note ----------
   Every transition above names explicit properties (transform, opacity, color,
   background-color, border-color, filter) — never `all`, and never a property
   that triggers layout. tests/static-checks.mjs enforces that list.
   Entrances never start at scale(0); pressables use :active { transform: scale(.97) }.
--------------------------------------------- */
