/* Rast Bike — design foundation (item 0) */

:root {
  --corten: #B4532A;
  --oxide: #7A3418;
  --patina: #3E7C74;
  --steel: #2A2C2E;
  --raw: #8A8D8F;
  --bone: #F1EAE0;
  --tag: #D9C29A;
  --pencil: #4A4A4A;

  /* semantic */
  --bg: var(--bone);
  --text: var(--steel);
  --muted: #5E6163;          /* --raw is too light for body text on bone (AA) */
  --heading: var(--oxide);
  --link: #2F625C;           /* --patina darkened for AA on bone */
  --line: var(--raw);
  --wood: #C9A777;

  --f-head: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --f-hand: "Caveat", cursive;

  --gutter: 16px;

  /* patina texture: default = pattern 10 "Starý bicykel, teplejší" (iron.svg, from patterns.html f10);
     toggle html[data-patina="corten"] = the original Corten look (rust.svg). app.js switches it. */
  --p-url: url("iron.svg");
  --p-tile: 300px 300px;
  --p-img: var(--p-url) 0 0 / var(--p-tile);          /* letters + buttons */
  --p-base: #512D18;                                   /* average of iron.svg; bone text ≥ 5:1 */
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--steel);
    --text: var(--bone);
    --muted: #B5B8BA;
    --heading: #D9774C;      /* corten lifted for AA on steel */
    --heading-rust: #D9774C;
    --link: #6FB3A9;
    --line: #5E6163;
    color-scheme: dark;
  }
}
:root[data-patina="corten"] {
  --p-url: url("rust.svg");
  --p-tile: 450px 600px;
  --p-base: #A54B26;
}
:root[data-theme="dark"] {
  --bg: var(--steel);
  --text: var(--bone);
  --muted: #B5B8BA;
  --heading: #D9774C;
  --heading-rust: #D9774C;
  --link: #6FB3A9;
  --line: #5E6163;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--f-body);
}

h1, h2, h3 {
  font-family: var(--f-head);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.01em;
  color: var(--heading);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(3rem, 12vw, 7rem); text-transform: uppercase; }
h2 { font-size: clamp(2.2rem, 7vw, 4rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; max-width: 60ch; }
a { color: var(--link); text-underline-offset: 3px; }
strong { font-weight: 600; }

.label {
  font: 900 .95rem/1 var(--f-head);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }

/* ---------- grid: left-aligned, asymmetric ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 4rem 0; }
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .grid { grid-template-columns: repeat(12, 1fr); gap: 2rem; }
  .col-main { grid-column: 1 / span 7; }
  .col-side { grid-column: 9 / span 4; }
  .col-wide { grid-column: 1 / span 10; }
  .break-right { margin-right: calc(-1 * var(--gutter)); }  /* lets an element hang off the grid */
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font: 900 1.15rem/1 var(--f-head);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--bone);
  background: var(--corten);
  border: 0;
  border-radius: 2px;
  padding: .95rem 1.4rem;
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { background: var(--oxide); }
:focus-visible { outline: 3px solid var(--patina); outline-offset: 2px; }

/* ---------- oxidized texture (hero + footer only) ---------- */
.rust {
  position: relative;
  background-color: #A54B26;   /* corten, oxidized a step so bone text gets AA (4.8:1) */
  color: var(--bone);
  isolation: isolate;
}
.rust::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: url("rust.svg") 0 0 / 900px 1200px repeat-x;   /* always Corten; the toggle only changes letters + buttons */
}
.rust h1, .rust h2, .rust h3 { color: var(--bone); }
/* hero and footer edges are eaten by corrosion and dissolve into the page (inline SVG alpha masks: turbulence × gradient; data: URIs so they also work from file://) */
.hero-text.rust {
  padding-bottom: 9rem;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140' viewBox='0 0 600 140'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03 0.09' numOctaves='4' seed='11' stitchTiles='stitch' result='n'/%3E%3CfeComposite in='SourceGraphic' in2='n' operator='arithmetic' k2='3.2' k3='3' k4='-2.7'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='600' height='140' fill='url(%23g)' filter='url(%23f)'/%3E%3C/svg%3E") bottom / 600px 140px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 139px) no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140' viewBox='0 0 600 140'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03 0.09' numOctaves='4' seed='11' stitchTiles='stitch' result='n'/%3E%3CfeComposite in='SourceGraphic' in2='n' operator='arithmetic' k2='3.2' k3='3' k4='-2.7'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='600' height='140' fill='url(%23g)' filter='url(%23f)'/%3E%3C/svg%3E") bottom / 600px 140px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 139px) no-repeat;
}
.site-footer.rust {
  padding-top: calc(3rem + 100px);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140' viewBox='0 0 600 140'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03 0.09' numOctaves='4' seed='11' stitchTiles='stitch' result='n'/%3E%3CfeComposite in='SourceGraphic' in2='n' operator='arithmetic' k2='3.2' k3='3' k4='-2.7'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='600' height='140' fill='url(%23g)' filter='url(%23f)'/%3E%3C/svg%3E") top / 600px 140px repeat-x, linear-gradient(#000 0 0) bottom / 100% calc(100% - 139px) no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140' viewBox='0 0 600 140'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0'/%3E%3Cstop offset='1' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03 0.09' numOctaves='4' seed='11' stitchTiles='stitch' result='n'/%3E%3CfeComposite in='SourceGraphic' in2='n' operator='arithmetic' k2='3.2' k3='3' k4='-2.7'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='600' height='140' fill='url(%23g)' filter='url(%23f)'/%3E%3C/svg%3E") top / 600px 140px repeat-x, linear-gradient(#000 0 0) bottom / 100% calc(100% - 139px) no-repeat;
}

