/* ============================================================ */
/* DND ISKRA Kraljevo — main.css                                  */
/* Industrial Precision · cool, engineered, restrained            */
/* ============================================================ */

/* ----- 0. Tokens ------------------------------------------------ */
:root {
  --ink:        #0E1114;
  --ink-soft:   #1B2026;
  --steel:      #5A6672;
  --steel-2:    #8A94A0;
  --paper:      #F4F7FA;
  --paper-2:    #FFFFFF;
  --line:       #DCE3EA;
  --line-soft:  #ECEFF3;
  --blue:       #0989D4;
  --blue-l:     #29A9E8;
  --blue-d:     #0563A9;
  --grad:       linear-gradient(135deg, #29A9E8 0%, #0989D4 45%, #0563A9 100%);
  --grad-soft:  linear-gradient(135deg, rgba(41,169,232,.12) 0%, rgba(5,99,169,.06) 100%);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;

  --shadow-sm: 0 4px 14px rgba(14,17,20,.06);
  --shadow-md: 0 10px 30px rgba(14,17,20,.08);
  --shadow-lg: 0 24px 60px rgba(14,17,20,.18);

  --container: 1280px;
  --gutter:    clamp(20px, 5vw, 48px);

  --nav-h: 72px;

  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-in-out: cubic-bezier(.7,0,.3,1);

  /* JS-set on load+resize so old mobile chrome doesn't clip 100vh */
  --app-h: 100vh;
}

/* ----- 1. Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* JS handles smooth scroll */
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }
input { font: inherit; color: inherit; }

::selection { background: var(--blue); color: #fff; }

/* visible keyboard focus */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----- 2. Type utilities --------------------------------------- */
.display {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.mono {
  font-family: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.eyebrow {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}
.grad-text {
  background: var(--grad);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ----- 3. Container + section + failsafe reveal ---------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}
.sec-head {
  max-width: 760px;
  margin: 0 0 clamp(48px, 7vw, 80px);
}
.sec-title {
  font-size: clamp(2rem, 5.4vw, 4rem);
  margin: 0 0 22px;
}
.sec-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--steel);
  max-width: 56ch;
  margin: 0;
}

/* FAILSAFE: content visible by default. Reveals only hide once GSAP loads. */
.reveal { opacity: 1; transform: none; }
html.gsap-on .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(28px);
}
html.gsap-on .reveal {
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}

/* ----- 4. Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s var(--ease-out), color .25s var(--ease-out);
  position: relative;
  isolation: isolate;
}
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }

.btn-grad {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(9,137,212,.28);
}
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(9,137,212,.36); }

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

.btn-white {
  background: #fff;
  color: var(--ink);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.18); }

/* ----- 5. Navbar ----------------------------------------------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: #fff;
  transition: background .35s var(--ease-out), color .35s var(--ease-out), transform .4s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s var(--ease-out);
  border-bottom: 1px solid transparent;
}
/* dark scrim behind transparent navbar so logo+links stay legible */
.navbar::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  transition: opacity .35s var(--ease-out);
  z-index: -1;
}
.navbar.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 14px rgba(14,17,20,.04);
}
.navbar.scrolled::before { opacity: 0; }
.navbar.hide { transform: translateY(-110%); }

.nav-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter .35s var(--ease-out);
}
.navbar.scrolled .nav-logo img { filter: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}
.nav-links a {
  position: relative;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 0;
  opacity: .85;
  transition: opacity .25s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s var(--ease-out);
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-cta { flex-shrink: 0; }
.nav-burger { display: none; }

@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger {
    display: inline-flex;
    width: 40px; height: 40px;
    margin-left: auto;
    position: relative;
    color: inherit;
    z-index: 110;
  }
  .nav-burger span {
    position: absolute;
    left: 10px; right: 10px;
    height: 2px;
    background: currentColor;
    transition: top .3s var(--ease-out), transform .3s var(--ease-out);
  }
  .nav-burger span:nth-child(1) { top: 15px; }
  .nav-burger span:nth-child(2) { top: 23px; }
  .nav-burger.is-open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
  .nav-burger.is-open span:nth-child(2) { top: 19px; transform: rotate(-45deg); }
}

