/* Vuokrakalu — project layer on top of the LainaLaite design system.
   tokens.css + components.css are the design system and stay untouched;
   everything specific to this site lives here. */

/* Loaded by a <link> in the page, ahead of this file, so the three
   stylesheets download in parallel. The @import that used to be here forced
   them into three serial round trips on the critical render path. */

/* Several component classes set `display`, which beats the UA sheet's
   `[hidden] { display: none }`. Make the attribute win everywhere. */
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
/* components.css gives .ll-topbar its colours only — layout is ours. */
.ll-topbar__inner {
  display: flex; align-items: center; gap: var(--ll-6);
  max-width: var(--ll-maxw); margin: 0 auto;
  padding: var(--ll-4) var(--ll-gutter-m);
}
@media (min-width: 768px) { .ll-topbar__inner { padding-inline: var(--ll-gutter-d); } }
/* .ll-topbar a in components.css is more specific than .ll-wordmark — restate it here */
.ll-topbar .ll-wordmark {
  font-family: var(--ll-font-display); font-weight: 800; font-size: 1.25rem;
  letter-spacing: -.02em; color: #fff; text-decoration: none; flex: none;
}
.ll-topbar .ll-wordmark em { font-style: normal; color: var(--ll-gold); }
.ll-topbar .ll-wordmark:hover { color: #fff; text-decoration: none; }
.ll-topbar__nav { display: none; gap: var(--ll-5); list-style: none; margin: 0; padding: 0; }
@media (min-width: 860px) { .ll-topbar__nav { display: flex; } }
.ll-topbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--ll-3); }
.ll-pill {
  font: 500 var(--ll-label)/1 var(--ll-font-mono); letter-spacing: var(--ll-ls-label);
  color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--ll-r-chip); padding: 5px 11px; white-space: nowrap;
}
.ll-topbar .ll-btn--ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.5);
  min-height: 40px; font-size: .8125rem;
}
.ll-topbar .ll-btn--ghost:hover { background: rgba(255,255,255,.1); }
/* Mobile nav lives in the footer instead of a hamburger — see .ll-footer__nav */

