/* ==========================================================================
   Još uvijek. — landing
   Paleta i tipografija prema brand knjizi (Jos uvijek - Dizajn.pdf)
   ========================================================================== */

:root {
  /* Paleta */
  --iron:  #222A2A;   /* Iron Core */
  --aqua:  #4FBBBC;   /* Industrial Aqua */
  --rust:  #E04624;   /* Rust Signal */
  --heat:  #F39120;   /* Heat Marker */
  --cream: #E2DAC2;   /* Architectural Cream */
  --paper: #D5CEBA;   /* pozadina krem sekcija */
  --iron-2: #2C3535;

  /* Tipografija */
  --f-head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --f-type: "Special Elite", "Courier New", Courier, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  /* Šum (grain) — koristi se kao overlay */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Mrlje (otisak / štampa) */
  --blotch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018' numOctaves='4' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
  /* Maska za istrošeni pečat */
  --distress: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='150'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .11' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.7 0 0 0 -.15'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 .55 1 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

/* ---------- Reset / osnova ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--iron);
  color: var(--cream);
  font-family: var(--f-type);
  font-size: clamp(1rem, .95rem + .25vw, 1.15rem);
  line-height: 1.5;
  overflow-x: hidden;
  cursor: var(--cursor-default, auto);
}

/* Fini šum preko cijele stranice */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: var(--noise);
  opacity: .09;
  mix-blend-mode: overlay;
}

img, svg { display: block; max-width: 100%; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }

a, button, [data-deck] { cursor: var(--cursor-pointer, pointer); }
input { cursor: text; }

::selection { background: var(--rust); color: var(--cream); }

:focus-visible {
  outline: 2px dashed var(--rust);
  outline-offset: 4px;
}

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 60;
  padding: .6em 1em;
  background: var(--cream);
  color: var(--iron);
  font-family: var(--f-head);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.skip:focus { top: 12px; }

/* ---------- Zajednički elementi ---------- */

.label {
  font-family: var(--f-type);
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--aqua);
}

.px {
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
}
.px svg {
  width: 100%;
  height: auto;
  shape-rendering: crispEdges;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 0 1.4em;
  border: 2px solid var(--iron);
  border-radius: 0;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .15s;
}

.btn--rust {
  background: var(--rust);
  color: var(--cream);
  box-shadow: 4px 4px 0 var(--iron);
}
.btn--rust:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--iron); }
.btn--rust:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--iron); }

.btn--ghost {
  width: 48px;
  padding: 0;
  background: transparent;
  color: var(--iron);
  font-size: 1.6rem;
  line-height: 1;
}
.btn--ghost:hover { background: var(--iron); color: var(--cream); }

/* Istrošeni akva pečat (dekor) */
.stamp {
  position: absolute;
  width: 220px;
  height: 150px;
  background: var(--aqua);
  -webkit-mask: var(--distress) center / 100% 100% no-repeat;
          mask: var(--distress) center / 100% 100% no-repeat;
  pointer-events: none;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--gutter);
  padding-bottom: calc(var(--gutter) + 24px);
  overflow: hidden;
}

.hero__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.xbox {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 7px;
  border: 2px solid var(--iron);
  background: var(--cream);
  color: var(--iron);
  box-shadow: 0 0 0 1px var(--cream);
  transition: transform .2s var(--ease-out);
}
.xbox .px { width: 100%; }
.xbox:hover { transform: rotate(-6deg) scale(1.06); }
.xbox:active { transform: scale(.94); }

.hero__logo {
  align-self: center;
  justify-self: center;
  width: min(100%, 920px);
  margin: clamp(2rem, 6vh, 4rem) 0;
  font-size: 0;
}
.hero__logo img {
  width: 100%;
  height: auto;
  transform: rotate(-1.5deg);
  animation: tape-in .9s var(--ease-out) .15s both;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35));
}

@keyframes tape-in {
  0%   { opacity: 0; transform: translateY(-30px) rotate(-7deg) scale(1.12); }
  60%  { opacity: 1; transform: translateY(4px) rotate(-.6deg) scale(.985); }
  100% { opacity: 1; transform: translateY(0) rotate(-1.5deg) scale(1); }
}

