/* ==========================================================================
   Kedja Cykelverkstad: workshop repair-tag system
   Tokens first. A copied site should mostly change this block.
   ========================================================================== */


:root {
  color-scheme: light;

  /* Ground: galvanized zinc sheet */
  --zinc: #dce1e2;
  --zinc-deep: #c9d0d2;
  --zinc-line: #a9b3b6;

  /* Ink */
  --ink: #141618;
  --ink-2: #353c40;          /* 8.9:1 on zinc */
  --rule: rgb(20 22 24 / .6);

  /* Tag stock */
  --yellow: #f4c22b;
  --yellow-deep: #d9a70f;
  --red: #c8352a;
  --red-ink: #fff4ef;
  --green: #2d7f52;
  --green-ink: #f2fbf5;

  /* Rubber-stamp ink */
  --violet: #5a3ea6;

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-stencil: "Big Shoulders Stencil Display", "Big Shoulders Display", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space-section: clamp(4.5rem, 10vw, 8rem);
  --radius-tag: 6px;
  --shadow-tag: 0 1px 1px rgb(20 22 24 / .18), 0 10px 24px -8px rgb(20 22 24 / .35);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; scrollbar-color: var(--ink-2) var(--zinc-deep); }
body {
  margin: 0;
  background: var(--zinc);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  font-variant-numeric: tabular-nums;
  caret-color: var(--violet);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--yellow); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: .95; letter-spacing: -.01em; text-transform: uppercase; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); }
h3 { font-size: 1.75rem; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--violet); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; background: var(--ink); color: var(--zinc); padding: .6rem 1rem; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap.narrow { --wrap: 46rem; }
.section { padding-block: var(--space-section); }
.section-head { display: grid; gap: 1rem; max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { color: var(--ink-2); max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .7rem 1.4rem;
  font: 600 1.05rem/1 var(--font-body); letter-spacing: .01em;
  text-decoration: none; border: 2px solid var(--ink); border-radius: 3px; cursor: pointer;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background-color .18s;
}
.btn-ink { background: var(--ink); color: var(--zinc); box-shadow: 0 2px 0 rgb(20 22 24 / .25), 0 6px 14px -6px rgb(20 22 24 / .5); }
.btn-ink:hover { transform: translateY(-1px); box-shadow: 0 3px 0 rgb(20 22 24 / .25), 0 10px 18px -8px rgb(20 22 24 / .55); text-decoration: none; }
.btn-ink:active { transform: translateY(1px); box-shadow: 0 1px 0 rgb(20 22 24 / .25); }
.btn:disabled { background: transparent; color: var(--ink-2); border-style: dashed; box-shadow: none; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; opacity: .8; }
.btn-block { width: 100%; }

/* ---------- Demo strip + header ---------- */
.demo-strip { background: var(--ink); color: var(--zinc); font-size: .85rem; text-align: center; padding: .45rem var(--gutter); }

.site-header { position: sticky; top: 0; z-index: 10; background: rgb(220 225 226 / .92); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 2px solid var(--ink); }
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand-mark { width: 2.25rem; height: 2.25rem; color: var(--ink); }
.brand-name { font: 800 1.9rem/1 var(--font-display); text-transform: uppercase; }
.brand-sub { font: 600 .8rem/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-top: .35rem; }
.site-nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: .6rem .8rem; font-weight: 600; text-decoration: none; border-radius: 3px; }
.site-nav a:hover { background: var(--zinc-deep); }
.header-cta { min-height: 2.6rem; padding-inline: 1.1rem; }

@media (max-width: 52rem) {
  .site-nav { display: none; }
  .brand-sub { display: none; }
}

