/* Instrukcije Zagreb — main stylesheet (mobile-first, no dependencies) */

:root {
  --brand: #550394;
  --brand-dark: #3d0270;
  --brand-soft: #f3ebfb;
  --brand-line: #e2d3f3;
  --accent: #ffb627;
  --wa: #0f7a4a;
  --wa-dark: #0b5e39;
  --ink: #1d1a22;
  --ink-soft: #55505e;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #e7e3ec;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(29 26 34 / 6%), 0 8px 24px rgb(29 26 34 / 8%);
  --shadow-lg: 0 2px 4px rgb(29 26 34 / 6%), 0 18px 48px rgb(61 2 112 / 18%);
  --max: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, 0.96rem + 0.2vw, 1.0625rem)/1.65 var(--font);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 50;
  background: rgb(251 250 247 / 88%);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem;
  padding-block: 0.7rem;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.logo:hover { color: var(--brand); }
.logo-mark {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem;
  border-radius: 10px; background: var(--brand); color: #fff; font-size: 1.35rem; line-height: 1;
}
.logo small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }

.site-nav { order: 3; width: 100%; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0 0 0 -0.6rem; padding: 0; white-space: nowrap; }
.site-nav a {
  display: block; padding: 0.35rem 0.6rem; border-radius: 999px;
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; text-decoration: none;
}
.site-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.site-header .header-call { display: none; }

@media (min-width: 60rem) {
  .site-header { position: sticky; top: 0; }
  .site-nav { order: 0; width: auto; }
  .site-nav ul { margin: 0; }
  .site-header .header-call { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.9rem; padding: 0.65rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgb(85 3 148 / 28%); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); color: #fff; }
.btn-ghost { border-color: var(--brand-line); color: var(--brand); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-sm { min-height: 2.4rem; padding: 0.45rem 1rem; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgb(85 3 148 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(85 3 148 / 6%) 1px, transparent 1px);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(transparent, var(--paper)); pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; gap: 2.5rem; align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line);
  padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.hero h1 .hl { color: var(--brand); }
.lead { font-size: clamp(1.08rem, 1rem + 0.45vw, 1.3rem); color: var(--ink-soft); max-width: 38rem; }
.hero .btn-row { margin-block: 1.75rem 1.5rem; }
.trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; margin: 0; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.trust li { display: inline-flex; align-items: center; gap: 0.4rem; }
.trust li::before { content: "✓"; color: var(--brand); font-weight: 800; }

.hero-figure { margin: 0; justify-self: center; max-width: 30rem; width: 100%; }
.paper {
  background: #fff; padding: 0.75rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); transform: rotate(-2deg);
}
.paper img { border-radius: 4px; width: 100%; }
.hero-figure figcaption {
  margin-top: 1rem; text-align: center; font-family: var(--font-hand);
  color: var(--brand); font-size: 1.05rem; transform: rotate(-1deg);
}

@media (min-width: 60rem) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }
.kicker { display: block; color: var(--brand); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.5rem; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); }
.grid-2 { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 52rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-line); }
.card p { color: var(--ink-soft); }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; }
.card .more::after { content: " →"; }
.card-link::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.icon {
  display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem;
  border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  font-size: 1.5rem; font-weight: 800; font-family: Georgia, "Times New Roman", serif;
}

