/* ==========================================================================
   Tomić Dental Lab — jednostrani sajt
   Paleta: mastilo/ugalj + slonovača + zlatni akcenat (linija-vodič)
   ========================================================================== */

:root {
  --ink: #0a0a0b;
  --coal: #101013;
  --panel: #16161a;
  --edge: rgba(242, 237, 227, .09);
  --edge-soft: rgba(242, 237, 227, .05);
  --bone: #f2ede3;
  --bone-dim: #d9d3c7;
  --muted: #a39d92;
  --gold: #c8a45c;
  --gold-soft: rgba(200, 164, 92, .35);
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-display: 'EB Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --w-content: 1160px;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--ink);
  color: var(--bone-dim);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

a { color: var(--bone); text-decoration-color: var(--gold-soft); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }

h1, h2, h3 { color: var(--bone); font-weight: 600; line-height: 1.12; }
h2 { font-family: var(--font-display); font-size: clamp(2.1rem, 4.6vw, 3.3rem); letter-spacing: .01em; }
h3 { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .015em; }

strong { color: var(--bone); font-weight: 600; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: fixed; top: -80px; left: 16px; z-index: 200;
  padding: 10px 18px; background: var(--gold); color: var(--ink);
  font-weight: 600; text-decoration: none; border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   Zaglavlje
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 11, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--edge-soft);
}

.header-inner {
  max-width: var(--w-content); margin: 0 auto; padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-script {
  font-family: var(--font-script); font-size: 2rem; line-height: 1;
  color: var(--bone); transform: translateY(2px);
}
.brand-caps {
  font-size: .68rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}

.nav-list { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-list a {
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600; color: var(--muted); text-decoration: none;
  transition: color .25s ease;
}
.nav-list a:hover, .nav-list a.is-active { color: var(--bone); }
.nav-list a.nav-cta {
  color: var(--ink); background: var(--bone); padding: 9px 18px; border-radius: 999px;
  transition: background-color .25s ease;
}
.nav-list a.nav-cta:hover { background: var(--gold); color: var(--ink); }

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle-box { display: grid; gap: 6px; width: 22px; }
  .nav-toggle-box span {
    height: 2px; background: var(--bone); border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-box span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-box span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav-list {
    position: fixed; top: var(--header-h); right: 0; left: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink);
    overflow-y: auto;
    padding: 8px 24px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform .3s ease, opacity .3s ease, visibility 0s linear .3s;
  }
  .nav-list.is-open {
    transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    transition-delay: 0s;
  }
  .nav-list li { border-bottom: 1px solid var(--edge-soft); }
  .nav-list li:last-child { border-bottom: 0; padding-top: 14px; }
  .nav-list a { display: block; padding: 14px 2px; font-size: .95rem; }
  .nav-list a.nav-cta { text-align: center; }
}

/* --------------------------------------------------------------------------
   Dugmad i zajednički elementi
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block; padding: 14px 30px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--bone); color: var(--ink); }
.btn-solid:hover { background: var(--gold); }
.btn-ghost { border-color: var(--edge); color: var(--bone); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.overline {
  font-size: .72rem; font-weight: 700; letter-spacing: .38em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}

.section { position: relative; padding: clamp(90px, 12vw, 150px) 0; }
.section-inner { position: relative; z-index: 2; max-width: var(--w-content); margin: 0 auto; padding: 0 24px; }
.section-lead { max-width: 520px; margin-top: 14px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Reveal animacije (JS dodaje .is-in; bez JS-a sve vidljivo)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Linija-vodič
   -------------------------------------------------------------------------- */

.guide-line {
  position: absolute; top: 0; left: 0; z-index: 1;
  pointer-events: none; overflow: visible;
}
.guide-track, .guide-draw { fill: none; stroke-width: 1.5; }
.guide-track { stroke: var(--edge-soft); }
.guide-draw { stroke: var(--gold); filter: drop-shadow(0 0 6px rgba(200, 164, 92, .45)); }

.line-node {
  position: absolute; bottom: 0; left: 0;
  width: 1px; height: 1px; visibility: hidden;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 5vw, 72px);
  max-width: var(--w-content); margin: 0 auto;
  padding: calc(var(--header-h) + 48px) 24px 96px;
}

.hero-inner, .hero-figure { position: relative; z-index: 2; }

.hero-overline { margin-bottom: 26px; }

