/* Livico — statička verzija (mystic teaser) */

:root {
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

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

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ============ Mystic teaser scope ============ */
.mystic {
  --background: oklch(0.955 0 0);
  --foreground: oklch(0.31 0 0);
  --muted-foreground: oklch(0.49 0 0);
  --accent: oklch(0.39 0 0);
  --border: color-mix(in oklab, var(--foreground) 10%, transparent);
  --mystic-shadow: oklch(0.31 0 0 / 3%);
  --mystic-line: color-mix(in oklab, var(--accent) 7%, transparent);
  --mystic-frame: color-mix(in oklab, var(--accent) 10%, transparent);
  --mystic-symbol-ink: color-mix(in oklab, var(--accent) 10%, transparent);
  --mystic-number-ink: color-mix(in oklab, var(--accent) 8%, transparent);
  --scroll-progress: 0;
  --pointer-x: 0px;
  --pointer-y: 0px;
  --hero-shift: 0px;
  background-color: var(--background);
  color: var(--foreground);
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  letter-spacing: 0;
  position: relative;
}

.mystic-progress {
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: 20;
  height: 1px;
  background: var(--accent);
  transform: scaleX(var(--scroll-progress));
  transform-origin: left;
}

.mystic-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(color-mix(in oklab, var(--foreground) 3%, transparent) 1px, transparent 1px),
    radial-gradient(color-mix(in oklab, var(--accent) 5%, transparent) 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
}

.mystic-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 50% 40%, transparent 40%, var(--mystic-shadow) 100%);
}

/* Hero */
.mystic-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-left: 24px;
  padding-right: 24px;
  text-align: center;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 24px;
  padding-bottom: 24px;
}

.mystic-depth {
  position: relative;
  width: 100%;
  max-width: 22.4rem;
  transform: translate3d(var(--pointer-x), calc(var(--pointer-y) + var(--hero-shift)), 0);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.mystic-logo {
  height: auto;
  width: 100%;
  display: block;
  animation: mystic-float 6s ease-in-out 1.4s infinite;
}

.mystic-hero-rule {
  position: relative;
  margin-top: 28px;
  margin-bottom: 28px;
  width: 7rem;
}

.mystic-title {
  position: relative;
  max-width: 48rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.12;
}

.mystic-copy {
  position: relative;
  margin-top: 28px;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.mystic-cue {
  position: absolute;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: var(--muted-foreground);
}

.mystic-architecture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translate3d(calc(var(--pointer-x) * -0.5), calc(var(--pointer-y) * -0.5), 0);
  transition: transform 1.2s ease-out;
  mask-image: linear-gradient(transparent, var(--foreground) 18%, var(--foreground) 78%, transparent);
  -webkit-mask-image: linear-gradient(transparent, var(--foreground) 18%, var(--foreground) 78%, transparent);
}

.mystic-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(74vw, 780px);
  aspect-ratio: 1;
  border: 1px solid var(--mystic-frame);
  animation: mystic-orbit 48s linear infinite;
}
.mystic-frame-one { --frame-angle: 22deg; width: min(58vw, 620px); }
.mystic-frame-two { --frame-angle: 67deg; width: min(72vw, 760px); animation-direction: reverse; animation-duration: 64s; }
.mystic-frame-three { --frame-angle: -12deg; width: min(44vw, 470px); animation-duration: 56s; }

@keyframes mystic-orbit {
  from { transform: translate(-50%, -50%) rotate(var(--frame-angle)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--frame-angle) + 360deg)); }
}

.mystic-connected {
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent) 10%, var(--foreground) 48%, var(--accent) 72%);
  background-size: 250% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: mystic-shimmer 7s ease-in-out infinite;
}
@keyframes mystic-shimmer {
  0%, 25%, 100% { background-position: 100% 50%; }
  65% { background-position: 0% 50%; }
}

.mystic-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  transform: translate3d(calc(var(--pointer-x) * -1), calc(var(--pointer-y) * -1), 0);
  transition: transform 1.2s ease-out;
  mask-image: linear-gradient(transparent, var(--foreground) 25%, var(--foreground) 70%, transparent);
  -webkit-mask-image: linear-gradient(transparent, var(--foreground) 25%, var(--foreground) 70%, transparent);
}