.features { display: grid; gap: 1.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.features h3 { margin-bottom: 0.35rem; }
.features p { color: var(--ink-soft); margin: 0; }
.features li { padding-left: 1rem; border-left: 3px solid var(--brand); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1rem 1rem 3.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem;
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 0.95rem;
}
.steps strong { display: block; }
.steps span { color: var(--ink-soft); }

.online-box {
  display: grid; gap: 1.5rem; align-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, #7a1fc2 100%); color: #fff;
  border-radius: calc(var(--radius) * 1.5); padding: clamp(1.75rem, 5vw, 3rem);
  box-shadow: var(--shadow-lg);
}
.online-box h2 { color: #fff; }
.online-box p { color: rgb(255 255 255 / 88%); }
.online-box .kicker { color: var(--accent); }
.online-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.online-box li { display: flex; gap: 0.6rem; }
.online-box li::before { content: "✓"; color: var(--accent); font-weight: 800; }
@media (min-width: 52rem) { .online-box { grid-template-columns: 1.3fr 1fr; } }

/* ---------- Price table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.price-table { width: 100%; border-collapse: collapse; min-width: 19rem; }
@media (max-width: 30rem) { .price-table th, .price-table td { padding: 0.8rem 0.7rem; } .price-table td { font-size: 1.05rem; } }
.price-table th, .price-table td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--line); }
.price-table thead th { background: var(--brand-soft); color: var(--brand-dark); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
.price-table tbody th { font-weight: 600; }
.price-table td { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.price-table tr:last-child > * { border-bottom: 0; }
.note { color: var(--ink-soft); font-size: 0.95rem; margin-top: 1rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0.75rem; max-width: 50rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.25rem; }
.faq details[open] { border-color: var(--brand-line); box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%;
  font-size: 1.5rem; font-weight: 400; color: var(--brand); transition: rotate 0.2s ease;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: var(--ink-soft); margin: 0 0 1.1rem; }

/* ---------- Quote / extras ---------- */
.quote {
  margin: 0; padding: 1.5rem 1.5rem 1.5rem 1.75rem; border-radius: var(--radius);
  background: var(--brand-soft); border-left: 4px solid var(--brand);
}
.quote p { font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; font-style: italic; }
.quote footer { font-weight: 700; color: var(--brand-dark); }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.link-list a { font-weight: 600; }
.link-list .meta { color: var(--ink-soft); font-size: 0.9rem; }

.pdf-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.pdf-list a {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); font-weight: 600; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pdf-list a:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.pdf-list .badge { flex: none; font-size: 0.75rem; font-weight: 800; color: #fff; background: #c2372b; border-radius: 6px; padding: 0.25rem 0.45rem; }
.pdf-list small { display: block; color: var(--ink-soft); font-weight: 400; }

/* ---------- Page header / breadcrumbs ---------- */
.page-hero { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); background: var(--surface); }
.page-hero .lead { margin-bottom: 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: 0.9rem; color: var(--ink-soft); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); }

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul li + li { margin-top: 0.35rem; }
.topic-list { columns: 2 14rem; column-gap: 2rem; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.gallery figure { margin: 0; height: 100%; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.gallery figure:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.gallery a { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #f4f2ee; }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.3s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 0.65rem 0.85rem; line-height: 1.35; font-weight: 600; font-size: 0.95rem; }
.gallery figcaption small { display: block; color: var(--ink-soft); font-weight: 400; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lightbox::backdrop { background: rgb(20 14 28 / 92%); }
.lightbox-inner { display: grid; grid-template-rows: 1fr auto; place-items: center; width: 100%; height: 100%; padding: 3.5rem 1rem 1rem; }
.lightbox img { max-width: min(100%, 60rem); max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.lightbox p { color: #fff; margin: 0.75rem 0 0; font-weight: 600; text-align: center; }
.lightbox button {
  position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem;
  border: 0; border-radius: 50%; background: rgb(255 255 255 / 14%); color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgb(255 255 255 / 26%); }
.lb-close { top: 0.75rem; right: 0.75rem; }
.lb-prev { left: 0.75rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 0.75rem; top: 50%; translate: 0 -50%; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.contact-card { display: flex; flex-direction: column; gap: 0.35rem; }
.contact-card .value { font-size: 1.25rem; font-weight: 800; color: var(--ink); word-break: break-word; }
.contact-card .btn { margin-top: 0.75rem; align-self: flex-start; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; }
.cta-band .container { display: grid; gap: 1.5rem; align-items: center; padding-block: clamp(2.5rem, 6vw, 4rem); }
.cta-band h2 { color: #fff; margin-bottom: 0.35rem; }
.cta-band p { color: rgb(255 255 255 / 75%); margin: 0; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 35%); }
.cta-band .btn-ghost:hover { border-color: #fff; color: #fff; }
@media (min-width: 52rem) { .cta-band .container { grid-template-columns: 1fr auto; } }

/* ---------- Footer ---------- */
.site-footer { background: #15121a; color: rgb(255 255 255 / 72%); font-size: 0.95rem; padding-block: 3rem 1.5rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.site-footer h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; margin-bottom: 0.85rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.site-footer address { font-style: normal; }
.site-footer .logo { color: #fff; margin-bottom: 0.75rem; }
.site-footer .logo small { color: rgb(255 255 255 / 60%); }
.copyright { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 12%); font-size: 0.85rem; }

/* ---------- Mobile action bar ---------- */
.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgb(255 255 255 / 94%); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.mobile-bar .btn { min-height: 2.75rem; padding-inline: 0.75rem; }
body { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 60rem) {
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 40rem) { .gallery { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); } .site-nav a { padding: 0.4rem 0.8rem; } }

/* Contact line inside the homepage CTA band */
.cta-band .cta-contact { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1rem; color: #fff; font-weight: 600; }
.cta-contact a, .cta-contact span { display: inline-flex; align-items: center; gap: 0.45rem; color: #fff; text-decoration: none; }
.cta-contact a:hover { color: var(--accent); }
.cta-contact svg { width: 1.1em; height: 1.1em; flex: none; }
