/* AV motors, versija 1 "Darbnīca" */
:root {
  --bg: #0B0C0E;
  --bg-2: #121417;
  --bg-3: #1A1D21;
  --line: #272B31;
  --line-soft: #1E2226;
  --text: #F4F4F2;
  --muted: #A6ABB2;
  --red: #F04249;
  --red-dark: #D2353C;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1200px;
  --gutter: 20px;
  --radius: 4px;
  --bar-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--bar-h);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); max-width: 18ch; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

.label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.label--red { color: var(--red); }
.label__n { font-variant-numeric: tabular-nums; padding-right: 12px; border-right: 1px solid var(--line); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 24px;
  border-radius: var(--radius); border: 1.5px solid transparent;
  font-weight: 700; font-size: 1.2rem; line-height: 1.1; letter-spacing: 0.01em;
  transition: background-color .18s, border-color .18s, color .18s, transform .08s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost { background: rgba(11, 12, 14, 0.35); border-color: rgba(244, 244, 242, 0.55); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); background: rgba(244, 244, 242, 0.08); }
.btn--light { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn--light:hover { background: #fff; }
.btn--xl { min-height: 68px; font-size: 1.4rem; padding: 0 28px; }
.btn__stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.btn__stack small { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; opacity: 0.9; margin-top: 4px; font-variant-numeric: tabular-nums; }
.btn--ghost .btn__stack small { color: var(--text); }
.btn--red .btn__stack small { color: var(--bg); opacity: 1; }

/* Header */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.logo { display: inline-flex; align-items: center; min-height: 48px; }
.logo img { height: 40px; width: auto; }
.top__nav { display: none; gap: 28px; font-weight: 600; font-size: 0.95rem; }
.top__nav a { min-height: 48px; display: inline-flex; align-items: center; border-bottom: 1.5px solid transparent; }
.top__nav a:hover { border-bottom-color: var(--red); }
.top__right { display: flex; align-items: center; gap: 16px; }
.top__phone { display: none; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; font-variant-numeric: tabular-nums; }
.top__phone .ic { color: var(--red); width: 20px; height: 20px; }
.lang { display: inline-flex; border: 1px solid rgba(244, 244, 242, 0.35); border-radius: var(--radius); background: rgba(11, 12, 14, 0.55); }
.lang button {
  min-width: 48px; min-height: 48px; padding: 0 10px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted);
  border-right: 1px solid rgba(244, 244, 242, 0.2);
}
.lang button:last-child { border-right: 0; }
.lang button[aria-pressed="true"] { color: var(--text); background: rgba(244, 244, 242, 0.12); }
.lang button:hover { color: var(--text); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 12, 14, 0.75) 0%, rgba(11, 12, 14, 0.35) 30%, rgba(11, 12, 14, 0.82) 70%, #0B0C0E 100%),
    linear-gradient(90deg, rgba(11, 12, 14, 0.55) 0%, rgba(11, 12, 14, 0.1) 60%),
    url("../shared/img/hero1.webp?v=1") 60% 50% / cover no-repeat var(--bg-2);
}
.hero__body { position: relative; padding-top: 120px; padding-bottom: 100px; }
.hero h1 { font-size: clamp(2.6rem, 9.5vw, 5.2rem); max-width: 12ch; margin: 14px 0 16px; }
.hero__sub { font-size: 1.1rem; color: #D8DBDF; max-width: 44ch; margin-bottom: 28px; }
.hero__cta { display: grid; gap: 12px; }
.hero__cta .btn { width: 100%; justify-content: flex-start; padding-left: 22px; }
.hero__cta .btn .ic { width: 28px; height: 28px; }

/* Facts strip */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.facts__row { display: grid; grid-template-columns: 1fr 1fr; }
.fact { display: flex; flex-direction: column; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.fact:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--line-soft); }
.fact:nth-child(even) { padding-left: 16px; }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact .num { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.fact .num--text { font-size: 1.1rem; }

/* Status */
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.status.is-open .dot { background: var(--text); box-shadow: 0 0 0 4px rgba(244, 244, 242, 0.15); }
.status--big { font-size: clamp(1.6rem, 4vw, 2.2rem); gap: 14px; }
.status--big .dot { width: 14px; height: 14px; }

/* Sections */
.section { padding: clamp(60px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.section--alt { background: var(--bg-2); }
.section__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }

/* Service cards */
.cards { display: grid; gap: 16px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.section--alt .card { background: var(--bg-3); }
.card__media { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-3); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card__meta { display: flex; align-items: center; justify-content: space-between; }
.card__icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--red); }
.card__n { font-variant-numeric: tabular-nums; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); }
.card h3 { font-size: 1.35rem; }
.card ul { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 0.98rem; }
.card li { display: flex; gap: 12px; align-items: flex-start; }
.card li::before { content: ""; width: 6px; height: 6px; background: var(--red); margin-top: 9px; flex: none; }

