/* Demo: knjigovodstvena agencija Bilans (fictional). Swiss grid, hard edges, one acid accent. */
:root {
  --paper: #F2F1EA; --ink: #0B0B0C; --acid: #E4FF2E; --grey: #66665F; --line: #0B0B0C;
  --sans: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --focus: #0B0B0C; --dm-ink: #0B0B0C; --dm-tint: #E4FF2E;
  --maxw: 70rem;
}
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; }
a { color: inherit; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 0; }
.sec--ink :focus-visible, .rail :focus-visible { outline-color: var(--acid); }
::selection { background: var(--acid); color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.9rem 1.5rem; border: 2px solid var(--ink); background: var(--acid); color: var(--ink); font: 700 1rem var(--sans); text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform 0.12s, box-shadow 0.12s; }
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn--big { padding: 1.1rem 2rem; font-size: 1.15rem; }
.btn--ink { background: var(--ink); color: var(--acid); box-shadow: 4px 4px 0 rgba(11, 11, 12, 0.3); }
.sec--ink .btn { border-color: var(--acid); box-shadow: 4px 4px 0 var(--acid); }

/* Layout: fixed rail on the left, content on the right */
.shell { display: grid; grid-template-columns: 17rem minmax(0, 1fr); }
.rail { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; justify-content: space-between; align-self: start; height: 100vh; padding: 1.6rem 1.5rem; background: var(--ink); color: var(--paper); border-right: 2px solid var(--ink); }
.rail__row { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-size: 1.3rem; letter-spacing: 0.06em; }
.logo__mark { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; background: var(--acid); color: var(--ink); font-size: 1.5rem; font-weight: 800; letter-spacing: 0; }
.rail__nav { display: grid; margin: 2rem 0; }
.rail__nav a { display: flex; align-items: baseline; gap: 0.9rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(242, 241, 234, 0.2); text-decoration: none; font-size: 1.1rem; font-weight: 600; color: #BDBDB3; transition: color 0.15s, padding 0.15s; }
.rail__nav a::before { content: attr(data-n); font: 500 0.78rem var(--mono); color: #77776F; }
.rail__nav a:hover { color: var(--paper); padding-left: 0.4rem; }
.rail__nav a[aria-current="true"] { color: var(--acid); }
.rail__nav a[aria-current="true"]::before { color: var(--acid); }
.rail__foot p { margin-bottom: 0.8rem; font: 500 1.05rem var(--mono); color: #D8D8CF; }
.rail__foot .btn { width: 100%; box-shadow: 4px 4px 0 var(--acid); border-color: var(--acid); }

.sec { position: relative; padding: clamp(3.5rem, 7vw, 6rem) clamp(1.4rem, 4vw, 4rem); border-bottom: 2px solid var(--ink); }
.sec--ink { background: var(--ink); color: var(--paper); border-bottom-color: var(--paper); }
.idx { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.4rem; font: 600 0.82rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.idx span { padding: 0.15rem 0.5rem; background: var(--ink); color: var(--acid); }
.sec--ink .idx span { background: var(--acid); color: var(--ink); }
.sec h2 { max-width: 14ch; font-size: clamp(2.8rem, 1.2rem + 5.4vw, 6rem); }
.sec__lead { max-width: 36rem; margin-top: 1.2rem; color: var(--grey); font-size: 1.12rem; }
.sec--ink .sec__lead { color: #BDBDB3; }

/* Hero */
.hero { padding-top: clamp(3rem, 6vw, 5rem); }
.hero h1 { max-width: 12ch; font-size: clamp(3.6rem, 0.6rem + 9.4vw, 10.5rem); line-height: 0.98; letter-spacing: -0.06em; }
.hl { background: linear-gradient(var(--acid), var(--acid)) 0 100% / 100% 74% no-repeat; padding: 0 0.08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero__row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.6rem 3rem; margin-top: 2.2rem; }
.hero__lead { max-width: 30rem; font-size: 1.25rem; }
.tape { margin-top: 3rem; border: 2px solid var(--ink); background: var(--ink); color: var(--acid); font-family: var(--mono); box-shadow: 8px 8px 0 var(--acid), 8px 8px 0 2px var(--ink); }
.tape__bar { display: flex; justify-content: space-between; padding: 0.7rem 1rem; border-bottom: 1px solid rgba(228, 255, 46, 0.3); font-size: 0.78rem; letter-spacing: 0.16em; color: #B9CF2A; }
.tape__rows { min-height: 12.6rem; padding: 0.6rem 1rem; }
.tape__rows li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.38rem 0; border-bottom: 1px dashed rgba(228, 255, 46, 0.25); font-size: 0.95rem; animation: row 0.35s ease both; }
.tape__rows li span:last-child { white-space: nowrap; }
.tape__rows li.minus span:last-child { color: #FF8A6A; }
@keyframes row { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tape__sum { display: flex; justify-content: space-between; align-items: baseline; padding: 0.8rem 1rem; border-top: 2px solid var(--acid); font-size: 0.85rem; letter-spacing: 0.16em; }
.tape__sum b { font-size: 1.8rem; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { .tape__rows li { animation: none; } }

/* Services as an index */
.index { margin-top: 2.6rem; border-top: 2px solid var(--ink); }
.index li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 3rem; align-items: center; gap: 1rem; padding: 1.5rem 0.8rem; border-bottom: 1px solid var(--ink); transition: background 0.15s, padding 0.2s; }
.index li:hover { background: var(--acid); padding-left: 1.4rem; }
.num { font: 600 1rem var(--mono); }
.index h3 { font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.8rem); }
.index p { margin-top: 0.3rem; max-width: 36rem; color: var(--grey); }
.index li:hover p { color: var(--ink); }
.arrow { font-size: 2rem; transition: transform 0.2s; }
.index li:hover .arrow { transform: translateX(6px); }

/* Price calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2.5rem 3.5rem; align-items: start; margin-top: 2.8rem; }
.calc__ctl { display: grid; gap: 1.8rem; }
.form-type { display: grid; gap: 0.5rem; margin: 0; padding: 0; border: 0; }
.form-type legend { margin-bottom: 0.6rem; padding: 0; font: 600 0.8rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #BDBDB3; }
.form-type label { position: relative; cursor: pointer; }
.form-type input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.form-type span { display: block; padding: 0.9rem 1.1rem; border: 2px solid rgba(242, 241, 234, 0.35); font-size: 1.1rem; font-weight: 600; transition: all 0.12s; }
.form-type input:checked + span { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.form-type input:focus-visible + span { outline: 3px solid var(--paper); outline-offset: 3px; }
.rng__h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.7rem; }
.rng__h label { font: 600 0.8rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #BDBDB3; }
.rng__h output { font: 600 1.8rem var(--mono); color: var(--acid); }
.rng input[type="range"] { width: 100%; height: 1.6rem; background: transparent; -webkit-appearance: none; appearance: none; }
.rng input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: rgba(242, 241, 234, 0.45); }
.rng input[type="range"]::-moz-range-track { height: 4px; background: rgba(242, 241, 234, 0.45); }
.rng input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 1.5rem; height: 1.5rem; margin-top: -0.65rem; border: 3px solid var(--ink); background: var(--acid); cursor: grab; }
.rng input[type="range"]::-moz-range-thumb { width: 1.2rem; height: 1.2rem; border: 3px solid var(--ink); border-radius: 0; background: var(--acid); cursor: grab; }
.sw { position: relative; display: flex; align-items: center; gap: 0.9rem; cursor: pointer; }
.sw input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sw__box { position: relative; width: 3.2rem; height: 1.7rem; border: 2px solid var(--paper); transition: background 0.15s; }
.sw__box::after { content: ""; position: absolute; left: 3px; top: 3px; width: 1.1rem; height: 1.1rem; background: var(--paper); transition: transform 0.15s, background 0.15s; }
.sw input:checked ~ .sw__box { background: var(--acid); border-color: var(--acid); }
.sw input:checked ~ .sw__box::after { transform: translateX(1.5rem); background: var(--ink); }
.sw input:focus-visible ~ .sw__box { outline: 3px solid var(--paper); outline-offset: 3px; }
.sw b { font-size: 1.1rem; }
.sw i { margin-left: auto; font: 500 0.9rem var(--mono); font-style: normal; color: #BDBDB3; }
.calc__out { padding: 2rem; background: var(--acid); color: var(--ink); border: 2px solid var(--acid); box-shadow: 8px 8px 0 rgba(228, 255, 46, 0.25); position: sticky; top: 2rem; }
.calc__lbl { font: 600 0.8rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.calc__sum { margin-top: 0.3rem; font-weight: 800; font-size: clamp(3.4rem, 2rem + 4vw, 6rem); line-height: 1; letter-spacing: -0.05em; }
.calc__sum small { font-size: 0.3em; letter-spacing: 0; }
.calc__lines { display: grid; gap: 0.3rem; margin: 1.2rem 0; padding: 1rem 0; border-block: 2px solid var(--ink); font: 500 0.95rem var(--mono); }
.calc__lines li { display: flex; justify-content: space-between; gap: 1rem; }
.calc__year { margin-bottom: 1.2rem; font-size: 1.05rem; }
.calc__out .btn { width: 100%; }

/* Checklist */
.prog { margin-top: 2.4rem; max-width: 46rem; }
.prog__bar { height: 1.4rem; border: 2px solid var(--ink); background: var(--paper); }
.prog__fill { width: 0; height: 100%; background: var(--ink); transition: width 0.4s cubic-bezier(.3, .7, .2, 1); }
.prog__txt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin-top: 0.9rem; }
.prog__txt b { font: 800 2.6rem var(--sans); letter-spacing: -0.04em; }
.prog__txt span { color: var(--grey); }
.check { margin-top: 1.4rem; border-top: 2px solid var(--ink); }
.check li { border-bottom: 1px solid var(--ink); }
.check label { display: flex; align-items: center; gap: 1rem; padding: 1rem 0.5rem; cursor: pointer; font-size: 1.15rem; font-weight: 600; transition: background 0.12s; }
.check label:hover { background: rgba(228, 255, 46, 0.5); }
.check input { position: absolute; opacity: 0; }
.cbox { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; flex: none; border: 2px solid var(--ink); background: var(--paper); }
.cbox::after { content: ""; width: 0.55rem; height: 0.95rem; margin-top: -0.2rem; border-right: 3px solid var(--acid); border-bottom: 3px solid var(--acid); transform: rotate(40deg) scale(0); transition: transform 0.12s; }
.check input:checked + .cbox { background: var(--ink); }
.check input:checked + .cbox::after { transform: rotate(40deg) scale(1); }
.check input:focus-visible + .cbox { outline: 3px solid var(--ink); outline-offset: 3px; }
.check input:checked ~ * { text-decoration: none; }

/* Photos in a flat acid duotone */
.firma { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2.4rem 3.5rem; align-items: start; }
.firma .prog { margin-top: 2.4rem; }
.duo { position: relative; margin: 2.4rem 0 0; border: 2px solid var(--ink); background: var(--acid); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.duo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.25); mix-blend-mode: multiply; }
.contact__side .duo { margin: 0 0 2rem; }

/* FAQ */
.qa { margin-top: 2.4rem; max-width: 50rem; border-top: 2px solid var(--paper); }
.qa details { border-bottom: 1px solid rgba(242, 241, 234, 0.4); }
.qa summary { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 0.2rem; cursor: pointer; list-style: none; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none; border: 2px solid var(--acid); color: var(--acid); font: 500 1.5rem var(--mono); transition: transform 0.2s, background 0.2s, color 0.2s; }
.qa details[open] summary::after { content: "\2212"; background: var(--acid); color: var(--ink); }
.qa details p { padding: 0 3.4rem 1.5rem 0.2rem; color: #BDBDB3; font-size: 1.1rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2.5rem 4rem; align-items: start; margin-top: 2.4rem; }
.contact__lines { border-top: 2px solid var(--ink); }
.contact__lines li { display: grid; gap: 0.1rem; padding: 1rem 0; border-bottom: 1px solid var(--ink); }
.contact__lines b { font: 600 0.8rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); }
.contact__lines span { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-bottom: 1.4rem; }
.fld { display: grid; gap: 0.3rem; }
.fld--wide { grid-column: 1 / -1; }
.fld label { font: 600 0.8rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.fld input, .fld select, .fld textarea { width: 100%; padding: 0.85rem 0.9rem; border: 2px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink); font-size: 1.05rem; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; background: var(--acid); }
.fld textarea { min-height: 7rem; resize: vertical; }
.is-invalid > input, .is-invalid > select, .is-invalid > textarea { border-color: #D1330B !important; background-color: #FFF3EF !important; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; padding: 1.6rem clamp(1.4rem, 4vw, 4rem); font: 500 0.88rem var(--mono); }
.foot a { font-weight: 700; }

@media (max-width: 62rem) {
  .shell { display: block; }
  .rail { position: sticky; top: 0; flex-direction: column; height: auto; padding: 0.7rem 1rem; border-right: 0; border-bottom: 2px solid var(--ink); }
  .rail__row { width: 100%; }
  .menu-btn { display: block; color: var(--paper); }
  .rail__nav { display: none; margin: 0.8rem 0 0.4rem; }
  .rail__nav.open { display: grid; }
  .rail__foot { display: none; }
  .calc, .contact, .firma { grid-template-columns: minmax(0, 1fr); }
  .calc__out { position: static; }
  .hero__row { align-items: start; }
}
@media (max-width: 36rem) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .index li { grid-template-columns: 3rem minmax(0, 1fr); }
  .arrow { display: none; }
  .qa summary { font-size: 1.25rem; }
  .qa details p { padding-right: 0; }
  .calc__out { padding: 1.4rem; }
}