/* ----- 6. Mobile menu ----------------------------------------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + 48px) var(--gutter) 48px;
  clip-path: circle(0% at calc(100% - 36px) 36px);
  transition: clip-path .6s var(--ease-in-out);
  pointer-events: none;
}
.mobile-menu.is-open {
  clip-path: circle(160% at calc(100% - 36px) 36px);
  pointer-events: auto;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mobile-menu a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 16px 0;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 8vw, 3.2rem);
  border-bottom: 1px solid rgba(255,255,255,.08);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s var(--ease-out) var(--i, 0s), transform .5s var(--ease-out) var(--i, 0s);
}
.mobile-menu.is-open a,
.mobile-menu.is-open .m-foot { opacity: 1; transform: none; }
.mobile-menu .m-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--blue-l);
  flex-shrink: 0;
  font-weight: 400;
  font-stretch: normal;
}
.mobile-menu .m-foot {
  display: flex;
  justify-content: space-between;
  color: var(--steel-2);
  padding-top: 24px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s var(--ease-out) var(--i, 0s), transform .5s var(--ease-out) var(--i, 0s);
}

/* ----- 7. Hero -------------------------------------------------- */
.hero {
  position: relative;
  height: var(--app-h);
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.hero-slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(100%) contrast(1.05);
  opacity: 0;
  transition: opacity 1.4s ease;
  will-change: opacity, transform;
}
.slide.is-active {
  opacity: 1;
  animation: kenburns 14s linear forwards;
}
@keyframes kenburns {
  from { transform: scale(1) translate3d(0,0,0); }
  to   { transform: scale(1.10) translate3d(-1.5%, -1.5%, 0); }
}

.hero-scrim {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(14,17,20,0) 0%, rgba(14,17,20,.25) 40%, rgba(14,17,20,.85) 92%, rgba(14,17,20,.95) 100%),
    radial-gradient(120% 80% at 80% 20%, rgba(41,169,232,.18) 0%, rgba(41,169,232,0) 60%),
    linear-gradient(135deg, rgba(5,99,169,.18) 0%, rgba(5,99,169,0) 50%);
}

/* Catenary signature */
.catenary {
  position: absolute;
  left: 0; right: 0;
  top: clamp(20%, 28vh, 34%);
  width: 100%;
  height: clamp(140px, 22vh, 220px);
  color: #fff;
  opacity: 0.55;
  pointer-events: none;
}
.catenary .cat-pylon,
.catenary .cat-wire,
.catenary .cat-droppers line {
  stroke: currentColor;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.catenary .cat-pylon { stroke-width: 1.5; opacity: .6; }
.catenary .cat-wire { stroke-width: 1.4; }
.catenary .cat-droppers line { stroke-width: 1; opacity: .75; }
.catenary .cat-nodes circle { fill: var(--blue-l); }
.catenary .cat-label text {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  fill: currentColor;
  text-transform: uppercase;
}

.hero-content {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(96px, 14vh, 140px);
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.eyebrow-hero { color: rgba(255,255,255,.7); }
.eyebrow-hero::before { background: rgba(255,255,255,.5); }
.hero-title {
  font-size: clamp(2.4rem, 7.5vw, 5.6rem);
  margin: 0 0 24px;
  max-width: 18ch;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-sub {
  max-width: 56ch;
  color: rgba(255,255,255,.8);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  margin: 0 0 32px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-meta {
  position: absolute;
  left: 0; right: 0; bottom: 24px;
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
}
.indicators { display: flex; gap: 10px; align-items: center; }
.ind {
  position: relative;
  width: 44px;
  height: 2px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
}
.ind-fill {
  display: block;
  width: 0;
  height: 100%;
  background: #fff;
}
.ind.is-active .ind-fill {
  animation: fill 6s linear forwards;
}
@keyframes fill {
  from { width: 0; }
  to { width: 100%; }
}
.hero[data-paused] .ind.is-active .ind-fill { animation-play-state: paused; }
.seg-label { flex-shrink: 0; }

.scroll-cue {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.55);
  font-size: 10px;
  letter-spacing: 0.2em;
}
.cue-arrow {
  display: inline-block;
  margin-left: 6px;
  animation: cuebob 2s ease-in-out infinite;
}
@keyframes cuebob {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%      { transform: translateY(4px); opacity: 1; }
}
@media (max-height: 600px), (max-width: 380px) {
  .scroll-cue { display: none; }
}

/* ----- 8. Ticker ----------------------------------------------- */
.ticker {
  background: var(--ink);
  color: rgba(255,255,255,.85);
  padding: 18px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.ticker-track {
  display: flex;
  gap: 36px;
  align-items: center;
  width: max-content;
  animation: tick 38s linear infinite;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker .dot { color: var(--blue-l); }
@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----- 9. Program ---------------------------------------------- */
.section-program { background: var(--paper); }
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 32px 40px;
  overflow: hidden;
  transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--blue-l);
  box-shadow: var(--shadow-md);
}
.card-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--steel-2);
  margin-bottom: 28px;
}
.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--grad-soft);
  color: var(--blue-d);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  transition: background .35s, color .35s;
}
.card:hover .card-icon { background: var(--grad); color: #fff; }
.card-icon svg { width: 26px; height: 26px; }
.card h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  margin: 0 0 10px;
}
.card p {
  color: var(--steel);
  margin: 0;
  max-width: 32ch;
}
.card-bar {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 0;
  background: var(--grad);
  transition: width .5s var(--ease-out);
}
.card:hover .card-bar { width: 100%; }

