/* Šiviljstvo Mitra — ported from the Classical design system, recoloured to the
   site's blues (see the .dc prototype). Tokens first, then components, then pages. */

:root{
  --color-bg:#f2f4f6;
  --color-surface:#e6eaee;
  --color-text:#1b232b;
  --color-accent:#226393;
  --color-divider:color-mix(in srgb, #1b232b 15%, transparent);

  --color-accent-100:#eaf2f9;
  --color-accent-200:#cbdeee;
  --color-accent-300:#9dc2dd;
  --color-accent-400:#6ba1c9;
  --color-accent-500:#3f81b0;
  --color-accent-600:#226393;
  --color-accent-700:#175279;
  --color-accent-800:#0f3a57;
  --color-accent-900:#0a2739;

  --ink:#0f3a57;
  --sky:#5aabe6;

  --font-heading:"Cormorant Garamond", Georgia, serif;
  --font-heading-weight:600;
  --font-body:"Lora", Georgia, serif;

  --radius-md:4px;
  --shadow-lg:0 12px 32px color-mix(in srgb, #0a2739 22%, transparent);

  --side-w:272px;
  --bar-h:58px;
  --pad-x:clamp(22px, 5vw, 72px);
}

/* ── base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--color-bg); color:var(--color-text);
  font-family:var(--font-body); font-size:15px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
body.lock{ overflow:hidden; }
h1,h2,h3{
  font-family:var(--font-heading); font-weight:var(--font-heading-weight);
  line-height:1.12; letter-spacing:-.015em; margin:0;
}
p{ margin:0; }
img{ display:block; max-width:100%; }
a{ color:var(--color-accent-700); text-underline-offset:3px; }
a:hover{ color:var(--color-accent); }
/* :not(:focus-visible) keeps a default outline in browsers without
   :focus-visible support (the whole rule is dropped there) */
:focus:not(:focus-visible){ outline:none; }
:focus-visible{ outline:2px solid var(--color-accent); outline-offset:2px; }
.lb :focus-visible{ outline-color:var(--sky); }
::selection{ background:color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* keyboard skip link — off-screen until focused */
.skip{
  position:fixed; top:10px; left:10px; z-index:70; transform:translateY(-300%);
  background:var(--ink); color:#fff; text-decoration:none;
  padding:10px 16px; border-radius:var(--radius-md); font-size:14px;
}
.skip:focus{ transform:none; }

.kicker{
  font-family:var(--font-heading); font-size:12px; letter-spacing:.22em;
  text-transform:uppercase; color:var(--color-accent-700);
}
.rule{ width:64px; height:1px; background:var(--color-accent-400); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  cursor:pointer; text-decoration:none;
  font-family:var(--font-heading); font-weight:var(--font-heading-weight);
  font-size:15px; line-height:1.2; color:var(--color-text);
  background:transparent; border:1px solid transparent;
  padding:12px 22px; min-height:44px; border-radius:var(--radius-md);
}
.btn-primary{ color:var(--color-accent-700); border-color:var(--color-accent); }
.btn-primary:hover{ background:color-mix(in srgb, var(--color-accent) 12%, transparent); color:var(--color-accent-800); }
.btn-primary:active{ background:color-mix(in srgb, var(--color-accent) 22%, transparent); }
.btn-secondary{ border-color:var(--color-divider); }
.btn-secondary:hover{ background:color-mix(in srgb, var(--color-text) 7%, transparent); color:var(--color-text); }
.btn-secondary:active{ background:color-mix(in srgb, var(--color-text) 14%, transparent); }

/* photograph mat — the system's sepia grade is dropped: liturgical colour is
   the subject of every photo here */
.plate{
  filter:none; box-sizing:border-box;
  border:6px solid var(--color-surface); outline:1px solid var(--color-divider);
}

/* ── mobile top bar ───────────────────────────────────────────────────── */
.bar{
  display:none; position:fixed; top:0; left:0; right:0; height:var(--bar-h); z-index:45;
  background:var(--ink); align-items:center; gap:14px; padding:0 14px;
  border-bottom:1px solid rgba(255,255,255,.14);
}
.bar-menu{
  width:44px; height:44px; display:grid; place-items:center; cursor:pointer;
  background:transparent; border:1px solid rgba(255,255,255,.28);
  border-radius:var(--radius-md); color:#fff;
}
.bar-brand{
  font-family:var(--font-heading); font-weight:var(--font-heading-weight);
  font-size:21px; color:#fff; letter-spacing:.01em;
}

.scrim{
  display:none; position:fixed; inset:0; z-index:38; background:rgba(10,39,57,.5);
}

/* ── sidebar ──────────────────────────────────────────────────────────── */
.side{
  position:fixed; top:0; left:0; bottom:0; width:var(--side-w); z-index:40;
  background:var(--ink); display:flex; flex-direction:column; overflow-y:auto;
  transition:transform .28s ease;
}
/* brand block reproduced from the 2013 site: one radial-gradient panel
   holding all four marks (legacy/style.css .menu .gradient) */
.side-gradient{
  background:radial-gradient(circle, #d2fdb6, #226393 80%);
  display:flex; flex-direction:column; align-items:center;
  padding:10px 0 18px; flex:none;
}
.side-gradient img{ height:auto; padding:5px 25px; }
.side-gradient img:first-child{ margin-bottom:-30px; }
.side-nav{ display:flex; flex-direction:column; padding:22px 18px; gap:2px; }
.side-nav a{
  font-family:var(--font-heading); font-weight:400; font-size:24px; letter-spacing:.01em;
  color:#fff; text-decoration:none; padding:13px 14px; min-height:44px;
  display:flex; align-items:center;
  border-left:2px solid transparent; border-radius:var(--radius-md);
}
.side-nav a:hover{ background:rgba(255,255,255,.09); border-left-color:var(--sky); color:#fff; }
.side-nav a[aria-current="page"]{ color:var(--sky); border-left-color:var(--sky); }
.side-contact{
  margin-top:auto; padding:20px 22px 14px; border-top:1px solid rgba(255,255,255,.14);
  display:flex; flex-direction:column; gap:10px;
}
/* flag switcher pinned to the very bottom of the sidebar */
.side-lang{
  display:flex; gap:6px; padding:0 18px 20px; align-items:center;
}
.side-lang a, .side-lang span{
  display:grid; place-items:center; width:44px; height:40px;
  border-radius:var(--radius-md); text-decoration:none;
}
.side-lang svg{ display:block; border-radius:2px; }
/* current locale at full opacity, the others faded until hover */
.side-lang a{ opacity:.45; transition:opacity .15s; }
.side-lang a:hover{ opacity:1; }
.side-lang span[aria-current="true"]{ opacity:1; }
.side-place{
  font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:rgba(255,255,255,.6); font-family:var(--font-heading);
}
.side-contact a{
  color:#fff; text-decoration:none; font-size:14px;
  font-variant-numeric:tabular-nums; word-break:break-all;
}
.side-contact a:hover{ color:var(--sky); }

.main{ margin-left:var(--side-w); }

/* ── hero (navy band, as in the concept; the transparent montage cut-outs
      composite straight onto the ink ground) ──────────────────────────── */
.hero{
  display:grid; grid-template-columns:minmax(300px, 600px) minmax(280px, 520px);
  gap:clamp(24px, 4vw, 56px); align-items:center; justify-content:center;
  padding:clamp(40px, 7vw, 88px) var(--pad-x) clamp(40px, 6vw, 72px);
  background:var(--ink);
}
.hero-copy{ display:flex; flex-direction:column; gap:16px; }
.hero-copy .kicker{ color:var(--sky); }
.hero-copy .rule{ background:var(--sky); }
.hero-copy h1{
  font-size:clamp(34px, 4.6vw, 56px); font-weight:400; color:#fff;
  line-height:1.06; letter-spacing:-.015em; text-wrap:balance;
}
.hero-actions{ display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; }
.hero .btn-primary{ color:var(--sky); border-color:var(--sky); }
.hero .btn-primary:hover{ background:rgba(90,171,230,.14); color:var(--sky); }
.hero .btn-primary:active{ background:rgba(90,171,230,.24); }
.hero .btn-secondary{ color:#fff; border-color:rgba(255,255,255,.35); }
.hero .btn-secondary:hover{ background:rgba(255,255,255,.1); color:#fff; }
.hero .btn-secondary:active{ background:rgba(255,255,255,.18); }
.hero-art{ display:flex; flex-direction:column; gap:8px; }
.hero-frame{ aspect-ratio:771/450; }
.hero-frame img{ width:100%; height:100%; object-fit:contain; }
.hero-dots{ display:flex; justify-content:center; gap:4px; }
.hero-dot{
  width:36px; height:36px; display:grid; place-items:center;
  background:transparent; border:0; padding:0; cursor:pointer;
}
.hero-dot span{
  width:9px; height:9px; border-radius:50%;
  background:transparent; border:1px solid rgba(255,255,255,.55);
  transition:background .15s, border-color .15s;
}
.hero-dot:hover span{ border-color:var(--sky); }
.hero-dot[aria-current="true"] span{ background:var(--sky); border-color:var(--sky); }

/* ── home sections ────────────────────────────────────────────────────── */
.pillars{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:clamp(24px, 4vw, 56px);
  padding:clamp(30px, 4vw, 52px) var(--pad-x); max-width:1180px; margin-inline:auto;
}
.pillar h2{
  font-size:13px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--color-accent-700); margin:0 0 12px;
}
.pillar p{ line-height:1.7; }

.highlights{ padding:clamp(10px, 2vw, 24px) var(--pad-x) clamp(48px, 7vw, 96px); max-width:1180px; margin-inline:auto; }
.sec-head{
  display:flex; align-items:baseline; justify-content:space-between; gap:20px; flex-wrap:wrap;
  border-top:1px solid var(--color-divider); padding-top:18px; margin-bottom:26px;
}
.sec-head h2{ font-weight:400; font-size:clamp(26px, 3.4vw, 38px); }
.sec-link{
  font-size:14px; text-decoration:none; padding-bottom:2px; align-self:center; min-height:44px;
  display:inline-flex; align-items:center; border-bottom:1px solid var(--color-accent-300);
}

/* ── tiles (home + catalogue) ─────────────────────────────────────────── */
.tiles{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:clamp(14px, 2vw, 24px);
}
.tile{
  display:flex; flex-direction:column; gap:9px; text-align:left; text-decoration:none;
  background:transparent; border:0; padding:0; cursor:pointer; font-family:inherit;
  color:var(--color-text); scroll-margin-top:calc(var(--bar-h) + 16px);
}
/* Vestments are tall; a square crop beheads them. Tiles are portrait and the
   photograph is contained, so the whole piece reads. No hover motion. */
.tile .plate{
  display:block; width:100%; aspect-ratio:3/4; overflow:hidden; position:relative;
  background:transparent; border:0; outline:none;
  border-bottom:2px solid var(--color-accent); padding:0 0 7px;
}
.tile img{ width:100%; height:100%; object-fit:contain; }
.tile-name{ font-family:var(--font-heading); font-size:17px; line-height:1.2; color:var(--color-text); transition:color .2s; }
.tile:hover .tile-name{ color:var(--color-accent-700); }
.tile-count{ font-size:12px; font-variant-numeric:tabular-nums; color:color-mix(in srgb, var(--color-text) 65%, transparent); }

/* ── catalogue / generic page ─────────────────────────────────────────── */
.page{ padding:clamp(34px, 5vw, 64px) var(--pad-x) clamp(56px, 8vw, 104px); max-width:1180px; margin-inline:auto; }
.page-title{ margin:10px 0 0; font-weight:400; font-size:clamp(36px, 6vw, 64px); letter-spacing:-.02em; }
.group{ margin-top:clamp(40px, 5vw, 64px); }
.group-head{
  display:flex; align-items:baseline; gap:16px;
  border-top:1px solid var(--color-divider); padding-top:16px; margin-bottom:22px;
}
.group-head h2{ font-weight:400; font-size:clamp(24px, 3vw, 34px); }
.group-count{
  font-size:12px; letter-spacing:.14em; font-variant-numeric:tabular-nums;
  color:color-mix(in srgb, var(--color-text) 65%, transparent);
}

/* ── contact ──────────────────────────────────────────────────────────── */
.contact-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:clamp(28px, 4vw, 64px); margin-top:clamp(32px, 4vw, 52px);
}
.block{ border-top:1px solid var(--color-divider); padding-top:16px; }
.block + .block{ margin-top:34px; }
.block-title{
  font-size:13px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--color-accent-700); margin:0 0 14px;
}
.contact-addr{ line-height:1.8; }
.contact-lines{ display:flex; flex-direction:column; gap:2px; }
.contact-lines a{
  text-decoration:none; min-height:44px; display:flex; align-items:center; gap:10px;
  font-variant-numeric:tabular-nums; color:var(--color-text); word-break:break-all;
}
.contact-lines a:hover{ color:var(--color-accent); }
.contact-k{ color:var(--color-accent-700); }
.map-card{
  border:1px solid var(--color-divider); background:var(--color-surface);
  aspect-ratio:4/3; overflow:hidden;
}
.map-card iframe{ display:block; width:100%; height:100%; border:0; }
.map-fallback{
  margin:10px 0 0; font-size:13px; line-height:1.6;
  color:color-mix(in srgb, var(--color-text) 65%, transparent);
}

.reviews{ margin-top:clamp(48px, 7vw, 88px); border-top:1px solid var(--color-divider); padding-top:18px; }
.reviews-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:clamp(22px, 3vw, 34px); }
.reviews-head h2{ font-weight:400; font-size:clamp(26px, 3.4vw, 38px); }
.rate-card{
  border:1px solid var(--color-divider); border-radius:var(--radius-md);
  padding:clamp(20px, 2.6vw, 30px); max-width:460px;
  display:flex; flex-direction:column; gap:14px; align-items:flex-start;
}
.rate-card p{ font-size:14px; line-height:1.7; }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot{
  border-top:1px solid var(--color-divider);
  padding:clamp(28px, 4vw, 44px) var(--pad-x);
  display:flex; flex-wrap:wrap; gap:20px; align-items:center; justify-content:space-between;
  max-width:1180px; margin-inline:auto;
}
.foot-lines{ display:flex; flex-direction:column; gap:6px; }
.foot p{ font-size:13px; color:color-mix(in srgb, var(--color-text) 68%, transparent); }
.foot-credit{ color:color-mix(in srgb, var(--color-text) 65%, transparent); }

/* ── lightbox ─────────────────────────────────────────────────────────── */
.lb{
  position:fixed; inset:0; z-index:60; background:#0a2739;
  display:flex; flex-direction:column;
  height:100vh; height:100dvh; overscroll-behavior:contain;
}
.lb[hidden]{ display:none; }
.lb-head{
  flex:none; display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px clamp(14px, 3vw, 28px); border-bottom:1px solid rgba(255,255,255,.13);
}
.lb-titles{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.lb-kicker{
  font-family:var(--font-heading); font-size:11px; letter-spacing:.22em;
  text-transform:uppercase; color:var(--sky);
}
.lb-title{
  font-family:var(--font-heading); font-weight:400; font-size:clamp(20px, 2.6vw, 28px);
  color:#fff; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.lb-close, .lb-arrow{
  flex:none; display:grid; place-items:center; cursor:pointer;
  background:transparent; border:1px solid rgba(255,255,255,.28); color:#fff;
}
.lb-close{ width:44px; height:44px; border-radius:var(--radius-md); }
.lb-arrow{ width:48px; height:48px; border-radius:50%; }
.lb-close:hover, .lb-arrow:hover{ background:rgba(255,255,255,.1); border-color:var(--sky); }
.lb-stage{
  flex:1; display:flex; align-items:center; justify-content:center;
  gap:clamp(8px, 2vw, 24px); padding:clamp(14px, 3vw, 34px) clamp(10px, 2vw, 28px);
  min-height:0;
}
.lb-fig{
  flex:1; height:100%; min-width:0; margin:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
}
.lb-fig img{
  min-height:0; max-width:100%; max-height:calc(100% - 58px); object-fit:contain;
  border:10px solid #fff; outline:1px solid rgba(255,255,255,.25);
  background:#fff; box-shadow:var(--shadow-lg);
}
.lb-cap{ flex:none; display:flex; align-items:center; gap:14px; flex-wrap:wrap; justify-content:center; margin:0; }
.lb-ref{
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--sky); border-radius:var(--radius-md); padding:7px 13px;
}
.lb-ref span{
  font-family:var(--font-heading); font-size:15px; letter-spacing:.1em;
  color:#fff; font-variant-numeric:tabular-nums; user-select:all;
}
.lb-counter{ font-size:12px; color:rgba(255,255,255,.55); font-variant-numeric:tabular-nums; }
.lb-foot{
  flex:none; border-top:1px solid rgba(255,255,255,.13);
  padding:12px clamp(14px, 3vw, 28px) 14px; display:flex; flex-direction:column; gap:10px;
}
.lb-strip{ display:flex; gap:9px; overflow-x:auto; padding-bottom:4px; }
.lb-strip::-webkit-scrollbar{ height:6px; }
.lb-strip::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.28); border-radius:3px; }
.lb-th{
  flex:none; width:64px; display:flex; flex-direction:column; gap:4px;
  background:transparent; border:0; padding:0; cursor:pointer; font-family:inherit;
}
.lb-th > span:first-child{
  display:block; width:64px; height:64px; overflow:hidden; background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.18); opacity:.6;
  transition:border-color .18s, opacity .18s;
}
.lb-th:hover > span:first-child{ opacity:1; border-color:rgba(255,255,255,.5); }
.lb-th img{ width:100%; height:100%; object-fit:cover; }
.lb-th-label{
  font-size:10px; letter-spacing:.08em; color:rgba(255,255,255,.55);
  font-variant-numeric:tabular-nums; text-align:center;
}
.lb-th[aria-current="true"] > span:first-child{
  opacity:1; border-color:var(--sky); box-shadow:0 0 0 1px var(--sky);
}
.lb-th[aria-current="true"] .lb-th-label{ color:var(--sky); }

/* ── breakpoints ──────────────────────────────────────────────────────── */
@media (max-width:900px){
  /* the drawer opens below the fixed bar so the brand panel is never
     covered, and the burger stays reachable to close it; visibility keeps
     the closed drawer out of the tab order (it flips at transition end) */
  .side{
    top:var(--bar-h); transform:translateX(-100%); width:264px;
    box-shadow:0 0 40px rgba(10,39,57,.35);
    visibility:hidden; transition:transform .28s ease, visibility .28s;
  }
  .scrim{ top:var(--bar-h); }
  .side[data-open="1"]{ transform:none; visibility:visible; }
  .main{ margin-left:0; padding-top:var(--bar-h); }
  .bar{ display:flex; }
  .scrim[data-open="1"]{ display:block; }
}
@media (max-width:780px){
  .hero{ grid-template-columns:1fr; }
  .hero-art{ max-width:480px; width:100%; margin:0 auto; }
}
@media (max-width:640px){
  .lb-arrow{ width:42px; height:42px; }
  .lb-stage{ gap:6px; padding:12px 8px; }
  .lb-fig img{ border-width:6px; }
}
@media (prefers-reduced-motion: reduce){
  .side{ transition:none; }
  .tile-name{ transition:none; }
}