.mystic-lines span {
  position: absolute;
  width: 150%;
  height: 1px;
  left: -25%;
  top: 50%;
  background: var(--mystic-line);
  transform: rotate(-32deg);
  animation: mystic-line-drift 10s ease-in-out infinite alternate;
}
.mystic-lines span:nth-child(2) { top: 28%; transform: rotate(32deg); animation-delay: -6s; }
.mystic-lines span:nth-child(3) { top: 78%; transform: rotate(-32deg); animation-delay: -12s; }
.mystic-lines span:nth-child(4) { top: 38%; transform: rotate(32deg); animation-delay: -3s; }
.mystic-lines span:nth-child(5) { top: 66%; transform: rotate(-32deg); animation-delay: -7s; }
.mystic-lines span:nth-child(6) { top: 90%; transform: rotate(32deg); animation-delay: -9s; }

@keyframes mystic-line-drift {
  from { translate: 0 -70px; opacity: 0.3; }
  to { translate: 0 70px; opacity: 0.9; }
}

@keyframes mystic-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

.mystic-scroll-cue {
  display: block;
  height: 28px;
  width: 1px;
  background: color-mix(in oklab, var(--accent) 40%, transparent);
  transform-origin: top;
  animation: mystic-scroll 2.8s ease-in-out 2s infinite;
}
@keyframes mystic-scroll {
  0%, 100% { scale: 1 0.5; opacity: 0.35; }
  50% { scale: 1 1; opacity: 1; }
}

.mystic-rule {
  position: relative;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--accent) 55%, transparent), transparent);
  height: 1px;
  overflow: hidden;
}
.mystic-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: mystic-trace 4s ease-in-out infinite;
}
@keyframes mystic-trace {
  0%, 15% { transform: translateX(-100%); }
  80%, 100% { transform: translateX(100%); }
}

/* Reveal */
.mystic [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.mystic [data-reveal].revealed {
  opacity: 1;
  transform: none;
}
.mystic [data-scene].revealed { transform: translateY(var(--scene-shift, 0px)); }

/* Ghost texts: barely-there, whisper-quiet */
.mystic .mystic-ghost {
  opacity: 0.45;
  filter: blur(0.4px);
}

/* Floating whispers: sharp near viewport center, fading as they drift away */
.mystic [data-float] {
  opacity: calc(0.03 + var(--scene-focus, 0) * 0.97);
  filter: blur(calc((1 - var(--scene-focus, 0)) * 10px));
  transform: translateY(var(--scene-shift, 0px));
  transition: opacity 0.3s linear, filter 0.3s linear;
  animation: mystic-levitate 7s ease-in-out infinite;
  will-change: opacity, filter, transform;
}
.mystic [data-float]:nth-of-type(2) { animation-delay: -2.3s; }
.mystic [data-float]:nth-of-type(3) { animation-delay: -4.6s; }
.mystic [data-float] .mystic-word { opacity: 1; transform: none; filter: none; }
.mystic [data-float] .mystic-numeral { transform: none; }
.mystic [data-float] .mystic-scene-rule { transform: scaleX(1); }

/* Scene background symbols */
.mystic [data-float] > :not(.mystic-scene-symbols) { position: relative; z-index: 1; }
.mystic-scene-symbols {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: 50%;
  top: 50%;
  width: min(100%, 600px);
  aspect-ratio: 10 / 3;
  transform: translate(-50%, -50%);
}
.mystic-scene-symbols svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mystic-symbol-linework { stroke: var(--mystic-symbol-ink); stroke-width: 0.6; stroke-linecap: round; stroke-linejoin: round; }
.mystic-symbol-numbers { fill: var(--mystic-number-ink); font-family: var(--font-display); font-weight: 300; font-size: 54px; }
.mystic-symbol-numbers .mystic-symbol-small { font-size: 30px; }
.mystic-symbol-drift {
  transform-box: fill-box;
  transform-origin: center;
  animation: mystic-symbol-orbit 84s linear infinite;
}
.mystic-symbol-drift:nth-child(even) { animation-delay: -34s; animation-duration: 104s; animation-direction: reverse; }
.mystic-symbol-drift:nth-child(3n) { animation-delay: -19s; }
.mystic-symbol-numbers .mystic-symbol-drift { animation-duration: 96s; }
.mystic-symbol-numbers .mystic-symbol-drift:nth-child(even) { animation-direction: reverse; animation-duration: 118s; }
.mystic-symbols-papers .mystic-symbol-drift { animation-duration: 78s; }
@keyframes mystic-symbol-orbit {
  from { transform: rotate(0deg); opacity: 0.9; }
  to { transform: rotate(360deg); opacity: 0.9; }
}
@keyframes mystic-levitate {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

/* Whispers */
.mystic-whispers {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  max-width: 48rem;
  padding: 40px 24px;
}
.mystic-whispers-inner > * + * { margin-top: 40px; }

.mystic-scene { text-align: center; }

.mystic-numeral {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--accent);
  transition: transform 1.4s ease;
  transform: translateY(-12px);
}
.mystic .revealed .mystic-numeral { transform: none; }

.mystic-words {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.375;
}
.mystic-word {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(30px) rotate(3deg);
  filter: blur(5px);
  transition: opacity 0.9s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.9s ease;
}
.mystic-word:nth-child(2) { transition-delay: 120ms; }
.mystic-word:nth-child(3) { transition-delay: 240ms; }
.mystic-word:nth-child(4) { transition-delay: 360ms; }
.mystic-word:nth-child(5) { transition-delay: 480ms; }
.mystic .revealed .mystic-word { opacity: 1; transform: none; filter: none; }

.mystic-scene-rule {
  margin-left: auto;
  margin-right: auto;
  margin-top: 28px;
  width: 4rem;
  transform: scaleX(0);
  transition: transform 1.6s ease 0.4s;
}
.mystic .revealed .mystic-scene-rule { transform: scaleX(1); }

/* Quiet paragraph */
.mystic-quiet {
  position: relative;
  padding: 0 24px 40px;
}
.mystic-quiet-inner {
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
  text-align: center;
}
.mystic-quiet-rule {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 28px;
  width: 4rem;
}
.mystic-quiet-text {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}

/* CTA */
.mystic-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.mystic-cta-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 400;
}