/* ----- 10. About ----------------------------------------------- */
.section-about {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
@media (min-width: 880px) {
  .about-grid { grid-template-columns: 0.9fr 1.1fr; }
}
.about-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.media-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.05);
}
.media-badge {
  position: absolute;
  left: 20px; bottom: 20px;
  background: var(--paper-2);
  padding: 14px 18px;
  border-radius: 14px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}
.media-badge .mono { color: var(--steel); font-size: 10px; }
.media-badge .display { font-size: 1.6rem; color: var(--blue-d); }

.about-text .sec-title { font-size: clamp(1.85rem, 4.4vw, 3.2rem); }
.about-text p {
  color: var(--steel);
  max-width: 56ch;
  margin: 0 0 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 32px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .display {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1;
}
.stat .mono { color: var(--steel); font-size: 11px; }

/* ----- 11. Reference ------------------------------------------ */
.section-reference { background: var(--paper); padding-bottom: 0; }
.ref-panel {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(52px, 8vw, 96px) clamp(28px, 5vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ref-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(41,169,232,.18), transparent 70%);
  pointer-events: none;
}
.ref-panel .eyebrow { color: rgba(255,255,255,.6); justify-content: center; }
.ref-panel .eyebrow::before { background: rgba(255,255,255,.4); }
.ref-panel .sec-title {
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  margin: 0 auto 22px;
  max-width: 18ch;
}
.ref-lead {
  color: rgba(255,255,255,.75);
  max-width: 56ch;
  margin: 0 auto 40px;
  font-size: 1.05rem;
}
.ref-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  position: relative;
}
.chip {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.04);
}

/* ----- 12. CTA band ------------------------------------------- */
.cta-band {
  padding: clamp(60px, 10vw, 120px) 0;
  background: var(--grad);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 90% 0%, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-text { max-width: 60ch; }
.cta-text h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  margin: 0 0 8px;
}
.cta-text p { color: rgba(255,255,255,.9); margin: 0; }

/* ----- 13. Footer --------------------------------------------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.75);
  padding: clamp(60px, 8vw, 96px) 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px 32px; }
}
.f-brand p { max-width: 30ch; color: rgba(255,255,255,.6); margin: 16px 0 0; }
.f-logo img {
  height: 38px; width: auto;
  filter: brightness(0) invert(1);
}
.f-h {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--blue-l);
  margin: 0 0 16px;
}
.footer ul { display: flex; flex-direction: column; gap: 12px; }
.footer a { color: #fff; opacity: .8; transition: opacity .2s; }
.footer a:hover { opacity: 1; }
.f-meta li { color: rgba(255,255,255,.65); font-size: 0.94rem; line-height: 1.6; }
.f-meta em { font-style: normal; color: rgba(255,255,255,.4); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255,255,255,.45);
  font-size: 0.85rem;
}
.footer-bottom .mono { letter-spacing: 0.16em; color: rgba(255,255,255,.5); }

/* ----- 14. AI Assistant --------------------------------------- */
.ai-widget {
  position: fixed;
  left: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 90;
  font-family: 'Inter', sans-serif;
}
.ai-fab {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  color: var(--ink);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ai-orb {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--grad);
  display: inline-block;
  box-shadow: 0 4px 12px rgba(9,137,212,.4);
}
.ai-orb.sm { width: 22px; height: 22px; }
.ai-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--blue-l);
  animation: aipulse 2.2s ease-out infinite;
}
@keyframes aipulse {
  0%   { transform: scale(.7); opacity: .7; }
  100% { transform: scale(1.9); opacity: 0; }
}
.ai-fab-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.ai-fab-line { font-weight: 600; font-size: 0.95rem; }
.ai-fab-sub { color: var(--steel); font-size: 10px; margin-top: 2px; }