.hero-title { display: grid; }
.hero-script {
  font-family: var(--font-script); font-weight: 400;
  font-size: clamp(4.6rem, 13vw, 8.8rem); line-height: .95;
  color: var(--bone); padding-right: .15em;
}
.hero-caps {
  font-family: var(--font-body); font-weight: 600;
  font-size: clamp(.95rem, 2.4vw, 1.35rem);
  letter-spacing: .58em; text-transform: uppercase;
  color: var(--gold); margin: 18px 0 0 8px;
}

.hero-lead { max-width: 480px; margin-top: 30px; color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }

.hero-figure { position: relative; justify-self: end; width: min(100%, 440px); }
.specimen-frame {
  position: relative; border: 1px solid var(--edge);
  padding: 14px; background: var(--coal);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.specimen-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(242, 237, 227, .05), transparent 55%);
}
.specimen-frame img { filter: saturate(1.04) contrast(1.03); }
.specimen-tag {
  margin-top: 14px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); text-align: right;
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px; text-decoration: none;
}
.scroll-cue-line {
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  animation: cue-pulse 2.2s ease-in-out infinite;
}
.scroll-cue-text {
  font-size: .68rem; letter-spacing: .32em; text-transform: uppercase; color: var(--muted);
}
@keyframes cue-pulse {
  0%, 100% { opacity: .35; transform: scaleY(.8); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line { animation: none; }
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr; text-align: left;
    padding-top: calc(var(--header-h) + 40px); padding-bottom: 120px;
    min-height: auto;
  }
  .hero-figure { justify-self: start; width: min(100%, 380px); margin-top: 12px; }
}

/* --------------------------------------------------------------------------
   Marquee traka
   -------------------------------------------------------------------------- */

.marquee {
  overflow: hidden; border-top: 1px solid var(--edge-soft); border-bottom: 1px solid var(--edge-soft);
  padding: 18px 0; background: var(--coal);
}
.marquee-track {
  display: flex; gap: 34px; width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display); font-size: 1.15rem; font-style: italic;
  color: var(--muted); white-space: nowrap;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* --------------------------------------------------------------------------
   O laboratoriji
   -------------------------------------------------------------------------- */

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 88px); align-items: center; }

.split-text p + p { margin-top: 18px; }
.split-text h2 { margin-bottom: 26px; }

.about-points { list-style: none; margin-top: 30px; display: grid; gap: 12px; }

/* zajednička crtica ispred stavki nabrajanja (about + saradnja) */
.dash-list li { position: relative; padding-left: 30px; }
.dash-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 18px; height: 1.5px; background: var(--gold);
}
.about-points li { color: var(--bone-dim); font-size: .98rem; }

.split-figure { position: relative; }
.split-figure img {
  border: 1px solid var(--edge);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .5);
}
.split-figure figcaption {
  margin-top: 14px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split-figure { max-width: 420px; }
}

/* --------------------------------------------------------------------------
   Usluge
   -------------------------------------------------------------------------- */

.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--edge-soft);
  border: 1px solid var(--edge-soft);
  margin-top: 54px;
}
.service-card {
  background: var(--ink); padding: clamp(28px, 4vw, 48px);
  transition: background-color .35s ease;
}
.service-card:hover { background: var(--coal); }
.service-num {
  font-family: var(--font-display); font-style: italic;
  color: var(--gold); font-size: 1.05rem; letter-spacing: .08em;
}
.service-card h3 { margin: 14px 0 12px; }
.service-card p { color: var(--muted); font-size: .98rem; }

@media (max-width: 720px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Radovi
   -------------------------------------------------------------------------- */

.works-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 22px); margin-top: 54px;
}
.work-item { position: relative; }
.work-zoom {
  display: block; width: 100%; padding: 0; border: 1px solid var(--edge);
  background: var(--coal); cursor: zoom-in; overflow: hidden;
}
.work-zoom img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .7s cubic-bezier(.22, .61, .36, 1), opacity .7s ease;
}
.work-zoom:hover img { transform: scale(1.045); }
.work-item figcaption {
  margin-top: 10px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.works-more { margin-top: 40px; color: var(--muted); }

@media (max-width: 880px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .works-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .work-zoom img { transition: none; }
  .work-zoom:hover img { transform: none; }
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center; padding: 32px;
  background: rgba(6, 6, 7, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(92vw, 960px); }
.lightbox img {
  max-width: 100%; max-height: 78vh; width: auto; height: auto;
  margin: 0 auto; border: 1px solid var(--edge);
}
.lightbox figcaption {
  margin-top: 14px; text-align: center; color: var(--bone-dim);
  font-size: .9rem; letter-spacing: .06em;
}
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 48px; height: 48px; border: 1px solid var(--edge); border-radius: 50%;
  background: transparent; color: var(--bone); font-size: 1.5rem; line-height: 1;
  cursor: pointer; transition: border-color .25s ease, color .25s ease;
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold); }