.mystic-write {
  margin-top: 24px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}
.mystic-write:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.mystic-contact a svg { animation: mystic-invite 3s ease-in-out infinite; }
@keyframes mystic-invite { 0%, 100% { translate: 0; } 50% { translate: 5px 0; } }

/* Footer */
.mystic-footer {
  position: relative;
  border-top: 1px solid var(--border);
}
.mystic-footer-inner {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  max-width: 72rem;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 32px 24px;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.mystic-footer-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}
.mystic-footer-link:hover { color: var(--accent); }

/* „Pišite nam” i prozor s obrascem */
.mystic-write {
  position: relative;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--foreground);
  background: none;
  border: 0;
  padding: 4px 2px 6px;
  cursor: pointer;
}
.mystic-write::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  opacity: 0.5;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}
.mystic-write:hover::after, .mystic-write:focus-visible::after { transform: scaleX(1); opacity: 1; }
.mystic-write:focus-visible { outline: none; }
.mystic-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.mystic-modal[hidden] { display: none; }
.mystic-modal-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--background) 45%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: mystic-fade 0.4s ease both;
}
.mystic-modal-card {
  position: relative;
  width: 100%;
  max-width: 30rem;
  max-height: calc(100svh - 32px);
  overflow: auto;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 30px 80px oklch(0.31 0 0 / 12%), 0 2px 8px oklch(0.31 0 0 / 6%);
  padding: 34px 32px 26px;
  animation: mystic-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mystic-modal.is-closing .mystic-modal-card { animation: mystic-sink 0.25s ease both; }
.mystic-modal.is-closing .mystic-modal-backdrop { animation: mystic-fade 0.25s ease reverse both; }
.mystic-modal-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 36px; height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted-foreground);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease;
}
.mystic-modal-close:hover { color: var(--foreground); background: color-mix(in oklab, var(--foreground) 6%, transparent); }
@keyframes mystic-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mystic-sink { to { opacity: 0; transform: translateY(12px); filter: blur(4px); } }
body.mystic-modal-open { overflow: hidden; }