.ai-panel {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(540px, calc(var(--app-h) - 120px));
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom left;
  transform: scale(.92) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.ai-panel.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ink);
  color: #fff;
}
.ai-id { display: flex; align-items: center; gap: 12px; }
.ai-name { font-weight: 600; font-size: 0.95rem; margin: 0; }
.ai-status { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.65); font-size: 10px; margin: 2px 0 0; letter-spacing: 0.14em; }
.ai-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #28D17C;
  box-shadow: 0 0 0 0 rgba(40,209,124,.5);
  animation: livedot 2s ease-out infinite;
}
@keyframes livedot {
  0%   { box-shadow: 0 0 0 0 rgba(40,209,124,.5); }
  100% { box-shadow: 0 0 0 7px rgba(40,209,124,0); }
}
.ai-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: rgba(255,255,255,.7);
  transition: color .2s, background .2s;
}
.ai-close:hover { color: #fff; background: rgba(255,255,255,.08); }

.ai-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(244,247,250,.4), transparent 60px);
}
.ai-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.ai-msg.bot {
  background: var(--paper);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.ai-msg.user {
  background: var(--grad);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ai-msg.bot.typing::after {
  content: "▍";
  display: inline-block;
  margin-left: 2px;
  color: var(--blue);
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.ai-thinking {
  display: inline-flex; gap: 4px;
  background: var(--paper);
  padding: 12px 14px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.ai-thinking span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--steel-2);
  animation: thinkbob 1.2s ease-in-out infinite;
}
.ai-thinking span:nth-child(2) { animation-delay: .15s; }
.ai-thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes thinkbob {
  0%, 100% { transform: translateY(0); opacity: .5; }
  50%      { transform: translateY(-4px); opacity: 1; }
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 4px;
  border-top: 1px solid var(--line-soft);
}
.ai-chips button {
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  transition: background .2s, color .2s, border-color .2s;
}
.ai-chips button:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.ai-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line-soft);
}
.ai-form input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.92rem;
  background: var(--paper);
  transition: border-color .2s;
}
.ai-form input:focus { outline: none; border-color: var(--blue); }
.ai-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(9,137,212,.3);
  transition: transform .2s;
}
.ai-send:hover { transform: scale(1.06); }

@media (max-width: 480px) {
  .ai-fab-text { display: none; }
  .ai-fab { padding: 10px; }
}

/* ----- 15. Back to top ---------------------------------------- */
.totop {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 90;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  color: var(--ink);
  opacity: 0;
  transform: translateY(12px) scale(.92);
  pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), border-color .25s;
}
.totop.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.totop:hover { border-color: var(--blue-l); }
.totop svg:first-child {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.totop .ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
}
.totop .ring-fill {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset .15s linear;
}
.totop-arrow {
  position: relative;
  z-index: 1;
  width: 14px; height: 14px;
  color: var(--ink);
  transition: transform .25s var(--ease-out), color .25s;
}
.totop:hover .totop-arrow { transform: translateY(-2px); color: var(--blue-d); }
.totop-tip {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%) translateX(6px);
  padding: 6px 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease-out);
}
.totop:hover .totop-tip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ============================================================== */
/* PHASE 2 — multi-page components                                 */
/* ============================================================== */

/* ----- Non-home navbar: solid by default ---------------------- */
/* Phase 1 navbar starts transparent over the hero; on every other
   page there's no dark hero, so it begins in the .scrolled style
   (JS sets the class at boot for redundancy; CSS guarantees the
   look even if the script is blocked). */
body:not([data-page="home"]) .navbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 14px rgba(14,17,20,.04);
}
body:not([data-page="home"]) .navbar::before { opacity: 0; }
body:not([data-page="home"]) .nav-logo img { filter: none; }

/* ----- Mount-point hosts ------------------------------------- */
#site-header, #site-footer, #site-widgets { display: contents; }

/* ----- Page hero band ---------------------------------------- */
.page-hero {
  padding: calc(var(--nav-h) + clamp(48px, 7vw, 80px)) 0 clamp(48px, 7vw, 88px);
  background: var(--paper);
  position: relative;
  border-bottom: 1px solid var(--line);
}
.page-hero-compact {
  padding-bottom: clamp(28px, 4vw, 48px);
}
.page-hero-cat {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(41,169,232,.08), transparent 60%),
    var(--paper);
}
.page-hero .eyebrow { margin: 0 0 14px; }
.page-hero h1 {
  font-size: clamp(2rem, 5.4vw, 4rem);
  margin: 0 0 16px;
  max-width: 22ch;
}
.page-hero-lead {
  color: var(--steel);
  max-width: 56ch;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  margin: 0;
}