/* ---------- Hero ---------- */
.ll-hero { background: var(--ll-ink); color: #fff; }
.ll-hero__inner {
  max-width: var(--ll-maxw); margin: 0 auto;
  padding: var(--ll-6) var(--ll-gutter-m) var(--ll-12);
  display: grid; gap: var(--ll-6); align-items: center;
}
@media (min-width: 768px) { .ll-hero__inner { padding-inline: var(--ll-gutter-d); } }
@media (min-width: 900px) {
  .ll-hero__inner { grid-template-columns: 1.05fr .95fr; gap: 44px; padding-block: var(--ll-8) 56px; }
}
.ll-hero h1 { color: #fff; }
.ll-hero h1 em { font-style: normal; color: var(--ll-apricot); }
.ll-hero__lead { color: rgba(255,255,255,.82); max-width: 44ch; margin: var(--ll-4) 0 0; font-size: 1rem; line-height: 1.6; }
.ll-hero__actions { display: flex; flex-wrap: wrap; gap: var(--ll-3); align-items: center; margin-top: var(--ll-6); }
.ll-hero__link { color: var(--ll-gold); font-weight: 600; font-size: .875rem; }
.ll-hero__link:hover { color: #fff; }
.ll-hero__art {
  min-height: 220px; border-radius: var(--ll-r-panel); overflow: hidden;
  background: repeating-linear-gradient(135deg, #37625E 0 10px, #2E5855 10px 20px);
  display: none;
}
@media (min-width: 900px) { .ll-hero__art { display: block; min-height: 280px; } }
.ll-hero__art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Search card, sitting between the hero and the catalogue.
   The bottom margin belongs here rather than on .ll-sectionhead: that is the
   first child of .ll-shell, and `.ll-shell > *:first-child { margin-top: 0 }`
   below zeroes its margin, which left the heading touching the search box. */
.ll-searchwrap { max-width: var(--ll-maxw); margin: var(--ll-5) auto var(--ll-8); padding-inline: var(--ll-gutter-m); position: relative; z-index: 3; }
@media (min-width: 768px) { .ll-searchwrap { padding-inline: var(--ll-gutter-d); } }
.ll-search {
  display: flex; gap: var(--ll-3); align-items: center;
  background: var(--ll-surface); border: 1px solid var(--ll-border);
  border-radius: 16px; box-shadow: var(--ll-shadow-panel); padding: var(--ll-2) var(--ll-2) var(--ll-2) var(--ll-4);
}
.ll-search input {
  flex: 1; min-width: 0; min-height: 44px; border: 0; background: none;
  font: 400 .9375rem var(--ll-font-ui); color: var(--ll-ink);
}
.ll-search input:focus { outline: none; }
.ll-search input::placeholder { color: var(--ll-ink-45); }
.ll-search .ll-btn { min-height: 44px; }

/* ---------- Section headers ---------- */
.ll-sectionhead {
  display: flex; flex-wrap: wrap; gap: var(--ll-3);
  align-items: baseline; justify-content: space-between;
  margin: var(--ll-8) 0 var(--ll-4);
}
.ll-sectionhead .ll-h2 { margin: 0; }

/* ---------- Tool cards ---------- */
.ll-card { display: flex; flex-direction: column; }
.ll-card__body > .ll-card__meta { margin-top: var(--ll-2); }
.ll-card__body { display: flex; flex-direction: column; flex: 1; }
.ll-card__desc {
  font-size: var(--ll-small); line-height: 1.5; color: var(--ll-ink-70);
  margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ll-card__foot { display: flex; align-items: baseline; gap: 9px; margin-top: auto; padding-top: var(--ll-3); }
.ll-card__cta { margin-top: var(--ll-3); }

/* Image carousel inside .ll-card__media.
   The media box is a flex item, so its `min-height: auto` would let a tall
   portrait photo win over the 4:3 aspect-ratio. Pin the image instead. */
.ll-card__media { flex: none; min-height: 0; overflow: hidden; }
.ll-card__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* …which also means the badge needs to be lifted above it */
.ll-card__media .ll-badge { z-index: 2; }
.ll-card__media--empty { display: grid; place-items: center; }
.ll-card__media--empty span { font: 400 1.75rem/1 var(--ll-font-ui); opacity: .35; }
.ll-imgnav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(31,75,74,.70); color: #fff;
  font: 400 1.4rem/1 var(--ll-font-ui); cursor: pointer; z-index: 2;
  display: grid; place-items: center;
  opacity: 0; transition: opacity var(--ll-dur) var(--ll-ease);
}
.ll-card__media:hover .ll-imgnav,
.ll-imgnav:focus-visible { opacity: 1; }
.ll-imgnav:hover { background: rgba(31,75,74,.92); }
.ll-imgnav--prev { left: 8px; }
.ll-imgnav--next { right: 8px; }
.ll-imgcount {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(31,75,74,.72); color: #fff; border-radius: var(--ll-r-badge);
  padding: 3px 8px; font: 500 .6875rem/1.2 var(--ll-font-mono);
}
@media (hover: none) { .ll-imgnav { opacity: 1; } }

/* ---------- "Näin se toimii" steps ---------- */
/* auto-fit rather than a fixed column count: the front page has three of these
   and the FAQ has four, and a hard repeat(3, 1fr) pushed the FAQ's fourth card
   onto a row of its own. Columns now follow the available width. */
.ll-howto {
  display: grid; gap: var(--ll-4); margin: var(--ll-8) 0;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
@media (min-width: 768px) { .ll-howto { gap: var(--ll-5); } }
.ll-howto__card { background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-r-card); padding: var(--ll-5); }
.ll-howto__n { font: 500 var(--ll-label)/1 var(--ll-font-mono); letter-spacing: .08em; color: var(--ll-teal); }
.ll-howto__t { font: 600 1rem/1.3 var(--ll-font-ui); margin-top: var(--ll-2); }
.ll-howto__d { font-size: var(--ll-small); line-height: 1.55; color: var(--ll-ink-70); margin-top: 5px; }

/* ---------- Contact ---------- */
.ll-contact { display: grid; gap: var(--ll-6); margin: var(--ll-8) 0; }
@media (min-width: 900px) { .ll-contact { grid-template-columns: 1fr 1fr; gap: var(--ll-8); } }
.ll-contact__method { display: flex; gap: var(--ll-3); align-items: flex-start; padding: var(--ll-3) 0; border-bottom: 1px solid var(--ll-hairline); }
.ll-contact__method:last-child { border-bottom: 0; }
.ll-contact__icon { font-size: 1.25rem; line-height: 1.4; flex: none; }

/* ---------- Footer ---------- */
.ll-footer__inner {
  max-width: var(--ll-maxw); margin: 0 auto;
  padding: var(--ll-8) var(--ll-gutter-m);
  display: grid; gap: var(--ll-5);
}
@media (min-width: 768px) { .ll-footer__inner { padding-inline: var(--ll-gutter-d); } }
@media (min-width: 860px) { .ll-footer__inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--ll-6); } }
.ll-footer__brand .ll-wordmark { color: #fff; display: block; }
.ll-footer__tagline { margin-top: var(--ll-2); max-width: 34ch; }
.ll-footer__col h3 { color: #fff; font: 600 .8125rem/1.9 var(--ll-font-ui); margin: 0; }
.ll-footer__col ul { list-style: none; margin: 0; padding: 0; }
.ll-footer__legal {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: var(--ll-4) var(--ll-gutter-m);
  max-width: var(--ll-maxw); margin: 0 auto;
  font-size: .75rem; color: rgba(255,255,255,.55);
}
@media (min-width: 768px) { .ll-footer__legal { padding-inline: var(--ll-gutter-d); } }

/* ---------- Content pages ---------- */
.ll-pagehead { background: var(--ll-surface-sunk); border-bottom: 1px solid var(--ll-border); }
.ll-pagehead__inner { max-width: var(--ll-maxw); margin: 0 auto; padding: var(--ll-8) var(--ll-gutter-m); }
@media (min-width: 768px) { .ll-pagehead__inner { padding-inline: var(--ll-gutter-d); } }

/* The page header is a full-bleed band; content butting straight up against its
   bottom border read as a mistake. Give the first block room to breathe. */
.ll-pagehead + .ll-shell,
.ll-pagehead + main .ll-shell { padding-top: var(--ll-8); }
.ll-shell > .ll-article:first-child,
.ll-shell > *:first-child { margin-top: 0; }

/* One width for everything in an article — paragraphs, lists and note boxes
   all run to the column edge. An earlier attempt kept prose at a narrower
   typographic measure, but next to a full-width note box that reads as the
   text being cut off rather than as a deliberate measure. */
.ll-article { max-width: none; }
.ll-article h2 { font-family: var(--ll-font-display); font-weight: 400; font-size: var(--ll-h2);
                 letter-spacing: -.02em; margin: var(--ll-8) 0 var(--ll-3); }
.ll-article h3 { font: 600 var(--ll-h3)/1.4 var(--ll-font-ui); margin: var(--ll-6) 0 var(--ll-2); }
.ll-article p, .ll-article li { color: var(--ll-ink-80); }
.ll-article ul, .ll-article ol { padding-left: 1.2em; }
.ll-article li { margin-bottom: 6px; }
.ll-article > :first-child { margin-top: 0; }

/* FAQ answers are UI rows rather than essays — full width reads better and
   matches the search box and category cards above them. */
.ll-faq__a > p, .ll-faq__a > ul { max-width: none; }

/* The last block before the dark footer needs separation, or a coloured note
   box sits flush against it and the two read as one element. */
main { padding-bottom: var(--ll-12); }
.ll-shell > :last-child { margin-bottom: 0; }

/* FAQ accordion — components.css styles the parts, the open/closed state is ours */
.ll-faq__q { width: 100%; background: none; border: 0; text-align: left; padding: 0; color: inherit; }
.ll-faq__icon { font-size: 1rem; color: var(--ll-ink-60); transition: transform var(--ll-dur) var(--ll-ease); flex: none; }
.ll-faq__q.active .ll-faq__icon { transform: rotate(180deg); }
.ll-faq__a { max-height: 0; overflow: hidden; margin-top: 0;
             transition: max-height var(--ll-dur) var(--ll-ease), margin-top var(--ll-dur) var(--ll-ease); }
.ll-faq__a.active { max-height: 1200px; margin-top: var(--ll-2); }
.ll-faq__a > :first-child { margin-top: 0; }
.ll-howto__card .icon { font-size: 1.5rem; }
.ll-howto__card h3 { font: 600 1rem/1.3 var(--ll-font-ui); margin: var(--ll-2) 0 0; }
.ll-howto__card p { font-size: var(--ll-small); color: var(--ll-ink-70); margin: 5px 0 0; }
.ll-howto__card[onclick] { cursor: pointer; }

/* ---------- Breadcrumb ---------- */
.ll-crumbs { font: 400 .71875rem/1.6 var(--ll-font-mono); color: var(--ll-ink-60); padding: var(--ll-5) 0 var(--ll-3); }
.ll-crumbs a { color: var(--ll-ink-60); }
.ll-crumbs a:hover { color: var(--ll-teal); }

/* ---------- Product gallery ---------- */
.ll-gallery__main {
  aspect-ratio: 4 / 3; border-radius: var(--ll-r-panel); overflow: hidden;
  background: var(--ll-surface-sunk); position: relative;
}
.ll-gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ll-gallery__thumbs { display: flex; gap: 10px; margin-top: var(--ll-3); overflow-x: auto; scrollbar-width: none; }
.ll-gallery__thumbs::-webkit-scrollbar { display: none; }
.ll-gallery__thumb {
  width: 92px; height: 70px; flex: none; border-radius: 10px; overflow: hidden;
  border: 0; padding: 0; background: var(--ll-surface-sunk); cursor: pointer;
}
.ll-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ll-gallery__thumb[aria-current="true"] { outline: 2px solid var(--ll-ink); outline-offset: 2px; }

/* Spec tiles */
.ll-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--ll-4); margin-top: var(--ll-6); }
.ll-spec { background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: 14px; padding: 15px; }
.ll-spec__v { font: 600 .9375rem/1.3 var(--ll-font-ui); margin-top: 6px; }

/* ---------- Modal ---------- */
.ll-modal {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(31,75,74,.45); padding: var(--ll-4);
  overflow-y: auto; align-items: flex-start; justify-content: center;
}
.ll-modal.is-open { display: flex; }
.ll-modal__panel {
  background: var(--ll-bg); border-radius: var(--ll-r-panel);
  box-shadow: var(--ll-shadow-panel); width: 100%; max-width: 560px;
  margin: auto; overflow: hidden;
}
.ll-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ll-3);
  background: var(--ll-ink); color: #fff; padding: var(--ll-4) var(--ll-5);
}
.ll-modal__head .ll-h2 { color: #fff; margin: 0; }
.ll-modal__close {
  background: none; border: 0; color: rgba(255,255,255,.8);
  font: 400 1.5rem/1 var(--ll-font-ui); cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.ll-modal__close:hover { color: #fff; background: rgba(255,255,255,.12); }
.ll-modal__body { padding: var(--ll-5); display: grid; gap: var(--ll-4); }
.ll-formrow { display: grid; gap: var(--ll-4); }
@media (min-width: 560px) { .ll-formrow { grid-template-columns: 1fr 1fr; } }

/* ---------- Feedback ---------- */
.ll-loading { display: grid; place-items: center; gap: var(--ll-3); padding: var(--ll-12) 0; color: var(--ll-ink-60); }
.ll-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid var(--ll-border-strong); border-top-color: var(--ll-teal);
  animation: ll-spin .8s linear infinite;
}
@keyframes ll-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ll-spinner { animation-duration: 2.4s; } }
.ll-empty { padding: var(--ll-10) 0; text-align: center; color: var(--ll-ink-60); }

/* ---------- Admin ---------- */
.ll-admin__main { padding: var(--ll-5) var(--ll-6); display: grid; gap: var(--ll-5); align-content: start; }
.ll-statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--ll-4); }
.ll-tabs { display: flex; gap: var(--ll-2); flex-wrap: wrap; }
.ll-panel { display: none; }
.ll-panel.is-active { display: grid; gap: var(--ll-4); }
.ll-table__head, .ll-table__row { grid-template-columns: var(--ll-cols, 2fr 1fr 1fr auto); }
.ll-table__actions { display: flex; gap: var(--ll-2); flex-wrap: wrap; }
.ll-table__actions .ll-btn { min-height: 36px; padding-inline: var(--ll-3); font-size: .78125rem; }
.ll-admin__login { min-height: 100vh; display: grid; place-items: center; padding: var(--ll-6) var(--ll-gutter-m); }
.ll-admin__login .ll-card--panel { width: 100%; max-width: 400px; padding: var(--ll-8); }