.hero__foot {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2rem;
  align-items: end;
}

.hero__list {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.8rem);
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--cream);
}
.hero__list li {
  display: flex;
  align-items: center;
  gap: .32em;
  opacity: 0;
  animation: rise .6s var(--ease-out) both;
}
.hero__list li:nth-child(1) { animation-delay: .7s; }
.hero__list li:nth-child(2) { animation-delay: .82s; }
.hero__list li:nth-child(3) { animation-delay: .94s; }
.hero__list li::before {
  content: "×";
  font-size: .62em;
  font-weight: 700;
  color: var(--aqua);
}

.hero__cursor {
  width: .42em;
  margin-left: .15em;
  margin-top: .45em;
  --px-fill: var(--cream);
  color: var(--iron);
  animation: click 2.4s steps(1) 1.6s infinite;
}
@keyframes click {
  0%, 70%, 100% { transform: translate(0, 0); }
  75%  { transform: translate(-3px, -3px); }
  85%  { transform: translate(0, 0); }
}

.hero__intro {
  max-width: 38ch;
  opacity: 0;
  animation: rise .6s var(--ease-out) 1.05s both;
}
.hero__intro p:first-child { margin-bottom: 1.4rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.stamp--hero {
  display: none;
  right: clamp(-60px, -2vw, 0px);
  bottom: -40px;
  transform: rotate(-4deg);
  opacity: .9;
}

@media (min-width: 820px) {
  .hero__foot { grid-template-columns: 1fr minmax(0, 38ch); }
  .hero__intro { justify-self: end; }
  .stamp--hero { display: block; }
}

/* ==========================================================================
   TRAKA (ticker)
   ========================================================================== */

.ticker {
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: var(--paper);
  color: var(--iron);
  border-top: 2px solid var(--iron);
  border-bottom: 2px solid var(--iron);
}
.ticker__track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: .55em;
  padding: .35em 0;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  animation: ticker 32s linear infinite;
}
.ticker__track i {
  font-style: normal;
  color: var(--rust);
}
.ticker__track span:nth-of-type(even) { color: var(--rust); }

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   PLAKATI
   ========================================================================== */

.posters {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter) clamp(5rem, 12vw, 9rem);
  background-color: var(--paper);
  color: var(--iron);
  overflow: hidden;
}
.posters::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--blotch);
  mix-blend-mode: multiply;
  opacity: .14;
  pointer-events: none;
}
.posters > * { position: relative; }

.headline {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(3.2rem, 1.6rem + 7vw, 7.2rem);
  line-height: .95;
  letter-spacing: -.01em;
}
.headline span { display: block; }
.headline__accent { color: var(--rust); }

.lede {
  max-width: 34ch;
  margin-top: 1.6rem;
}

.deck-nav {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: 2.2rem;
}
.deck-nav__count {
  min-width: 5.5ch;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: .06em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Hrpa plakata */
.deck {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  aspect-ratio: 4 / 5;
  container-type: inline-size;
  touch-action: pan-y;
  outline-offset: 14px;
}

.poster {
  --bg: var(--cream);
  --ink: var(--iron);
  --jos: var(--iron);
  --hl: var(--heat);
  --hl-ink: var(--cream);

  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6cqi;
  padding: 9cqi 8cqi;
  background-color: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08), 0 22px 40px -18px rgba(34, 42, 42, .55);
  overflow: hidden;
  transform-origin: 50% 60%;
  transition: transform .55s var(--ease-out), opacity .4s, filter .4s;
  user-select: none;
}
.poster::before,
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* tekstura papira */
.poster::before {
  background-image: var(--blotch), var(--noise);
  background-size: 400px 400px, 240px 240px;
  mix-blend-mode: multiply;
  opacity: .28;
}
/* komad trake na vrhu */
.poster::after {
  inset: -10px auto auto 50%;
  width: 34%;
  height: 34px;
  background: rgba(226, 218, 194, .82);
  transform: translateX(-50%) rotate(var(--tape, -3deg));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  -webkit-mask: var(--distress) center / 140% 300%;
          mask: var(--distress) center / 140% 300%;
}

