/* kauz.ws — see DESIGN.md. Fonts are served from this site, so no visitor data goes to a font host. */
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/sofia-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/sofia-sans-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: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #f5f2ea;
  --panel: #ebe6d9;
  --ink: #15181b;
  --ink-2: #474c52;
  --hair: #cbc4b3;
  --ok: #0a6847;
  --ask: #8a5200;
  --bad: #a3261c;
  --sans: "Sofia Sans", "DIN Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.6 var(--sans); font-variant-numeric: lining-nums;
  caret-color: var(--ok); accent-color: var(--ok);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--ok); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ok); outline-offset: 3px; border-radius: 1px; }
html { scrollbar-color: var(--ink-2) var(--paper); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999rem; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: var(--gutter); top: 0.5rem; }

h1, h2, h3 { font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1rem; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; max-width: 68ch; }
li { margin-bottom: 0.35rem; }
a { color: var(--ok); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
code, .mono { font: 500 0.86em/1.5 var(--mono); }
.lead { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.45; color: var(--ink-2); max-width: 44ch; }
.muted { color: var(--ink-2); }
.small { font-size: 0.95rem; }

/* Header */
.head { border-bottom: 1px solid var(--ink); position: sticky; top: 0; background: var(--paper); z-index: 5; }
.head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.mark { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; padding-block: 0.4rem; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--hair); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.lang { font: 500 0.8rem/1 var(--mono); color: var(--ink); text-decoration: none; border: 1px solid var(--ink); padding: 0.4rem 0.55rem; border-radius: 2px; }
.lang:hover { background: var(--ink); color: var(--paper); }

/* Sections */
main > section { padding-block: clamp(3rem, 7vw, 5.5rem); }
main > section + section { border-top: 1px solid var(--hair); }
.section-head { display: grid; gap: 0.9rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.split > .section-head { position: sticky; top: 6rem; }
.split { display: grid; gap: clamp(2rem, 5vw, 4.5rem); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem); }
.hero .split { grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); align-items: center; }
.hero h1 span { display: block; }
@media (min-width: 54.01rem) { .hero h1 span { white-space: nowrap; } }
.hero .lead { margin-top: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.5rem; align-items: center; margin-top: 2rem; }

/* Buttons and links with arrow */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem; font: 700 1.05rem/1 var(--sans);
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 2px;
  padding: 0.95rem 1.4rem; text-decoration: none; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--ok); border-color: var(--ok); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--hair); border-color: var(--hair); color: var(--ink-2); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.more { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 0.15rem; }
.more:hover { color: var(--ok); border-bottom-color: var(--ok); }
.arrow { width: 1.05em; height: 1.05em; flex: none; transition: transform 0.25s var(--ease); }
.btn:hover .arrow, .more:hover .arrow, .row:hover .arrow { transform: translateX(3px); }

/* Change record (hero signature) */
.record {
  background: #fbf9f4; border: 1px solid var(--ink); position: relative;
  box-shadow: 0 1px 0 rgba(21, 24, 27, 0.05), 0 18px 40px -18px rgba(21, 24, 27, 0.35);
  font-size: 0.95rem;
}
.record-top { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--ink); font: 500 0.75rem/1.4 var(--mono); }
.record dl { margin: 0; }
.record .field { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); border-bottom: 1px solid var(--hair); }
.record .field:last-child { border-bottom: 0; }
.record dt { padding: 0.75rem 1rem; font: 500 0.75rem/1.5 var(--mono); color: var(--ink-2); border-right: 1px solid var(--hair); }
.record dd { margin: 0; padding: 0.75rem 1rem; min-width: 0; }
.record code { font-size: 0.8rem; overflow-wrap: anywhere; }
.record code.cmd { display: block; }
.record .field:last-child dd { padding-right: 9.5rem; min-height: 4.4rem; }
.status { display: inline-block; margin-top: 0.4rem; font: 500 0.72rem/1 var(--mono); padding: 0.3rem 0.45rem; border: 1px solid currentColor; border-radius: 2px; }
.status.ok { color: var(--ok); }
.status.ask { color: var(--ask); }
.stamp {
  position: absolute; right: 1.1rem; bottom: 0.9rem; transform: rotate(-7deg);
  font: 800 1.15rem/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ok); border: 3px solid var(--ok); border-radius: 3px; padding: 0.45rem 0.7rem 0.4rem;
  background: rgba(251, 249, 244, 0.85);
}
@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: stamp 0.7s var(--ease) 0.5s backwards; }
  @keyframes stamp {
    from { opacity: 0; transform: rotate(-16deg) scale(1.9); filter: blur(5px); }
    60% { opacity: 1; filter: blur(0); }
    to { opacity: 1; transform: rotate(-7deg) scale(1); }
  }
}

/* Topics: ruled definition list */
.topics { margin: 0; border-top: 1px solid var(--ink); }
.topics > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1rem 2rem; padding-block: 1.1rem; border-bottom: 1px solid var(--hair); }
.topics dt { font-weight: 700; }
.topics dd { margin: 0; color: var(--ink-2); }