/* Toast */
.ll-toast {
  position: fixed; left: 50%; bottom: var(--ll-6); transform: translateX(-50%);
  z-index: 120; max-width: min(92vw, 460px);
  padding: var(--ll-3) var(--ll-5); border-radius: 14px;
  background: var(--ll-ink); color: #fff; font-size: .84375rem;
  box-shadow: var(--ll-shadow-panel);
}
.ll-toast--error { background: var(--ll-cta); }

/* ---------- Away notice ---------- */
.ll-awaybar {
  background: var(--ll-gold-soft);
  border-bottom: 1px solid rgba(227,182,85,.5);
  color: var(--ll-ink);
}
.ll-awaybar--now { background: var(--ll-gold); }
.ll-awaybar__inner {
  max-width: var(--ll-maxw); margin: 0 auto;
  padding: var(--ll-3) var(--ll-gutter-m);
  display: flex; gap: var(--ll-3); align-items: flex-start;
  font-size: var(--ll-small); line-height: 1.5;
}
@media (min-width: 768px) { .ll-awaybar__inner { padding-inline: var(--ll-gutter-d); } }
.ll-awaybar__inner p { margin: 0; }

/* ---------------------------------------------------------------------------
   Reviews
   Shown under a tool. The byline is a date because that is all we store.
   --------------------------------------------------------------------------- */