.poster > * { position: relative; z-index: 1; }

.poster__ne,
.poster__jos { overflow-wrap: break-word; }

.poster__jos { color: var(--jos); }
.poster__icon {
  position: absolute;
  z-index: 1;
  width: 18cqi;
  color: var(--icon, var(--ink));
  opacity: .9;
}

/* Stilovi tipografije */
.poster--oswald .poster__ne {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 12cqi;
  line-height: .98;
}
.poster--oswald .poster__jos {
  align-self: flex-end;
  max-width: 82%;
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 7.4cqi;
  line-height: 1.1;
  text-align: right;
}
.poster--oswald .poster__icon { top: 9cqi; right: 8cqi; width: 15cqi; }

.poster--elite { justify-content: center; text-align: center; gap: 5cqi; }
.poster--elite .poster__ne {
  font-family: var(--f-type);
  font-size: 9.2cqi;
  line-height: 1.04;
}
.poster--elite .poster__jos {
  font-family: var(--f-type);
  font-size: 7.6cqi;
  line-height: 1.05;
}
.poster--elite { padding-bottom: 26cqi; }
.poster--elite .poster__icon { left: 50%; bottom: 8cqi; transform: translateX(-50%); width: 14cqi; }

.poster--label { justify-content: flex-start; padding-top: 16cqi; }
.poster--label .poster__ne {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 7.6cqi;
  line-height: 1.22;
  max-width: 80%;
}
.poster--label .poster__jos {
  margin-top: -4cqi;
  max-width: 88%;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 7.6cqi;
  line-height: 1.38;
}
.poster--label .poster__jos span {
  padding: .05em .28em;
  background: var(--hl);
  color: var(--hl-ink);
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.poster--label .poster__icon { right: 8cqi; bottom: 9cqi; width: 26cqi; }

/* Teme boja */
.poster--cream    { --bg: var(--cream); --ink: var(--iron); --jos: var(--rust); --icon: var(--aqua); }
.poster--aqua     { --bg: var(--aqua);  --ink: var(--iron); --jos: var(--cream); --hl: var(--cream); --hl-ink: var(--iron); --icon: var(--cream); }
.poster--rust     { --bg: var(--rust);  --ink: var(--cream); --jos: var(--cream); --icon: var(--iron); }
.poster--iron     { --bg: var(--iron);  --ink: var(--cream); --jos: var(--aqua); --icon: var(--aqua); }
.poster--heat     { --bg: var(--heat);  --ink: var(--iron); --jos: var(--iron); --icon: var(--cream); }
.poster--iron::before { mix-blend-mode: screen; opacity: .1; }

/* Pozicije u hrpi */
.poster                { opacity: 0; transform: translate(0, 24px) rotate(0deg) scale(.94); pointer-events: none; }
.poster.pos-0,
.poster.is-top         { z-index: 3; opacity: 1; transform: rotate(var(--r, -1.5deg)); pointer-events: auto; }
.poster.pos-1          { z-index: 2; opacity: 1; transform: translate(4%, 2.5%) rotate(3.5deg) scale(.97); filter: brightness(.94); }
.poster.pos-2          { z-index: 1; opacity: 1; transform: translate(-4.5%, 4%) rotate(-5deg) scale(.94); filter: brightness(.88); }
.poster.is-out         { z-index: 4; opacity: 0; transform: translate(-75%, -6%) rotate(-16deg); transition-duration: .5s, .45s, .4s; }
.poster.is-in          { z-index: 4; opacity: 0; transform: translate(-75%, -6%) rotate(-16deg); transition: none; }

@media (min-width: 900px) {
  .posters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding-inline: max(var(--gutter), (100% - 1320px) / 2);
  }
}

/* ==========================================================================
   PORUKA / PRIJAVA
   ========================================================================== */

.message {
  position: relative;
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter) clamp(5rem, 11vw, 8.5rem);
  background: var(--iron);
}