/* ----- Breadcrumb -------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 24px;
}
.breadcrumb a { color: var(--steel); transition: color .2s; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { color: var(--steel-2); }
.breadcrumb [aria-current] { color: var(--ink); }

/* ----- Proizvodi overview — category block -------------------- */
.cat-block {
  padding: clamp(60px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.cat-block:first-of-type { border-top: 0; }
.cat-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  margin-bottom: clamp(40px, 6vw, 64px);
  align-items: end;
}
@media (min-width: 880px) {
  .cat-head { grid-template-columns: 1.1fr 1fr; }
}
.cat-head-text .sec-title {
  font-size: clamp(1.85rem, 4.4vw, 3rem);
  margin: 0 0 16px;
}
.cat-head-media {
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.05);
  box-shadow: var(--shadow-sm);
}

/* ----- Card as a link (used on home + proizvodi) -------------- */
.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.card-arrow {
  display: inline-block;
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--blue);
  transition: color .25s;
}
.card-link:hover .card-arrow { color: var(--blue-d); }

/* ----- Item grid + card (kategorija + related) --------------- */
.item-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px)  { .item-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .item-grid { grid-template-columns: repeat(3, 1fr); } }

.item-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .35s var(--ease-out), border-color .35s, box-shadow .35s;
}
.item-card:hover {
  transform: translateY(-3px);
  border-color: var(--blue-l);
  box-shadow: var(--shadow-md);
}
.item-media {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.05);
  transition: filter .5s;
}
.item-card:hover .item-media { filter: grayscale(70%) contrast(1.1); }
.item-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.item-body h3 { font-size: 1.2rem; margin: 0; }
.item-body p { color: var(--steel); margin: 0; font-size: 0.95rem; }
.item-arrow {
  margin-top: 6px;
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.16em;
}
.item-card:hover .item-arrow { color: var(--blue-d); }

/* ----- Product / Service detail ------------------------------ */
.product-detail .pd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 880px) {
  .product-detail .pd-grid { grid-template-columns: 1.05fr 1fr; gap: 64px; }
}
.pd-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.05);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.pd-media-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: rgba(14,17,20,.55);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 0.2em;
}
.pd-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.pd-desc {
  color: var(--steel);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
}
.pd-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ----- Spec table (products) --------------------------------- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.spec-table tr {
  border-bottom: 1px solid var(--line);
}
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th {
  text-align: left;
  padding: 14px 16px 14px 0;
  font-weight: 400;
  color: var(--steel);
  font-size: 10px;
  letter-spacing: 0.16em;
  vertical-align: top;
  width: 38%;
}
.spec-table td {
  padding: 14px 0;
  color: var(--ink);
  vertical-align: top;
}
@media (max-width: 480px) {
  .spec-table th { width: auto; min-width: 110px; padding-right: 14px; }
}

/* ----- Process steps (services) ------------------------------ */
.process-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
.process-steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.process-steps li:last-child { border-bottom: 0; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(9,137,212,.22);
}

/* ----- Related items section --------------------------------- */
.section-related {
  background:
    linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 100%);
}

/* ----- Buttons: ghost on light bg ---------------------------- */
.btn-ghost-ink {
  color: var(--ink);
  border: 1px solid var(--line);
  background: transparent;
}
.btn-ghost-ink:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* ----- About: values + director ------------------------------ */
.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: clamp(40px, 6vw, 64px);
}
@media (min-width: 720px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.value-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 26px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .35s, transform .35s var(--ease-out);
}
.value-card:hover { border-color: var(--blue-l); transform: translateY(-3px); }
.value-card .mono { color: var(--blue); font-size: 11px; }
.value-card h3 { font-size: 1.15rem; margin: 0; }
.value-card p { color: var(--steel); margin: 0; }

.director-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-top: clamp(40px, 6vw, 64px);
}
.director-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.director-card .who { display: flex; flex-direction: column; gap: 2px; }
.director-card .who-name { font-weight: 600; color: var(--ink); }
.director-card .who-title { color: var(--steel); font-size: 0.92rem; }

