:root {
  color-scheme: light dark;
  --page: #f4f6f9;
  --band: #e9eef5;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5b6676;
  --line: #dfe4ec;
  --accent: #0c4076;
  --accent-hover: #0a345f;
  --accent-text: #ffffff;
  --accent-soft: #e4edf8;
  --red: #c6363c;
  --shadow: 0 1px 2px #0b1a2c14, 0 8px 24px #0b1a2c12;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #14181f;
    --band: #181d26;
    --card: #1d232d;
    --text: #e8ecf2;
    --muted: #a3adbb;
    --line: #303947;
    --accent: #7fb2ee;
    --accent-hover: #a2c7f3;
    --accent-text: #0b1a2c;
    --accent-soft: #24364c;
    --red: #f08a8f;
    --shadow: 0 1px 2px #0006, 0 8px 24px #0004;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
p { margin: 0 0 14px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--card); padding: 6px 10px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.top nav { margin-left: auto; display: flex; gap: 18px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 14px; flex: none; }
.lang a, .lang span { padding: 5px 11px; text-decoration: none; color: var(--muted); }
.lang span { background: var(--accent); color: var(--accent-text); }
.lang a:hover { background: var(--accent-soft); color: var(--text); }
@media (max-width: 760px) {
  .top nav { display: none; }
  .lang { margin-left: auto; }
}

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 750; letter-spacing: -0.01em; }
.hero h1 .sub { display: block; font-size: 0.55em; font-weight: 600; color: var(--muted); margin-top: 8px; letter-spacing: 0; }
.hero .lead { font-size: 19px; margin: 18px 0 26px; color: var(--text); }
.hero figure { margin: 0; }
.hero figure img { border-radius: 12px; box-shadow: var(--shadow); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-text);
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--accent-hover); color: var(--accent-text); }
.button.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.button.ghost:hover { background: var(--accent-soft); color: var(--accent); }
.button.soon { background: var(--card); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.button.soon:hover { background: var(--accent-soft); color: var(--text); }
.button img { width: 20px; height: 20px; }
.note { font-size: 14px; color: var(--muted); margin-top: 12px; }
@media (max-width: 820px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
}

/* Sections */
section.block { padding: 56px 0; }
section.block.band { background: var(--band); border-block: 1px solid var(--line); }
section.block h2 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 10px; }
section.block .intro { color: var(--muted); max-width: 720px; margin-bottom: 28px; }

/* Transliteration box */
.tool { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.tool .options { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-bottom: 14px; font-size: 15px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: 7px 13px; cursor: pointer; color: var(--muted); }
.segmented label + input + label { border-left: 1px solid var(--line); }
.segmented input:checked + label { background: var(--accent); color: var(--accent-text); }
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -3px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
textarea {
  width: 100%; min-height: 220px; resize: vertical;
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--page); color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.tool .bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.tool .bar .button { padding: 9px 16px; font-size: 15px; }
.tool .bar .button:disabled { opacity: 0.5; cursor: default; }
#stanje { margin-left: auto; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) {
  .fields { grid-template-columns: 1fr; }
  textarea { min-height: 150px; }
  #stanje { margin-left: 0; width: 100%; }
}

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.features li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.features h3 { font-size: 18px; margin-bottom: 6px; }
.features p { margin: 0; color: var(--muted); font-size: 16px; }
.features .icon { font-size: 22px; line-height: 1; margin-bottom: 10px; display: block; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 0; padding: 0; list-style: none; }
.gallery img { border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (max-width: 700px) { .gallery { grid-template-columns: 1fr; } }

/* Steps */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card ol, .card ul { margin: 0 0 12px; padding-left: 22px; }
.card li { margin-bottom: 6px; }
.card p:last-child, .card ol:last-child, .card ul:last-child { margin-bottom: 0; }
kbd {
  font: 600 14px/1 ui-monospace, "SF Mono", Consolas, monospace;
  padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px;
  background: var(--page); white-space: nowrap;
}
code { font: 15px ui-monospace, "SF Mono", Consolas, monospace; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 760px) { .columns { grid-template-columns: 1fr; } }

/* Questions */
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 18px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
details p { color: var(--muted); }

/* Footer */
footer { padding: 36px 0 48px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; }
footer p { margin: 0; }

/* Promise list in the hero */
.promise { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 6px; font-weight: 600; }
.promise li { padding-left: 28px; position: relative; }
.promise li::before {
  content: "\2713"; position: absolute; left: 0; top: 0.2em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  font-size: 13px; line-height: 20px; text-align: center;
}
.hero .lead { margin-bottom: 18px; }

/* Lightbox */
a.zoom { display: block; cursor: zoom-in; }
html.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; background: #060b12e6;
}
.lightbox figure { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 60px); width: auto; height: auto; border-radius: 8px; box-shadow: 0 12px 48px #000a; cursor: default; }
.lightbox figcaption { color: #e8ecf2; font-size: 15px; text-align: center; max-width: 760px; }
.lightbox button {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: #ffffff24; color: #fff; font: 30px/1 system-ui, sans-serif; cursor: pointer;
  display: grid; place-items: center; padding: 0 0 4px;
}
.lightbox button:hover { background: #ffffff40; }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox .lb-close { position: absolute; top: 12px; right: 12px; z-index: 1; }
@media (max-width: 700px) {
  .lightbox { padding: 8px; gap: 0; }
  .lightbox .lb-prev, .lightbox .lb-next { position: absolute; bottom: 12px; }
  .lightbox .lb-prev { left: calc(50% - 56px); }
  .lightbox .lb-next { right: calc(50% - 56px); }
  .lightbox img { max-height: calc(100% - 150px); }
  .lightbox figure { padding-bottom: 64px; }
}