/* ---------- Tags (shared) ---------- */
.tag {
  --notch: 1.6rem;
  position: relative;
  padding: 3.2rem 1.5rem 1.5rem;
  border-radius: var(--radius-tag);
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%, 0 var(--notch));
  filter: drop-shadow(0 12px 16px rgb(20 22 24 / .28)) drop-shadow(0 1px 1px rgb(20 22 24 / .25));
}
.tag-eyelet {
  position: absolute; top: 1rem; left: 50%; translate: -50% 0;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--zinc);
  box-shadow: 0 0 0 .3rem rgb(255 255 255 / .55), inset 0 2px 3px rgb(20 22 24 / .35);
}
.tag-yellow { background: var(--yellow); color: var(--ink); }
.tag-red { background: var(--red); color: var(--red-ink); }
.tag-green { background: var(--green); color: var(--green-ink); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 8vw, 6rem); overflow: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.hero-copy { padding-top: clamp(1rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(3.4rem, 8.4vw, 6rem); line-height: .9; }
.lede { margin-top: 1.5rem; font-size: 1.2rem; max-width: 34rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.phone-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.phone-link svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; }
.phone-link:hover span { text-decoration: underline; text-decoration-color: var(--violet); }
.hero-facts { display: flex; gap: 2.5rem; margin: 2.75rem 0 0; padding-top: 1.25rem; border-top: 2px solid var(--ink); max-width: 30rem; }
.hero-facts dt { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.hero-facts dd { margin: .2rem 0 0; font: 800 2rem/1 var(--font-display); }

/* The hanging quote tag */
.tag-stage { position: relative; padding-top: 5.5rem; justify-self: center; width: min(100%, 25rem); }
.tag-string { position: absolute; top: 0; left: 50%; width: 3rem; height: 7rem; translate: -50% 0; overflow: visible; }
.tag-string path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.tag-stage::before { /* the hook */
  content: ""; position: absolute; top: -.35rem; left: 50%; translate: -50% 0;
  width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--ink-2);
  box-shadow: 0 2px 3px rgb(20 22 24 / .4);
}
.quote { transform-origin: 50% -5.5rem; }
.quote.swing { animation: swing 1.4s var(--ease-out); }
@keyframes swing {
  0% { rotate: 0deg; }
  18% { rotate: 2.6deg; }
  40% { rotate: -1.6deg; }
  62% { rotate: .8deg; }
  82% { rotate: -.3deg; }
  100% { rotate: 0deg; }
}

.quote fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.tag-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; border-bottom: 2px solid var(--ink); }
.tag-head h2 { font-size: 2.1rem; }
.tag-row { padding-block: .9rem; border-bottom: 1px solid var(--rule); }
.tag-row legend + * { clear: both; }
.tag-row legend { float: left; width: 100%; margin-bottom: .55rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: .55rem .25rem; font-weight: 600; transition: background-color .15s, color .15s; }
.seg label + label span { border-left: 2px solid var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--yellow); }
.seg input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: -5px; }
.seg input:not(:checked):hover + span { background: var(--yellow-deep); }

.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.jobs label { display: grid; grid-template-columns: 1.5rem 1fr auto; align-items: center; gap: .7rem; padding: .35rem .25rem; border-radius: 3px; cursor: pointer; }
.jobs label:hover { background: rgb(20 22 24 / .07); }
.jobs input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 1.3rem; height: 1.3rem; border: 2px solid var(--ink); border-radius: 2px; position: relative; background: rgb(255 255 255 / .25); }
.box::after { /* the hand-drawn tick */
  content: ""; position: absolute; left: .18rem; top: -.2rem; width: .55rem; height: 1rem;
  border: solid var(--violet); border-width: 0 .22rem .22rem 0; rotate: 40deg;
  scale: 0; transform-origin: 50% 80%; transition: scale .22s var(--ease-out);
}
.jobs input:checked + .box::after { scale: 1; }
.jobs input:focus-visible + .box { outline: 3px solid var(--violet); outline-offset: 2px; }
.job-name { font-weight: 500; }
.job-price { font-weight: 600; }
.job-price::after { content: " kr"; font-weight: 400; }

.tag-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding-top: 1rem; }
.tag-total .label { display: block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.tag-total output { font: 800 2.6rem/1 var(--font-display); }
.tag-total .unit { font-weight: 600; margin-left: .25rem; }
.tag-total > div:last-child { text-align: right; }
.tag-note { margin: .5rem 0 1rem; font-size: .92rem; min-height: 1.5em; }

/* Rubber stamp */
.stamp {
  font: 800 1.9rem/1 var(--font-stencil); color: var(--violet);
  border: 3px solid currentColor; border-radius: 4px; padding: .2rem .5rem .1rem;
  rotate: -7deg; opacity: .9; mix-blend-mode: multiply;
  mask-image: radial-gradient(circle at 30% 40%, #000 55%, rgb(0 0 0 / .75) 70%, #000 85%);
}
.stamp.stamped { animation: stamp .45s var(--ease-out); }
@keyframes stamp {
  from { scale: 1.9; opacity: 0; filter: blur(4px); }
  60% { scale: .95; opacity: .95; filter: blur(0); }
  to { scale: 1; opacity: .9; }
}

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-top: 0; }
  .tag-stage { width: min(100%, 24rem); }
}