/* --------------------------------------------------------------------------
   Proces
   -------------------------------------------------------------------------- */

.process-steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(22px, 3vw, 40px); margin-top: 60px;
}
.process-step { position: relative; padding-top: 26px; }
.process-step::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 44px; height: 1.5px; background: var(--gold);
}
.step-num {
  font-family: var(--font-display); font-style: italic;
  font-size: 1.6rem; color: var(--gold);
}
.process-step h3 { margin: 10px 0 10px; font-size: 1.3rem; }
.process-step p { color: var(--muted); font-size: .95rem; }

@media (max-width: 880px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .process-steps { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Saradnja
   -------------------------------------------------------------------------- */

.coop { background: var(--coal); border-top: 1px solid var(--edge-soft); border-bottom: 1px solid var(--edge-soft); }
.coop-inner { max-width: 780px; text-align: center; }
.coop-lead { margin-top: 20px; color: var(--bone-dim); font-size: 1.12rem; }
.coop-points {
  list-style: none; margin: 38px auto 0; text-align: left; max-width: 560px;
  display: grid; gap: 16px;
}
.coop-points li { padding-left: 32px; color: var(--muted); }
.coop-points li::before { top: .68em; }
.coop-cta { margin-top: 44px; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq-inner { max-width: 780px; }
.faq-list { margin-top: 44px; border-top: 1px solid var(--edge-soft); }
.faq-list details { border-bottom: 1px solid var(--edge-soft); }
.faq-list summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 22px 44px 22px 0;
  font-family: var(--font-display); font-size: 1.3rem; color: var(--bone);
  transition: color .25s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%); color: var(--gold); font-size: 1.4rem;
  font-family: var(--font-body); font-weight: 400;
  transition: transform .3s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list summary:hover { color: var(--gold); }
.faq-list details p { padding: 0 0 24px; color: var(--muted); max-width: 640px; }

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */

.contact-split { align-items: start; }

.contact-card {
  font-style: normal; margin-top: 34px;
  border: 1px solid var(--edge); background: var(--coal);
  padding: clamp(24px, 3vw, 36px); display: grid; gap: 18px;
}
.contact-row { display: grid; gap: 4px; }
.contact-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: var(--gold);
}
.contact-note { margin-top: 24px; color: var(--muted); font-size: .95rem; max-width: 420px; }

.contact-form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: grid; gap: 8px; }
.form-field label {
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--bone-dim);
}
.form-field input, .form-field textarea {
  background: var(--coal); border: 1px solid var(--edge); color: var(--bone);
  padding: 13px 16px; font: inherit; font-size: 1rem; border-radius: 0;
  transition: border-color .25s ease;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--gold);
}
.form-field textarea { resize: vertical; min-height: 130px; }

.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-consent { display: flex; gap: 12px; align-items: flex-start; }
.form-consent input { margin-top: 5px; accent-color: var(--gold); }
.form-consent label { font-size: .88rem; color: var(--muted); }

.form-submit { justify-self: start; border: 0; }
.form-status { min-height: 1.5em; font-size: .95rem; }
.form-status.is-ok { color: #9fd6a0; }
.form-status.is-err { color: #e08f8f; }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--edge-soft); padding: 56px 0 44px; }
.footer-inner {
  max-width: var(--w-content); margin: 0 auto; padding: 0 24px;
  display: grid; gap: 10px; justify-items: center; text-align: center;
}
.footer-brand .brand-script { font-size: 2.4rem; color: var(--bone); }
.footer-brand .brand-caps { margin-left: 8px; }
.footer-meta { color: var(--muted); font-size: .95rem; }
.footer-legal { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.footer-legal a { color: var(--muted); }

/* --------------------------------------------------------------------------
   Fokus prsten
   -------------------------------------------------------------------------- */

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