/* ---------- stamped frame plate ---------- */
.plate {
  display: inline-block;
  font: 500 .8rem/1 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text);
  padding: .55em .8em;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px var(--line);
  white-space: nowrap;
}

/* ---------- workshop paper tag ---------- */
.tag {
  --tilt: -2deg;
  position: relative;
  width: min(100%, 15rem);
  background: var(--tag);
  color: var(--steel);
  padding: 2.6rem 1.2rem 1.4rem;
  clip-path: polygon(18% 0, 82% 0, 100% 12%, 100% 100%, 0 100%, 0 12%);
  transform: rotate(var(--tilt));
  font-family: var(--f-mono);
}
.tag::before {            /* punched hole with reinforcement ring */
  content: "";
  position: absolute; top: .9rem; left: 50%;
  width: .8rem; height: .8rem; margin-left: -.4rem;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 4px #C4AA7E;
}
.tag-wrap { position: relative; padding-top: 2.2rem; }
.tag-wrap::before {       /* string */
  content: "";
  position: absolute; top: 0; left: calc(min(100%, 15rem) / 2);
  width: 2px; height: 3.2rem;
  background: var(--raw);
  transform: rotate(8deg);
  transform-origin: top;
}
.tag h3 { color: var(--oxide); font-size: 1.3rem; margin-bottom: .4em; }
.tag .price { font: 600 2rem/1 var(--f-mono); color: var(--steel); }
.tag .unit { font-size: .8rem; color: #4A3A22; }

/* ---------- measuring tape ---------- */
.tape {
  position: relative;
  background:
    repeating-linear-gradient(90deg, var(--steel) 0 1px, transparent 1px 10px) 0 0 / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, var(--steel) 0 2px, transparent 2px 50px) 0 0 / 100% 18px no-repeat,
    var(--tag);
  color: var(--steel);
  padding: 1.6rem 1rem .9rem;
  border-radius: 2px;
  font-family: var(--f-mono);
}
.tape-marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 760px) { .tape-marks { grid-template-columns: repeat(3, 1fr); } }
.tape-marks li { border-left: 3px solid var(--corten); padding-left: .7rem; }
.tape-marks b { font: 900 1.5rem/1 var(--f-head); display: block; }