.ll-reviews {
    list-style: none;
    margin: var(--ll-4) 0 0;
    padding: 0;
    display: grid;
    gap: var(--ll-3);
}

.ll-review {
    border: 1px solid var(--ll-hairline);
    border-radius: var(--ll-r-card);
    padding: var(--ll-4);
    background: var(--ll-surface);
}

.ll-review__head {
    display: flex;
    align-items: baseline;
    gap: var(--ll-3);
    flex-wrap: wrap;
}

.ll-review__stars {
    color: var(--ll-gold);
    letter-spacing: .08em;
}

.ll-review__by {
    font-size: .875rem;
    color: var(--ll-ink-60);
}

.ll-review__text {
    margin: var(--ll-2) 0 0;
    white-space: pre-line;
}

/* ---------------------------------------------------------------------------
   Icon button — used for "jaa linkki" next to a tool's badges
   --------------------------------------------------------------------------- */
.ll-iconbtn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--ll-border);
    border-radius: 999px;
    background: var(--ll-surface);
    color: var(--ll-ink-70);
    cursor: pointer;
    transition: color .12s ease, border-color .12s ease, background .12s ease;
}

.ll-iconbtn:hover {
    color: var(--ll-ink);
    border-color: var(--ll-border-strong);
}

.ll-iconbtn:focus-visible {
    outline: 2px solid var(--ll-teal);
    outline-offset: 2px;
}