/* Schedule: offers as ruled rows */
.schedule { border-top: 1px solid var(--ink); }
.row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr) 13rem; gap: 0.5rem 2rem;
  align-items: baseline; padding-block: 1.35rem; border-bottom: 1px solid var(--hair);
  color: var(--ink); text-decoration: none; transition: background 0.2s var(--ease);
}
a.row:hover { background: var(--panel); }
.row h3 { font-size: 1.35rem; }
.row .what { color: var(--ink-2); font-size: 1rem; margin-top: 0.3rem; max-width: 46ch; }
.row .meta { color: var(--ink-2); font-size: 1rem; }
.price { font: 500 1.1rem/1.2 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .go { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; white-space: nowrap; justify-self: end; color: var(--ink); }
.row a.go:hover { color: var(--ok); }
.note { margin-top: 1.25rem; color: var(--ink-2); font-size: 1rem; }

/* Facts table on offer pages */
.facts { margin: 0; border-top: 1px solid var(--ink); }
.facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding-block: 0.8rem; border-bottom: 1px solid var(--hair); }
.facts dt { color: var(--ink-2); font-size: 1rem; }
.facts dd { margin: 0; font-weight: 600; }
.facts .price { font-size: 1.25rem; }

.steps { counter-reset: step; list-style: none; padding: 0; max-width: none; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--hair); margin: 0; }
.steps li::before { content: counter(step); font: 500 1rem/1.6 var(--mono); color: var(--ink-2); }

/* Book */
.cover {
  aspect-ratio: 1 / 1.414; width: min(100%, 21rem); background: #0d0f14; color: #f6efdc; border: 1px solid var(--ink);
  padding: 1.6rem 1.5rem; display: flex; flex-direction: column; position: relative; overflow: hidden;
  box-shadow: 0 1px 0 rgba(21, 24, 27, 0.05), 0 24px 44px -20px rgba(21, 24, 27, 0.4);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.cover .t, .cover .s, .cover .a { position: relative; }
.cover .t { font-weight: 800; font-size: 1.75rem; line-height: 1.05; letter-spacing: -0.02em; }
.cover .s { margin-top: 0.6rem; color: #d9d2bf; font-size: 0.8rem; line-height: 1.35; max-width: 16rem; }
.cover .a { margin-top: 0.8rem; font-weight: 700; font-size: 0.85rem; }
.cover .seal { align-self: flex-start; font: 800 0.7rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ok); border: 2px solid var(--ok); border-radius: 2px; padding: 0.35rem 0.5rem 0.3rem; transform: rotate(-5deg); }

/* Booking form */
.booking { background: var(--panel); border: 1px solid var(--ink); padding: clamp(1.25rem, 3vw, 2.25rem); }
.booking h2 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.booking .sum { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding-block: 0.9rem; margin-block: 1rem 1.25rem; border-block: 1px solid var(--ink); font-weight: 600; }
.fields { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields .full { grid-column: 1 / -1; }
label { display: grid; gap: 0.35rem; font-size: 0.95rem; font-weight: 600; }
input[type="text"], input[type="email"] {
  font: 400 1.05rem/1.3 var(--sans); color: var(--ink); background: #fbf9f4;
  border: 1px solid var(--ink); border-radius: 2px; padding: 0.75rem 0.8rem; width: 100%;
}
input::placeholder { color: #6a6f75; }
input:focus-visible { outline-offset: 1px; }
.editions { border: 0; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.5rem; }
.editions legend { font-size: 0.95rem; font-weight: 600; padding: 0; margin-bottom: 0.4rem; }
.editions label { display: flex; gap: 0.6rem; align-items: center; font-weight: 400; font-size: 1.05rem; }
.bk-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
#bk-status { font-size: 0.95rem; color: var(--ink-2); min-height: 1.5em; margin: 0.75rem 0 0; }
#bk-status.bad { color: var(--bad); font-weight: 600; }
#bk-payment { margin-block: 1rem; }
#bk-express { margin-bottom: 1rem; }
.result { border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.result.ok h3 { color: var(--ok); }
.result p { margin-top: 0.5rem; }
[hidden] { display: none !important; }

/* Prose pages */
.prose h2 { font-size: 1.5rem; margin: 2.25rem 0 0.75rem; }
.prose h1 + p { margin-top: 1.25rem; }
.prose address { font-style: normal; margin-bottom: 1rem; }

/* Footer */
.foot { border-top: 1px solid var(--ink); padding-block: 2rem 3rem; font-size: 0.95rem; color: var(--ink-2); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot a { color: var(--ink); }

@media (max-width: 54rem) {
  .split, .split.even, .hero .split { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .split > .section-head { position: static; }
  .row .meta { grid-column: 1; grid-row: 2; }
  .row .price { grid-column: 2; grid-row: 1; }
  .row .go { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin-top: 0.35rem; }
  .topics > div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}
@media (max-width: 36rem) {
  body { font-size: 1.0625rem; }
  .head .wrap { flex-wrap: wrap; gap: 0.25rem 1rem; padding-block: 0.6rem; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 0.75rem; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .record .field { grid-template-columns: minmax(0, 1fr); }
  .record dt { border-right: 0; padding-bottom: 0; }
  .record .field:last-child dd { padding-right: 1rem; padding-bottom: 4.2rem; }
  .facts > div { grid-template-columns: 7rem minmax(0, 1fr); }
  .stamp { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