/* ---------- door frame with growth marks ---------- */
.doorframe {
  position: relative;
  width: 7rem;
  height: 26rem;
  background:
    repeating-linear-gradient(180deg, transparent 0 37px, rgba(0,0,0,.06) 37px 38px),
    linear-gradient(90deg, #B8935E, var(--wood) 30%, #D7B98A 60%, #B8935E);
  border-left: 6px solid #A07A48;
}
.doorframe .mark {
  position: absolute;
  left: -6px;
  bottom: var(--h);          /* set --h as % of frame height */
  display: flex; align-items: center; gap: .4rem;
  white-space: nowrap;
}
.doorframe .mark::before {
  content: "";
  width: 4.2rem; height: 2px;
  background: var(--pencil);
  transform: rotate(-1deg);
}
.doorframe .mark span {
  font: 400 1.35rem/1 var(--f-hand);
  color: var(--pencil);
  background: transparent;
}
:root[data-theme="dark"] .doorframe .mark span { color: var(--bone); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doorframe .mark span { color: var(--bone); }
}

/* ---------- line-drawn bike (never rusted) ---------- */
.bike { stroke: currentColor; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 1. hero ---------- */
.hero { position: relative; }
@media (min-width: 760px) { .hero { margin-bottom: 6rem; } }
.hero-text { padding: 1.5rem 0 7rem; }
.wordmark {
  display: inline-flex; align-items: baseline; gap: .6rem;
  font: 900 2.4rem/1 var(--f-head);
  letter-spacing: .14em;
  color: var(--bone);
  text-decoration: none;
  border: 3px solid currentColor;
  padding: .2rem .5rem .15rem .7rem;
  transform: rotate(-1.5deg);
}
.wordmark small { font: 500 .7rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.dict {
  margin: 2.5rem 0 1.5rem;
  max-width: 34rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(241,234,224,.5);
  font-size: 1.05rem;
}
.dict b { font: 900 1.6rem/1 var(--f-head); letter-spacing: .02em; }
.dict .ipa { font: 500 .95rem var(--f-mono); }
.dict i { font-style: italic; font-weight: 600; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.6rem); text-transform: none; max-width: 15ch; text-wrap: balance; }
.hero-sub { font-size: 1.15rem; max-width: 34rem; }
.btn-dark { background: var(--steel); }
.btn-dark:hover, .btn-dark:focus-visible { background: var(--oxide); }

.hero-bike {          /* bone panel: rust texture never touches the bike */
  position: relative;
  margin: -5rem var(--gutter) 0 auto;
  width: min(86%, 26rem);
  background: var(--bone);
  color: var(--steel);
  padding: 1.2rem 1.2rem 1rem;
  border: 1.5px solid var(--steel);
  transform: rotate(1deg);
}
.hero-bike svg { display: block; width: 100%; height: auto; stroke-width: 2.5; }
.hero-bike .plate { --bg: var(--bone); --line: var(--raw); color: var(--steel); margin-top: .6rem; font-size: .62rem; letter-spacing: .08em; }

@media (min-width: 760px) {
  .hero-text { padding: 2rem 0 5rem; }
  .hero-text .wrap > *:not(.wordmark) { max-width: 58%; }
  .hero-bike {
    position: absolute;
    right: max(var(--gutter), calc((100vw - var(--max)) / 2));
    bottom: -4rem;
    margin: 0;
    width: 40%;
    max-width: 30rem;
  }
}

/* ---------- 2. why us ---------- */
.why-list { list-style: none; margin: 0; padding: 0; counter-reset: why; }
.why-list li {
  counter-increment: why;
  position: relative;
  padding: 1.4rem 0 .6rem 3.6rem;
  border-top: 1.5px solid var(--line);
}
.why-list li:last-child { border-bottom: 1.5px solid var(--line); }
.why-list li::before {
  content: "0" counter(why);
  position: absolute; left: 0; top: 1.5rem;
  font: 600 1rem/1 var(--f-mono);
  color: var(--heading);
  letter-spacing: .1em;
}
.why-list h3 { color: var(--text); margin-bottom: .35em; }
.why-list p { color: var(--muted); }
.why-list .plate { margin-top: .2rem; }
@media (min-width: 760px) {
  .why-head { grid-column: 1 / span 4; grid-row: 1; position: sticky; top: 2rem; align-self: start; }
  .why-list { grid-column: 6 / span 7; grid-row: 1; }
  .why-head h2 { margin-right: -3rem; }   /* headline overhangs the gap */
}

/* ---------- 3. how it works ---------- */
.tape-run { overflow: hidden; padding: .5rem 0 1rem; }
.how .tape {
  transform: rotate(-1.2deg);
  margin-right: calc(-1 * var(--gutter) - 2rem);   /* tape runs off the right edge */
  padding: 2.2rem calc(var(--gutter) + 3rem) 1.4rem 1.2rem;   /* text stays clear of the clipped overhang */
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.how .tape-marks li { line-height: 1.45; padding-right: 1rem; }
.how .tape-marks b { margin: .35rem 0 .4rem; font-size: 1.7rem; }
.how .cm { font: 600 .75rem/1 var(--f-mono); letter-spacing: .08em; }

/* ---------- 4. products ---------- */
.product-pair { display: grid; gap: 2.5rem; margin-top: 2rem; }
.product { border-top: 3px solid var(--text); padding-top: 1.2rem; }
.product-main { border-top-color: var(--corten); }
.product h3 { font-size: 2.2rem; color: var(--text); margin-top: .8rem; }
.spec { list-style: none; margin: 0 0 1.5rem; padding: 0; font: 500 .95rem/1.4 var(--f-mono); }
.spec li { display: flex; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.spec span { width: 7.5rem; flex: none; color: var(--muted); text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; padding-top: .15rem; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--text); color: var(--bg); }
@media (min-width: 760px) {
  .product-pair { grid-template-columns: 7fr 5fr; gap: 4rem; }
}

/* ---------- 5. sizes ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.small { font-size: .9rem; }
.sizes-grid { display: grid; gap: 2.5rem; }
.sizes-grid { position: relative; }
@media (max-width: 759px) {   /* phones: the frame is a faint background strip on the left edge, not a block in the way */
  .sizes .doorframe { position: absolute; z-index: 0; top: 0; bottom: 0; left: 0; margin: 0; height: auto; width: calc(var(--gutter) - 4px); border-left-width: 3px; opacity: .6; pointer-events: none; }
  .sizes .doorframe .mark, .sizes .doorframe .tick { display: none; }
  .sizes-body { position: relative; z-index: 1; min-width: 0; }
}
.doorframe .tick {
  position: absolute; right: .4rem; bottom: var(--h);
  font: 500 .65rem/1 var(--f-mono); font-style: normal; color: #5A4428;
  border-bottom: 1px solid #5A4428; padding: 0 0 1px .6rem;
}
.table-scroll { overflow-x: auto; margin: 1.5rem 0 .5rem; }
.size-table { border-collapse: collapse; width: 100%; font: 500 .95rem/1.3 var(--f-mono); }
.size-table th, .size-table td { text-align: left; padding: .7rem .8rem .7rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.size-table thead th { font: 900 .85rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.size-table tbody th { font: 900 1.6rem/1 var(--f-head); color: var(--heading); }
.plate-cell { display: none; }
.sizes h3 { margin-top: 2rem; color: var(--text); }
.measure-anim { margin: 1rem 0 0; max-width: 20rem; }
.measure-text { margin: 0 0 1rem; color: var(--text); }
@media (min-width: 760px) {
  .measure-anim { max-width: none; display: grid; grid-template-columns: 15rem 1fr; gap: 1.5rem; align-items: start; }
  .measure-anim svg { order: -1; }   /* text first in the DOM (phones read it before the picture), right of the picture here */
  .measure-anim figcaption { max-width: 32ch; }
}
.step { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: .3em;
  border: 2px solid currentColor; border-radius: 50%; font: 900 .8em/1 var(--f-head); vertical-align: .1em; }
.measure-anim svg { display: block; width: 100%; height: auto; }
.m-wall { fill: var(--tag); opacity: .35; }
.m-floor { stroke: var(--text); stroke-width: 3; }
.m-skin { fill: var(--tag); stroke: var(--pencil); stroke-width: 2; }
.m-shirt { fill: var(--patina); }
.m-pants { fill: var(--steel); }
.m-shoe { fill: var(--corten); }
.m-book rect { fill: var(--corten); stroke: var(--oxide, #7A3418); stroke-width: 2; }
.m-tape line { stroke: var(--text); stroke-width: 2.5; stroke-dasharray: 6 4; }
.m-label { font: 400 26px/1 var(--f-hand); fill: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .m-wall { opacity: .15; } }
:root[data-theme="dark"] .m-wall { opacity: .15; }
@media screen and (prefers-reduced-motion: no-preference) {
  /* ponytail: one 7 s loop: book slides up the legs, tape is drawn, number appears */
  .m-book { animation: m-book 7s ease-in-out infinite; }
  .m-tape { animation: m-tape 7s linear infinite; }
  .m-label { animation: m-label 7s linear infinite; }
}
@keyframes m-book { 0%, 8% { transform: translateY(108px); } 40%, 100% { transform: translateY(0); } }
@keyframes m-tape { 0%, 45% { opacity: 0; } 55%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes m-label { 0%, 58% { opacity: 0; } 66%, 92% { opacity: 1; } 100% { opacity: 0; } }
@media (min-width: 760px) {
  .sizes-grid { grid-template-columns: 17rem 1fr; gap: 3rem; }
  .sizes .doorframe { height: auto; min-height: 34rem; margin-left: 0; }   /* stretches with the column: ruler runs the whole section */
}
@media (min-width: 1000px) { .plate-cell { display: table-cell; } .plate-cell .plate { font-size: .68rem; } }

/* ---------- 6. prices ---------- */
.stamp {
  display: inline-block;
  margin: 1rem 0 2.5rem;
  padding: .7rem 1.1rem .8rem;
  border: 3px solid var(--heading);
  outline: 1.5px solid var(--heading); outline-offset: 3px;
  color: var(--heading);
  text-decoration: none;
  transform: rotate(-2.5deg);
}
.stamp b { display: block; font: 900 2.4rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .03em; }
.stamp span { font: 500 .8rem/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.stamp:hover { color: var(--bg); background: var(--heading); }
.tag-rack { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; }
.tag-rack .tag-wrap:nth-child(even) { margin-top: 1.5rem; }
@media (max-width: 759px) {
  .tag-rack { gap: .5rem .9rem; }
  .tag-rack .tag-wrap { flex: 0 0 calc(50% - .45rem); }
  .tag-rack .tag { width: 100%; padding: 2.4rem .8rem 1.1rem; }
  .tag-rack .tag h3 { font-size: 1.1rem; }
  .tag-rack .tag .price { font-size: 1.6rem; }
}
.plate-mini { font: 500 .7rem/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 .5rem; }
.tag .alt { margin: .6rem 0 0; padding-top: .45rem; border-top: 1px dashed #9C8460; font-size: .78rem; color: #4A3A22; }
.plate-mini .nw { white-space: nowrap; }
.prices .lead { font-size: 1.15rem; max-width: 46ch; margin-bottom: .3rem; }
@media (min-width: 900px) {   /* stamp sits right of the heading instead of on its own row */
  .prices-head { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
  .prices-head .stamp { margin: 0; max-width: 25rem; }
}
.extras { margin-top: 3rem; max-width: 44rem; }
.extras h3 { color: var(--text); }
.extras .spec li { font-size: .9rem; }
@media (min-width: 1000px) {
  .tag-rack { flex-wrap: nowrap; margin-right: -4rem; }   /* tags hang past the grid */
}

/* ---------- 7. faq ---------- */
.faq-list details { border-top: 1.5px solid var(--line); }
.faq-list details:last-child { border-bottom: 1.5px solid var(--line); }
.faq-list summary {
  cursor: pointer; list-style: none;
  padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font: 900 1.45rem/1.1 var(--f-head); color: var(--text);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 0; top: 1rem;
  font: 600 1.4rem/1 var(--f-mono); color: var(--heading);
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { color: var(--muted); padding-bottom: .6rem; }
@media (min-width: 760px) {
  .faq-head { grid-column: 9 / span 4; grid-row: 1; }   /* heading on the right this time */
  .faq-list { grid-column: 1 / span 7; grid-row: 1; }
}

/* ---------- 8–10. forms ---------- */
.form-section { border-top: 3px solid var(--text); }
.lead-form { display: grid; gap: 1.1rem; max-width: 40rem; }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label, fieldset legend {
  font: 900 .95rem/1.1 var(--f-head); text-transform: uppercase; letter-spacing: .1em;
}
.opt { font: 500 .7rem var(--f-mono); text-transform: none; letter-spacing: 0; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  font: 500 1rem/1.3 var(--f-mono);
  color: var(--text);
  background: transparent;
  border: 0; border-bottom: 2px solid var(--text);
  border-radius: 0;
  padding: .6rem .1rem;
  width: 100%;
}
select { background: var(--bg); }
textarea { border: 2px solid var(--text); padding: .6rem; min-height: 8rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--corten); }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: #B3261E; }
.hint { margin: -.6rem 0 0; font-size: .9rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--corten); flex: none; }
.lead-form .btn { justify-self: start; }
.btn:disabled { opacity: .6; cursor: wait; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 600; }
.form-status.ok { color: var(--link); }
.form-status.err { color: var(--heading); }
@media (min-width: 760px) {
  .form-aside { grid-column: 9 / span 4; grid-row: 1; }
  .lead-form { grid-column: 1 / span 7; grid-row: 1; }
}

/* survey choices: stamped tokens, not pills */
fieldset.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.choice legend { padding: 0; margin-bottom: .5rem; }
.choice-opts { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice-opts label { position: relative; cursor: pointer; }
.choice-opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-opts span {
  display: inline-block;
  font: 500 .9rem/1 var(--f-mono);
  padding: .65rem .8rem;
  border: 1.5px solid var(--text);
  border-radius: 2px;
}
.choice-opts input:checked + span { background: var(--text); color: var(--bg); }
.choice-opts input:focus-visible + span { outline: 3px solid var(--patina); outline-offset: 2px; }

/* ---------- 11. footer ---------- */
.site-footer { padding: 3rem 0 2.5rem; }
.site-footer a { color: var(--bone); }
.site-footer .wordmark { margin: 0 0 1.5rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-nav { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
  font: 900 1rem/1 var(--f-head); text-transform: uppercase; letter-spacing: .1em; }
.gdpr { font-size: .92rem; }
.gdpr p { max-width: 52ch; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 4fr 1fr 6fr; }
  .gdpr { grid-column: 3; }
}

/* ---------- Corten patina in big type + primary buttons ----------
   Same rust.svg as the hero, scaled down so the patches show inside letters.
   Only h1/h2 (large text, AA needs 3:1) — small text stays solid for readability.
   .rust headings stay bone: rust-on-rust would vanish. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  h1:not(.rust *), h2:not(.rust *) {
    background: var(--p-img), var(--heading-rust, #A54B26);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* the fill only covers the element box; with line-height .95 the háčky/čiarky (Č, Ž, Á)
       and descenders stick out and vanish. Grow the box, cancel it with margins. */
    padding-block: .25em .15em;
    margin-top: -.25em;
    margin-bottom: .35em;   /* = original .5em − .15em */
  }
}
.btn:not(.btn-dark):not(.btn-ghost) {
  background: var(--p-img), var(--p-base);   /* bone text AA on both patinas */
}
.btn:not(.btn-dark):not(.btn-ghost):hover,
.btn:not(.btn-dark):not(.btn-ghost):focus-visible {
  background: var(--p-img), var(--p-base);
  box-shadow: inset 0 0 0 3px var(--bone);   /* hover cue that works on an opaque texture */
}
:root[data-patina="corten"] .btn:not(.btn-dark):not(.btn-ghost):hover,
:root[data-patina="corten"] .btn:not(.btn-dark):not(.btn-ghost):focus-visible {
  background: var(--p-img), var(--oxide); box-shadow: none;
}

/* pattern 10 is dark iron: on the dark page its letters would sink, so lift them (large text, 3:1) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-patina="corten"]) h1:not(.rust *),
  :root:not([data-theme="light"]):not([data-patina="corten"]) h2:not(.rust *) { filter: brightness(2.6); }
}
:root[data-theme="dark"]:not([data-patina="corten"]) h1:not(.rust *),
:root[data-theme="dark"]:not([data-patina="corten"]) h2:not(.rust *) { filter: brightness(2.6); }

/* tilted tape is meant to run off the edge; clip (not hidden) keeps position:sticky working */
html, body { overflow-x: clip; }

/* ---------- "RUST" weathered into the hero steel ----------
   Like a stencil that sat on Corten and oxidized darker. Darker than the base,
   so bone text on top keeps (gains) contrast. Purely decorative (aria-hidden). */
.ghost-word {
  position: absolute; z-index: -1;            /* above .rust::before (same z, later in DOM), below content */
  /* phone: stands vertically along the right edge, like lettering on a steel post */
  writing-mode: vertical-rl;
  top: 8.5rem; right: -.06em;
  font: 900 6rem/.8 var(--f-head);
  letter-spacing: -.02em;
  background: url("rust.svg") 0 0 / 450px 600px, #6B2A11;   /* hero/footer stay Corten */
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  opacity: .6;
  /* run-off: the letters fade downward like rain washed them out */
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
  pointer-events: none; user-select: none;
  padding-top: .1em;                          /* keep glyph tops inside the clipped fill */
}
.slogan {
  margin: 1.6rem 0 0;
  font: 500 .8rem/1.4 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone);
  border-top: 1px solid rgb(241 234 224 / .45);
  padding-top: .7rem;
  display: inline-block;
}
@media (min-width: 760px) {
  .ghost-word {
    writing-mode: horizontal-tb;
    top: 1.5rem; right: 3vw;
    font-size: clamp(9rem, 22vw, 19rem);
    opacity: .7;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
  }
}

/* ---------- footer: HRDZA weathered into the base of the steel ----------
   Mirror of the hero RUST: on real Corten the bottom is darkest (rain splash),
   so this one fades UPWARD and is sliced by the page bottom edge. */
.site-footer { padding-bottom: 0; overflow: clip; }
.signoff {
  margin: 2.5rem 0 0;
  padding-top: .8rem;
  border-top: 1px solid rgb(241 234 224 / .45);
  font: 500 .8rem/1.4 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
}
.footer-hrdza {
  margin: .5rem 0 -.2em;                       /* negative bottom: letters run off the edge */
  padding-top: .1em;                           /* keep glyph tops inside the clipped fill */
  max-width: none;
  text-align: center;
  font: 900 clamp(7.5rem, 30vw, 24rem)/.8 var(--f-head);
  letter-spacing: -.01em;
  background: url("rust.svg") 0 0 / 450px 600px, #6B2A11;   /* hero/footer stay Corten */
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  opacity: .7;
  -webkit-mask-image: linear-gradient(to top, #000 40%, transparent 100%);
          mask-image: linear-gradient(to top, #000 40%, transparent 100%);
  user-select: none;
}

/* ---------- scroll reveal (classes set by app.js) ----------
   Each element moves the way the real object would: tape unrolls, pencil draws, tags swing on their
   strings, plates get stamped, rust spreads into the letters, spec lines get typed.
   Only transform-family props / opacity / clip-path / background-position. Hidden states exist only with JS,
   on screen, without reduced motion. */
.tag { transform-origin: 50% 1.3rem; }            /* hangs from its hole */
@media screen and (prefers-reduced-motion: no-preference) {
  /* measuring tape unrolls from the left, then its marks appear one by one */
  .js .how .tape { clip-path: inset(-1rem -1rem -1rem -1rem); transition: clip-path 1.1s cubic-bezier(.6,0,.2,1); }
  .js .tape-run:not(.in) .tape { clip-path: inset(-1rem 100% -1rem -1rem); }
  .js .tape-marks > li { transition: opacity .45s, translate .45s; transition-delay: calc(.7s + var(--i) * .25s); }
  .js .tape-run:not(.in) .tape-marks > li { opacity: 0; translate: -.6rem 0; }

  /* door frame: pencil line drawn, then the hand-written label */
  .js .doorframe .mark::before { transform-origin: left; transition: scale .7s cubic-bezier(.5,0,.2,1) calc(.2s + var(--i) * .7s); }
  .js .doorframe:not(.in) .mark::before { scale: 0 1; }
  .js .doorframe .mark span { transition: opacity .5s calc(.8s + var(--i) * .7s); }
  .js .doorframe:not(.in) .mark span { opacity: 0; }

  /* price tags swing in on their strings and settle */
  .js .tag-rack:not(.in) .tag { opacity: 0; }
  .js .tag-rack.in .tag { animation: tag-swing 1.6s ease-in-out calc(var(--i) * .15s) both; }

  /* plates and the −20 % stamp get stamped */
  /* size-table plates ride on their row's reveal: the row's clip-path hides them from the observer */
  .js .plate:not(.in):not(.size-table .plate), .js .stamp:not(.in) { opacity: 0; }
  .js .plate.in, .js .stamp.in { animation: stamp-in .45s cubic-bezier(.2,.9,.3,1) both; }

  /* spec sheet: rows slide in; spec lines and size-table rows get typed */
  .js .why-list > li { transition: opacity .5s, translate .5s; transition-delay: calc(var(--i) * .12s); }
  .js .why-list:not(.in) > li { opacity: 0; translate: -.8rem 0; }
  .js .spec > li, .js .size-table tbody > tr > * {
    clip-path: inset(0 0 0 0);
    transition: clip-path .4s steps(12, end) calc(var(--i) * .1s);
  }
  .js .spec:not(.in) > li, .js .size-table tbody:not(.in) > tr > * { clip-path: inset(0 100% 0 0); }

  /* big headings: the patina spreads into the letters from the left (base color always readable) */
  @supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .js h1:not(.rust *), .js h2:not(.rust *) {
      background-image: linear-gradient(90deg, transparent 45%, var(--heading-rust, #A54B26) 55%), var(--p-url);
      background-size: 220% 100%, var(--p-tile);
      background-repeat: no-repeat, repeat;
      background-position: 0 0, 0 0;
      transition: background-position 1.6s cubic-bezier(.4,0,.2,1);
    }
    .js h1:not(.rust *):not(.in), .js h2:not(.rust *):not(.in) { background-position: 100% 0, 0 0; }
  }

  /* ghost words: native scroll-driven, no JS; browsers without it just show them still */
  @supports (animation-timeline: view()) {
    .ghost-word { animation: ghost-drift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    .footer-hrdza { animation: hrdza-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  }
}
@keyframes tag-swing {
  0%   { opacity: 0; rotate: 16deg; }
  25%  { opacity: 1; rotate: -8deg; }
  50%  { rotate: 4deg; }
  72%  { rotate: -1.5deg; }
  100% { opacity: 1; rotate: 0deg; }
}
@keyframes stamp-in {
  0%   { opacity: 0; scale: 1.08; rotate: -2deg; }
  60%  { opacity: 1; scale: .98; }
  100% { opacity: 1; scale: 1; rotate: 0deg; }
}
@keyframes ghost-drift { to { translate: 0 4rem; opacity: .3; } }
@keyframes hrdza-rise { from { translate: 0 35%; } }



/* ---------- patina toggle ---------- */
.patina-toggle {
  position: absolute; z-index: 2;
  top: calc(1.5rem + env(safe-area-inset-top, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px));
  display: inline-flex; gap: 0; padding: 0; border: 1.5px solid var(--bone); border-radius: 2px;
  background: rgb(42 44 46 / .55); cursor: pointer;
  font: 500 .68rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--bone);
}
.patina-toggle span { padding: .5rem .6rem; }
.patina-toggle [data-v="iron"] { background: var(--bone); color: var(--steel); }
:root[data-patina="corten"] .patina-toggle [data-v="iron"] { background: none; color: var(--bone); }
:root[data-patina="corten"] .patina-toggle [data-v="corten"] { background: var(--bone); color: var(--steel); }
@media (max-width: 759px) {   /* phone: own line under the wordmark instead of over it */
  .patina-toggle { position: static; display: flex; width: max-content; margin-top: 1rem; }
}

/* ---------- the ride: a bike rolls down the page as you scroll and grows 14" → 26" ----------
   app.js moves it (transform only); wheels turn with the distance scrolled. Phones: along the bottom edge,
   wide screens: down a trail in the left margin. Hidden without JS and with reduced motion. */
.ride { display: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  .js .ride { display: block; position: fixed; z-index: 5; pointer-events: none;
    left: 0; right: 0; bottom: 0; height: 46px; }
  .ride::before { content: ""; position: absolute; left: 0; right: 0; bottom: 6px;
    border-bottom: 2px dashed var(--raw); opacity: .6; }
  .ride-bike { position: absolute; left: 0; bottom: 7px; width: 64px; transform-origin: 50% 100%; will-change: transform; }
  .ride-bike svg { display: block; width: 100%; height: auto; fill: none; stroke: var(--text); stroke-width: 7;
    stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
  .ride-bike .frame { stroke: var(--corten); stroke-width: 9; }
  .ride-bike .wheel { transform-box: fill-box; transform-origin: center; }
  .ride-size { position: absolute; left: 100%; bottom: 60%; margin-left: 4px; padding: 1px 4px;
    font: 500 11px/1.2 var(--f-mono); color: var(--text); background: var(--bg); border: 1px solid currentColor; border-radius: 2px; }
  .ride-size.bump { animation: ride-bump .45s ease-out; }
  @media (min-width: 1280px) {
    .js .ride { left: 0; right: auto; top: 0; bottom: 0; width: calc((100vw - var(--max)) / 2); height: auto; }
    .ride::before { left: 50%; right: auto; top: 0; bottom: 0; border-bottom: 0; border-left: 2px dashed var(--raw); }
    .ride-bike { left: calc(50% - 40px); top: 0; bottom: auto; width: 80px; }
  }
}
@keyframes ride-bump { 0% { transform: scale(1.6) rotate(-6deg); } 100% { transform: none; } }

/* ---------- forms as manila folder tabs (app.js shows one panel; without JS all three stay) ---------- */
.form-tabs { display: flex; gap: .4rem; margin-top: 4rem; align-items: flex-end; }
.form-tabs[hidden] { display: none; }
.form-tabs [role="tab"] {
  flex: 1 1 0; min-width: 0; text-align: left; cursor: pointer;
  font: 900 1.05rem/1.1 var(--f-head); text-transform: uppercase; letter-spacing: .06em;
  color: var(--steel); background: var(--tag); border: 0; border-top: 5px solid var(--acc);
  border-radius: 6px 6px 0 0; padding: .7rem .8rem .6rem; opacity: .65;
  transform: translateY(.35rem); transition: transform .2s, opacity .2s;
}
.form-tabs [role="tab"] small { display: block; margin-top: .3rem; font: 500 .68rem/1.2 var(--f-mono);
  text-transform: none; letter-spacing: .02em; }
.form-tabs [role="tab"][aria-selected="true"] { opacity: 1; transform: none; }
.form-tabs [role="tab"]:hover { opacity: .9; }
.js-tabs .form-section { border-top: 5px solid var(--tab-acc, var(--text)); margin-top: 0; }
.js-tabs #predpredaj { --tab-acc: var(--corten); }
.js-tabs #prieskum { --tab-acc: var(--patina); }
.js-tabs #kontakt { --tab-acc: var(--raw); }
.js-tabs .form-section[hidden] { display: none; }
@media (max-width: 520px) { .form-tabs [role="tab"] { font-size: .85rem; padding: .6rem .5rem .5rem; } }