/* ---------- Price board ---------- */
.prices { background: var(--ink); color: var(--zinc); }
.prices .section-head p, .prices .fine { color: #b9c2c5; }
.board { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.board th, .board td { text-align: left; padding: 1rem .75rem; border-bottom: 1px solid #3c4448; vertical-align: middle; }
.board thead th { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #b9c2c5; border-bottom: 2px solid var(--zinc); }
.board tbody th { font: 800 1.5rem/1.05 var(--font-display); text-transform: uppercase; white-space: nowrap; }
.board td { color: #d5dcde; }
.board .num { text-align: right; font-weight: 600; white-space: nowrap; color: var(--zinc); }
.board-feature th, .board-feature .num { color: var(--yellow); }
.col-time { width: 28%; }
.col-time .bar { display: inline-block; vertical-align: middle; height: .7rem; width: calc(var(--h) / 3 * 100% - 4.5rem); min-width: 1rem; background: var(--yellow); border-radius: 1px; margin-right: .6rem; }
.col-time .t { font-size: .9rem; color: #b9c2c5; }
.fine { margin-top: 1.5rem; font-size: .95rem; max-width: 62ch; }

@media (max-width: 44rem) {
  .board thead { display: none; }
  .board, .board tbody, .board tr { display: block; }
  .board tr { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid #3c4448; }
  .board th, .board td { padding: 0; border: 0; }
  .board td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .board .col-time { grid-column: 1 / -1; grid-row: 3; width: auto; }
  .board .num { grid-column: 2; grid-row: 1; }
  .col-time .bar { width: calc(var(--h) / 3 * 70%); }
}

/* ---------- Rental rail ---------- */
.rent { padding-bottom: calc(var(--space-section) - 1rem); }
.rail {
  --rail-y: 1.6rem;
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 19rem);
  justify-content: center; align-items: start; gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: 0 var(--gutter) 2.5rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.rail::before { /* the steel rail */
  content: ""; position: absolute; left: 0; right: 0; top: var(--rail-y);
  height: .5rem; background: linear-gradient(var(--zinc-line), var(--ink-2)); box-shadow: 0 3px 4px rgb(20 22 24 / .3);
  min-width: 100%;
}
.rail-tag { scroll-snap-align: center; margin-top: 1rem; transform-origin: 50% 0; display: grid; gap: .75rem; padding-top: 3.4rem; }
.rail-tag:nth-child(1) { rotate: -2deg; }
.rail-tag:nth-child(2) { rotate: 1.2deg; margin-top: 1.4rem; }
.rail-tag:nth-child(3) { rotate: -.8deg; }
.rail-tag .tag-eyelet { background: var(--ink-2); }
.rail-tag h3 { font-size: 2.2rem; }
.rail-tag.tall { padding-bottom: 2.5rem; }
.rail-tag .rate { font-weight: 600; padding-top: .75rem; border-top: 2px solid currentColor; }
.rail-tag .rate span { font: 800 2.4rem/1 var(--font-display); margin-right: .15rem; }
@media (hover: hover) {
  .rail-tag { transition: rotate .6s var(--ease-out); }
  .rail-tag:hover { rotate: 0deg; }
}
@media (max-width: 60rem) { .rail { justify-content: start; } }

/* ---------- Flow stubs ---------- */
.flow { padding-top: calc(var(--space-section) - 2rem); }
.flow h2 { margin-bottom: 2.5rem; max-width: 18ch; }
.stubs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: stub; }
.stubs li {
  counter-increment: stub;
  display: grid; gap: .6rem; align-content: start;
  padding: 1.5rem 1.25rem 1.75rem;
  background: #eef1f1;
  border: 2px solid var(--ink);
  margin-left: -2px;
  position: relative;
}
.stubs li:first-child { margin-left: 0; }
.stubs li + li { border-left-style: dashed; } /* perforation between stubs */
.stubs li::before { content: "Nº " counter(stub); font: 800 1rem/1 var(--font-stencil); color: var(--violet); }
.stubs strong { font: 800 1.75rem/1 var(--font-display); text-transform: uppercase; }
.stubs span { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 52rem) {
  .stubs { grid-template-columns: 1fr 1fr; }
  .stubs li:nth-child(3) { margin-left: 0; border-left-style: solid; }
  .stubs li:nth-child(n + 3) { margin-top: -2px; border-top-style: dashed; }
}
@media (max-width: 30rem) {
  .stubs { grid-template-columns: 1fr; }
  .stubs li { margin-left: 0; border-left-style: solid; }
  .stubs li + li { margin-top: -2px; border-top-style: dashed; }
}

/* ---------- Hours ---------- */
.hours { background: var(--yellow); }
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 8vw, 6rem); }
.open-state { margin: 1rem 0 1.25rem; font: 800 1.35rem/1.2 var(--font-stencil); color: var(--violet); min-height: 1.6rem; }
.hours-table { width: 100%; max-width: 26rem; border-collapse: collapse; font-size: 1.1rem; }
.hours-table th, .hours-table td { padding: .6rem 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 500; }
.hours-table td { text-align: right; font-weight: 600; }
.hours-table tr.today th, .hours-table tr.today td { font-weight: 700; }
.hours-table tr.today th::after { content: "today"; margin-left: .6rem; font: 800 .8rem/1 var(--font-stencil); text-transform: uppercase; color: var(--violet); border: 2px solid currentColor; padding: .1rem .3rem; vertical-align: .15em; }
.find h2 { margin-bottom: 1.25rem; }
.find address { font-style: normal; font-size: 1.35rem; font-weight: 600; line-height: 1.4; margin-bottom: 1rem; }
.find p { max-width: 40ch; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .4rem; font-size: 1.15rem; font-weight: 600; }
@media (max-width: 44rem) { .hours-grid { grid-template-columns: 1fr; } }

/* ---------- Booking ---------- */
.book-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.book-intro { display: grid; gap: 1rem; position: sticky; top: 6rem; }
.book-intro > p { color: var(--ink-2); max-width: 40ch; }
.book-summary { margin-top: .5rem; padding: 1rem 1.25rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 3px; }
.book-summary .label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.book-form { display: grid; gap: 1.25rem; background: #eef1f1; border: 2px solid var(--ink); border-radius: 4px; padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: 0 14px 30px -18px rgb(20 22 24 / .5); }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; }
.opt { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 2px solid var(--ink-2); border-radius: 3px; padding: .7rem .8rem; min-height: 3rem; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field ::placeholder { color: #5c6569; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgb(90 62 166 / .3); }
.field.invalid input, .field.invalid select { border-color: var(--red); background: #fff6f5; }
.err { color: #a3261c; font-size: .92rem; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.form-status { font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: var(--green); }
.form-status.ok::before { content: "Booked (demo). "; font-family: var(--font-stencil); color: var(--violet); }
@media (max-width: 52rem) {
  .book-grid { grid-template-columns: 1fr; }
  .book-intro { position: static; }
}

/* ---------- FAQ ---------- */
.faq { padding-top: 0; }
.faq h2 { margin-bottom: 2rem; }
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-of-type { border-bottom: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; font-weight: 600; font-size: 1.15rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: .75rem; height: .75rem; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; rotate: 45deg; translate: 0 -25%; transition: rotate .25s var(--ease-out); }
.faq details[open] summary::after { rotate: -135deg; translate: 0 25%; }
.faq summary:hover { color: var(--violet); }
.faq details p { padding: 0 0 1.25rem; max-width: 62ch; color: var(--ink-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9c2c5; padding-block: 2.5rem; font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline; justify-content: space-between; }
.footer-brand { font: 800 1.5rem/1 var(--font-display); text-transform: uppercase; color: var(--zinc); }
.site-footer a { color: var(--zinc); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