/* Full list */
.list { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); padding-top: 28px; }
.list__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.list__count { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.list__grid { display: grid; gap: 0; }
.list__grid li { display: flex; gap: 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 1.05rem; }
.list__grid .num { color: var(--muted); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; }
.more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.more__inner { overflow: hidden; min-height: 0; }
.more.is-open { grid-template-rows: 1fr; }
.no-js .more { grid-template-rows: 1fr; }
.no-js .more-btn { display: none; }
.more-btn { margin-top: 20px; gap: 10px; }
.badge { background: var(--bg); color: var(--text); font-size: 0.85rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.ic--chev { transition: transform .3s; width: 20px; height: 20px; }
.more-btn[aria-expanded="true"] .ic--chev { transform: rotate(180deg); }

/* About */
.about { display: grid; gap: 32px; }
.about__since { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.about__year { font-size: clamp(4.5rem, 14vw, 8rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.about__text h2 { margin-bottom: 18px; }
.about__text p + p { margin-top: 12px; }
.about__text > p:not(.about__since) { color: #CFD3D8; max-width: 52ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 0.9rem; font-weight: 600; color: var(--text); background: var(--bg); }
.about__media { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-3); }
.about__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about__media figcaption { padding: 12px 16px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-top: 1px solid var(--line); display: flex; gap: 12px; }

/* Hours */
.hours { display: grid; gap: 28px; }
.hours__status { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; align-self: start; }
.hours__note { color: var(--muted); font-size: 1.05rem; }
.hours__tz { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.hours__table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.hours__table th, .hours__table td { padding: 14px 0; border-bottom: 1px solid var(--line-soft); text-align: left; }
.hours__table th { font-weight: 500; color: var(--muted); }
.hours__table td { text-align: right; font-weight: 700; }
.hours__table tr.is-off td { color: var(--muted); font-weight: 500; }
.hours__table tr.is-today th, .hours__table tr.is-today td { color: var(--text); }
.hours__table tr.is-today th::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--red); margin-right: 10px; vertical-align: middle; }

/* Contacts */
.contact { display: grid; gap: 32px; }
.contact__main { display: flex; flex-direction: column; gap: 6px; }
.contact__line { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.contact__line .ic { color: var(--red); margin-top: 6px; }
.contact__line > span { display: flex; flex-direction: column; gap: 4px; }
.contact__big { font-size: 1.3rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
a.contact__line:hover .contact__big { color: var(--red); }
.contact__maps { display: grid; gap: 12px; margin-top: 22px; }
.req { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 8px 20px; align-self: start; }
.req > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.95rem; }
.req > div:last-child { border-bottom: 0; }
.req dt { color: var(--muted); margin: 0; }
.req dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0; font-size: 0.9rem; color: var(--muted); }
.foot__row { display: flex; flex-direction: column; gap: 16px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot__nav a { min-height: 44px; display: inline-flex; align-items: center; }
.foot__nav a:hover { color: var(--text); }

/* Sticky bottom bar (mobile) */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(11, 12, 14, 0.96); border-top: 1px solid var(--line);
  transform: translateY(0); transition: transform .25s ease;
}
.bar.is-hidden { transform: translateY(110%); }
.bar .btn { min-height: 56px; font-size: 1.2rem; }
.bar .btn--ghost { background: var(--bg-2); }

/* Map sheet */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet__back { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); }
.sheet__panel {
  position: relative; width: 100%; max-width: 480px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px 8px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet__head p { font-size: 1.3rem; font-weight: 700; }
.sheet__x { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.sheet__x:hover { color: var(--text); border-color: var(--text); }
.sheet__addr { color: var(--muted); margin-bottom: 4px; }
.sheet .btn { justify-content: flex-start; padding-left: 22px; }

/* Cookie bar */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--bar-h) + 10px); z-index: 40;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; display: flex; align-items: center; gap: 12px; font-size: 0.85rem; line-height: 1.35;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.cookie p { flex: 1; }
.cookie[hidden] { display: none; }
.cookie .btn { min-height: 48px; font-size: 0.95rem; padding: 0 16px; }
#bar.is-hidden ~ .cookie { bottom: 12px; }

/* Tablet */
@media (min-width: 768px) {
  :root { --gutter: 32px; --bar-h: 0px; }
  .bar { display: none; }
  .cookie { left: auto; right: 24px; bottom: 24px; max-width: 420px; flex-direction: row; align-items: center; }
  .cookie p { flex: 1; }
  .top__phone { display: inline-flex; }
  .hero { min-height: 92vh; min-height: 92svh; }
  .hero__body { padding-bottom: 56px; }
  .hero__cta { grid-template-columns: repeat(2, minmax(0, 300px)); gap: 16px; }
  .hero__cta .btn { width: auto; }
  .fact { padding: 22px 0; }
  .fact:nth-child(odd) { padding-right: 24px; }
  .fact:nth-child(even) { padding-left: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .card--wide { grid-column: span 1; }
  .cards .card:last-child { grid-column: span 2; }
  .cards .card:last-child .card__media { aspect-ratio: 21 / 8; }
  .list__grid { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .about { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }
  .hours { grid-template-columns: minmax(280px, 1fr) 1.4fr; gap: 40px; align-items: start; }
  .contact { grid-template-columns: 1.3fr 1fr; gap: 48px; }
  .contact__maps { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .sheet { align-items: center; padding: 24px; }
  .sheet__panel { border-radius: 8px; padding: 20px; }
  .foot__row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Desktop */
@media (min-width: 1024px) {
  .top__nav { display: flex; }
  .logo img { height: 46px; }
  .facts__row { grid-template-columns: repeat(4, 1fr); }
  .fact { border-bottom: 0; }
  .fact:nth-child(odd), .fact:nth-child(even) { padding-left: 24px; padding-right: 24px; border-right: 1px solid var(--line-soft); }
  .fact:first-child { padding-left: 0; }
  .fact:last-child { border-right: 0; padding-right: 0; }
  .hero__body { padding-bottom: 72px; }
  .hero h1 { max-width: 14ch; }
  .hero__sub { font-size: 1.2rem; }
  .cards { grid-template-columns: repeat(6, 1fr); }
  .cards .card { grid-column: span 2; }
  .cards .card--wide, .cards .card:last-child { grid-column: span 3; }
  .cards .card:last-child .card__media, .cards .card--wide .card__media { aspect-ratio: 21 / 9; }
  .list__grid { grid-template-columns: repeat(3, 1fr); }
  /* thin technical rails */
  .section .wrap, .facts .wrap { position: relative; }
  .section .wrap::before, .section .wrap::after {
    content: ""; position: absolute; top: -110px; bottom: -110px; width: 1px; background: var(--line-soft);
  }
  .section .wrap::before { left: 0; }
  .section .wrap::after { right: 0; }
  .section { overflow: hidden; }
  .section__head { padding: 0 32px; }
  .cards, .list, .about, .hours, .contact { margin-left: 32px; margin-right: 32px; }
}

@media (min-width: 1440px) {
  .hero h1 { font-size: 5.6rem; }
}

@media print {
  .bar, .cookie, .sheet { display: none !important; }
  .hero { min-height: 0; }
  .hero::before { display: none; }
  .more { grid-template-rows: 1fr; }
}