.torn {
  position: absolute;
  left: 0;
  right: 0;
  top: -39px;
  width: 100%;
  height: 40px;
  fill: var(--iron);
}

.window {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin-inline: auto;
  background: var(--cream);
  color: var(--iron);
  border: 2px solid var(--iron);
  box-shadow: 0 0 0 2px var(--cream), 12px 12px 0 2px var(--aqua);
}

.window__bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .8rem;
  background: var(--iron);
  color: var(--cream);
}
.window__bar > .px { width: 18px; }
.window__title {
  flex: 1;
  font-family: var(--f-type);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: .04em;
}
.window__btns { display: flex; gap: 6px; }
.window__btns i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 18px;
  border: 1.5px solid var(--cream);
  font-family: var(--f-head);
  font-style: normal;
  font-size: .8rem;
  line-height: 1;
}

.window__body {
  padding: clamp(1.5rem, 4vw, 2.6rem);
}

.typed {
  min-height: 4.5em;
  font-size: clamp(1.1rem, 1rem + .6vw, 1.45rem);
  line-height: 1.45;
}
.typed__off { color: transparent; }
.caret {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin: 0 1px -.18em;
  background: var(--rust);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}
.signup__input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 48px;
  padding: 0 .9em;
  border: 2px solid var(--iron);
  border-radius: 0;
  background: rgba(255, 255, 255, .35);
  color: var(--iron);
  font-family: var(--f-type);
  font-size: 1.05rem;
  transition: background-color .15s;
}
.signup__input::placeholder { color: rgba(34, 42, 42, .5); }
.signup__input:focus { outline: 2px dashed var(--rust); outline-offset: 3px; background: rgba(255, 255, 255, .6); }
.signup__input[aria-invalid="true"] { border-color: var(--rust); }
.signup .btn { flex: 0 0 auto; }
@media (max-width: 520px) {
  .signup .btn { flex-basis: 100%; }
}

.signup__msg {
  min-height: 1.5em;
  margin-top: .9rem;
  font-size: .95rem;
}
.signup__msg.is-error { color: var(--rust); }
.signup__msg.is-ok::before { content: "✓ "; color: var(--aqua); }

.signup.is-done { display: none; }

.window__status {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .8rem;
  border-top: 2px solid var(--iron);
  font-size: .82rem;
  letter-spacing: .04em;
}
.status__icon {
  width: 13px;
  animation: flip 2.4s steps(1) infinite;
}
@keyframes flip { 50% { transform: rotate(180deg); } }
.status__right { margin-left: auto; white-space: nowrap; }

.dots::after {
  content: "";
  animation: dots 1.6s steps(1) infinite;
}
@keyframes dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
}

.stamp--message {
  left: clamp(-80px, -3vw, -10px);
  bottom: 12%;
  transform: rotate(8deg) scale(1.1);
  opacity: .85;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 2rem;
  padding: 1.6rem var(--gutter) 2rem;
  border-top: 1px solid rgba(226, 218, 194, .14);
  background: var(--iron);
  color: rgba(226, 218, 194, .75);
  font-size: .85rem;
}
.footer__logo {
  font-family: var(--f-type);
  font-size: 1.5rem;
  color: var(--cream);
}
.footer__logo span { color: var(--rust); }

/* ==========================================================================
   SISTEMSKA PORUKA (toast)
   ========================================================================== */

.toast {
  position: fixed;
  z-index: 70;
  top: calc(var(--gutter) + 52px);
  right: var(--gutter);
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  max-width: min(340px, calc(100vw - 2 * var(--gutter)));
  padding: 1rem 1.1rem;
  background: var(--cream);
  color: var(--iron);
  border: 2px solid var(--iron);
  box-shadow: 6px 6px 0 var(--rust);
  font-size: .95rem;
  line-height: 1.4;
  animation: pop .35s var(--ease-out) both;
}
.toast[hidden] { display: none; }
.toast .px { flex: 0 0 auto; width: 26px; color: var(--rust); margin-top: 2px; }
.toast strong { font-weight: 400; color: var(--rust); }

@keyframes pop {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Smanjeno kretanje
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
}