/* Confirmation after the link is copied */
.ll-iconbtn.is-done {
    color: var(--ll-teal);
    border-color: var(--ll-teal);
}

/* Per-day figure beside a tier price — secondary to the total */
.ll-pricing__unit {
    font-family: var(--ll-font-ui);
    font-size: var(--ll-small);
    font-weight: 400;
    color: var(--ll-ink-60);
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Contrast corrections over the design system
   ---------------------------------------------------------------------------
   Lighthouse found every muted grey sitting between 3.2:1 and 4.4:1 against
   the page — just under the 4.5:1 WCAG AA threshold for small text. The worst
   were the field labels at 3.28:1, which are 11px and genuinely hard to read.

   tokens.css is vendored and kept diff-able against the design handoff, so the
   corrections live here instead. Same hue throughout, only darker: ink-60 and
   ink-45 move up to .78 and .80 alpha, which clears AA on both the white card
   and the off-white page.
   --------------------------------------------------------------------------- */
:root {
    --ll-ink-70: rgba(31, 75, 74, .78);   /* card descriptions, .ll-muted */
    --ll-ink-60: rgba(31, 75, 74, .78);
    --ll-ink-45: rgba(31, 75, 74, .80);   /* field labels — the worst at 3.28 */
}

/* The footer's fine print on the dark ground was 4.17:1. */
.ll-footer__legal { color: rgba(255, 255, 255, .72); }

/* Gallery thumbnails become interactive once /js/gallery.js loads */
.ll-gallery__thumb { cursor: pointer; transition: opacity .12s ease, outline-color .12s ease; }
.ll-gallery__thumb:hover { opacity: .82; }
.ll-gallery__thumb.is-active { outline: 2px solid var(--ll-teal); outline-offset: 1px; }
.ll-gallery__thumb:focus-visible { outline: 2px solid var(--ll-teal); outline-offset: 2px; }