/* ----- Reference grid (placeholder partners) ----------------- */
.ref-grid {
  display: grid;
  /* minmax(0, 1fr) lets columns shrink below their min-content size
     so long single words inside cards don't blow out the row. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 640px)  { .ref-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1020px) { .ref-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ref-card {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px 14px;
  color: var(--steel);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  min-width: 0;
  transition: border-color .25s;
}
@media (min-width: 640px) {
  .ref-card { font-size: 12px; letter-spacing: 0.16em; padding: 24px 18px; }
}
.ref-card:hover { border-color: var(--blue-l); color: var(--ink); }
.ref-note {
  margin-top: 24px;
  font-size: 0.92rem;
  color: var(--steel);
  font-style: italic;
}

/* ----- Contact: grid + form + map placeholder ----------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 880px) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-info dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-info dt {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 4px;
}
.contact-info dd {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}
.contact-info dd em {
  color: var(--steel-2);
  font-style: normal;
}

.map-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 8px;
  background: var(--ink);
}
.map-placeholder .map-grid {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 28px),
    radial-gradient(60% 50% at 50% 50%, rgba(41,169,232,.18), transparent 70%);
}
.map-placeholder .map-pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
}
.map-placeholder .pin-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--blue-l);
  box-shadow: 0 0 0 6px rgba(41,169,232,.25), 0 0 0 14px rgba(41,169,232,.12);
  margin-bottom: 12px;
}
.map-placeholder .pin-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}
.map-placeholder .pin-tag {
  position: absolute;
  right: 16px; bottom: 14px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
}

.contact-form-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
}
.contact-form-card h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 6px;
}
.contact-form-card .form-intro {
  color: var(--steel);
  margin: 0 0 24px;
  font-size: 0.95rem;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
}
.field input,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s, background .2s;
  width: 100%;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--paper-2);
}
.field textarea {
  min-height: 140px;
  resize: vertical;
}
.contact-form .form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.contact-form .form-actions .note {
  color: var(--steel-2);
  font-size: 0.85rem;
  margin: 0;
}
.contact-status {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 36px);
  color: var(--ink);
}
.contact-status p { margin: 0 0 10px; }
.contact-status p:last-child { margin: 0; color: var(--steel); }

/* ----- Long-word safety: break long Serbian compounds at narrow
   viewports (e.g. "infrastrukture", "železničkih") instead of letting
   them blow out a grid column. Paragraphs only break mid-word as a
   last resort, so normal sentences remain unaffected. -------------- */
p, h1, h2, h3, h4 {
  overflow-wrap: break-word;
  word-wrap: break-word; /* legacy alias */
}

/* ----- Grid item shrink-fix --------------------------------- */
/* Without min-width:0, grid items refuse to shrink below their
   min-content size and push the row past the container. */
.cat-head > *,
.cards > *,
.pd-grid > *,
.item-grid > *,
.contact-grid > *,
.about-grid > *,
.footer-grid > *,
.stats > *,
.values-grid > * {
  min-width: 0;
}
.cat-head {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 880px) {
  .cat-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

/* ----- Demo blueprint fallback (failed image) ---------------- */
.demo-blueprint {
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 30px),
    linear-gradient(135deg, #1B2026 0%, #0E1114 100%);
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.5);
  min-height: 220px;
  border-radius: var(--r-lg);
}
/* When demo-blueprint is the fallback for an element that already
   has aspect-ratio (cards, slides, media columns), min-height would
   combine with the ratio to force the WIDTH to grow — drop it. */
.cat-head-media.demo-blueprint,
.item-media.demo-blueprint,
.pd-media.demo-blueprint,
.media-img.demo-blueprint,
.slide.demo-blueprint,
.map-placeholder.demo-blueprint {
  min-height: 0;
}
.demo-blueprint .dbp-label,
.demo-blueprint > span:not([class]) {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
/* When demo-blueprint applied to an absolute slide, keep the label
   visible by giving the blueprint a positioned context. */
.slide.demo-blueprint { display: block; }
.slide.demo-blueprint .dbp-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}

/* ----- Section: light variant for non-home pages -------------- */
.section-light { background: var(--paper); }


/* ----- 16. Reduced motion ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .slide.is-active { animation: none; }
  .ind.is-active .ind-fill { width: 100%; animation: none; }
  .ticker-track { animation: none; }
  .cue-arrow, .ai-pulse, .ai-dot, .ai-thinking span { animation: none; }
  .ai-msg.bot.typing::after { display: none; }
}