/* Kontakt obrazac */
.mystic-contact {
  position: relative;
  width: 100%;
  text-align: left;
}
.mystic-contact-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.15rem;
  text-align: center;
  margin-bottom: 18px;
  color: var(--foreground);
}
.mystic-contact-row { display: grid; gap: 14px; }
.mystic-field { display: block; margin-bottom: 14px; }
.mystic-contact-row .mystic-field { margin-bottom: 0; }
.mystic-contact-row { margin-bottom: 14px; }
.mystic-field span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 4px;
}
.mystic-field input,
.mystic-field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  color: var(--foreground);
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in oklab, var(--foreground) 22%, transparent);
  border-radius: 0;
  padding: 6px 0 7px;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
}
.mystic-field textarea { line-height: 1.5; min-height: calc(10 * 1.5em + 13px); }
/* Diskretan klizač u prozoru: bez bijele podloge, tanak i u tonu stranice */
.mystic-modal-card, .mystic-field textarea {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--foreground) 22%, transparent) transparent;
}
.mystic-modal-card::-webkit-scrollbar, .mystic-field textarea::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
.mystic-modal-card::-webkit-scrollbar-track, .mystic-field textarea::-webkit-scrollbar-track { background: transparent; }
.mystic-modal-card::-webkit-scrollbar-thumb, .mystic-field textarea::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--foreground) 22%, transparent); border-radius: 999px; }
.mystic-modal-card::-webkit-scrollbar-thumb:hover, .mystic-field textarea::-webkit-scrollbar-thumb:hover { background: color-mix(in oklab, var(--foreground) 38%, transparent); }
.mystic-modal-card::-webkit-scrollbar-button, .mystic-field textarea::-webkit-scrollbar-button { display: none; height: 0; }
.mystic-field input:focus,
.mystic-field textarea:focus { border-bottom-color: var(--accent); }
.mystic-field.is-invalid input,
.mystic-field.is-invalid textarea { border-bottom-color: oklch(0.55 0.15 25); }
.mystic-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mystic-contact-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; margin-top: 6px; }
.mystic-send {
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--background);
  background: var(--foreground);
  border: 0;
  border-radius: 999px;
  padding: 11px 26px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}
.mystic-send:hover { background: var(--accent); transform: translateY(-1px); }
.mystic-send:disabled { opacity: 0.55; cursor: default; transform: none; }
.mystic-contact-status { font-size: 0.8rem; color: var(--muted-foreground); }
.mystic-contact-status.is-ok { color: var(--foreground); }
.mystic-contact-status.is-err { color: oklch(0.5 0.15 25); }
.mystic-contact-note { margin-top: 14px; font-size: 0.68rem; color: var(--muted-foreground); text-align: center; }
.mystic-contact-status { flex-basis: 100%; text-align: center; }
.mystic-contact-status:empty { display: none; }
@media (min-width: 640px) {
  .mystic-contact-row { grid-template-columns: 1fr 1fr; gap: 20px; }
}

/* Rise animation */
@keyframes mystic-rise {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes mystic-rise-ghost {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 0.45; transform: none; filter: blur(0.4px); }
}
.mystic-rise { animation: mystic-rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
.mystic-rise.mystic-ghost { animation-name: mystic-rise-ghost; }
.mystic-delay-rule { animation-delay: 0.5s; }
.mystic-delay-title { animation-delay: 0.8s; }
.mystic-delay-copy { animation-delay: 1.3s; }
.mystic-delay-cue { animation-delay: 2s; }

/* Desktop */
@media (min-width: 640px) {
  .mystic-title { font-size: 33px; }
  .mystic-copy { font-size: 0.875rem; }
  .mystic-whispers { padding-top: 80px; padding-bottom: 80px; }
  .mystic-whispers-inner > * + * { margin-top: 64px; }
  .mystic-words { font-size: 25px; }
  .mystic-quiet { padding-bottom: 80px; }
  .mystic-quiet-rule { margin-bottom: 40px; }
  .mystic-quiet-text { font-size: 15px; }
  .mystic-cta { padding-top: 80px; padding-bottom: 80px; }
  .mystic-cta-title { font-size: 31px; }
  .mystic-footer-inner { flex-direction: row; }
}

/* Mobile */
@media (max-width: 639px) {
  .mystic-hero {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .mystic-depth { max-width: 256px; }
  .mystic-delay-rule { margin-top: 20px; margin-bottom: 20px; }
  .mystic-delay-copy { margin-top: 16px; }
  .mystic-cue { bottom: 18px; }
  .mystic-write { margin-top: 16px; min-height: 48px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mystic *, .mystic *::before, .mystic *::after { animation: none !important; transition: none !important; }
  .mystic-depth, .mystic-lines, .mystic-architecture { transform: none; }
  .mystic-frame { transform: translate(-50%, -50%) rotate(var(--frame-angle)); }
  .mystic [data-reveal], .mystic [data-scene].revealed, .mystic-word, .mystic-numeral { opacity: 1; transform: none; filter: none; }
  .mystic [data-float] { opacity: 1; filter: none; transform: none; }
  .mystic .mystic-ghost { opacity: 1; filter: none; }
  .mystic-scene-rule { transform: none; }
  .mystic-rule::after { display: none; }
}
