/* prvi.dodir — coming soon */

:root {
  --ugalj:  #0B0B0B;
  --papir:  #F3F2ED;
  --grafit: #6E6D68;
  --linija: #DCDAD2;
  --grafit-svetli: #8F8E88; /* sivi tekst na crnoj kartici */

  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 5vw, 64px);

  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

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

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

body {
  margin: 0;
  background: var(--papir);
  color: var(--ugalj);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

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

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Zajedničko ---------- */

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--grafit);
}

.wordmark {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}
.wordmark__muted { color: var(--grafit); }

/* ---------- Header ---------- */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo__icon { width: 34px; height: 34px; }

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

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
  padding: clamp(16px, 3vw, 40px) 0 clamp(64px, 9vw, 128px);
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__title {
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.95;
}
.hero__title span { display: block; }

/* Maska za otkrivanje reda; padding čuva donje kuke slova (j, g). */
.hero__title .line {
  overflow: hidden;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}

.hero__lead {
  max-width: 30ch;
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 300;
  line-height: 1.45;
  color: var(--grafit);
}

/* ---------- Prijava ---------- */

.signup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin-top: 12px;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signup__input {
  flex: 1 1 220px;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 1px solid var(--linija);
  border-radius: 999px;
  background: #fff;
  color: var(--ugalj);
  font: inherit;
  font-size: 16px;
  transition: border-color .2s;
}
.signup__input::placeholder { color: #9A9993; }
.signup__input:focus { outline: none; border-color: var(--grafit); }
.signup__input[aria-invalid="true"] { border-color: var(--ugalj); }

.btn {
  height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--ugalj);
  color: var(--papir);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: progress; }

.signup__error { font-size: 14px; }
.signup__note  { font-size: 14px; color: var(--grafit); }

.thanks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 480px;
  margin-top: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--linija);
  border-bottom: 1px solid var(--linija);
}
.thanks__title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.thanks__note { font-size: 15px; color: var(--grafit); }

[hidden] { display: none !important; }

/* ---------- Kartica ---------- */

.hero__visual {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 85.6 / 54;          /* CR80 */
  padding: clamp(22px, 3vw, 36px);
  border-radius: calc(3.18 / 85.6 * 100%) / calc(3.18 / 54 * 100%);   /* CR80: 3,18 mm */
  background: var(--ugalj);
  color: var(--papir);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 30px 60px -30px rgba(11, 11, 11, .45);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .4s ease-out;
  will-change: transform;
}

.card__icon { width: 44px; height: 44px; }

.card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.wordmark--card { font-size: clamp(24px, 3vw, 34px); }
.wordmark--card .wordmark__muted { color: var(--grafit-svetli); }
.label--card { font-size: 11px; color: var(--grafit-svetli); }

/* Odsjaj koji jednom pređe preko kartice kad se pojavi. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .13) 50%, transparent 60%)
              100% 0 / 250% 100% no-repeat;
  pointer-events: none;
}

.arc--1 { --d: 1.05s; }
.arc--2 { --d: 1.35s; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}

/* ---------- Kako radi ---------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--linija);
}

.steps__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  column-gap: 40px;
}

.step {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 22px 0;
}
/* Linija iznad koraka (crta se sleva kad se korak pojavi). */
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--linija);
  transform-origin: left;
}
.step__num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grafit);
}
.step__text {
  font-size: 22px;
  letter-spacing: -0.02em;
}

/* ---------- Papir vs kontakti ---------- */

.contrast {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid var(--linija);
}
.contrast__old,
.contrast__new {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.contrast__old { color: var(--grafit); opacity: .6; }
/* Precrtavanje je pozadina, da bi moglo da se iscrta animacijom. */
.contrast__old del {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 58% / 100% 3px no-repeat;
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0 36px;
  border-top: 1px solid var(--linija);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--grafit);
}
.footer a { padding: 12px 0; transition: color .2s; }
.footer a:hover { color: var(--ugalj); }

/* ---------- Uvodna animacija ---------- */

@keyframes fade-up   { from { opacity: 0; transform: translateY(20px); } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-14px); } }
@keyframes line-up   { from { transform: translateY(120%); } }
@keyframes pop       { from { opacity: 0; transform: scale(0); } }

@keyframes draw {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
  15%  { opacity: 1; }
  to   { stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 1; }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(56px) rotateX(22deg) rotateY(-16deg) scale(.94); }
  to   { opacity: 1; transform: translateY(0) rotateX(0deg) rotateY(0deg) scale(1); }
}

@keyframes sheen { to { background-position: 0 0; } }

/* Header */
.logo            { animation: fade-down 1s var(--ease-out) .1s backwards; }
.header > .label { animation: fade-down 1s var(--ease-out) .25s backwards; }

.logo__icon circle,
.card__icon circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop .8s var(--ease-out) var(--d, .2s) backwards;
}
.logo__icon path        { animation: draw 1s var(--ease-out) var(--d, .35s) backwards; }
.logo__icon path + path { --d: .5s; }

/* Tekst u hero sekciji */
.hero__text > .label { animation: fade-up 1s var(--ease-out) .2s backwards; }
.hero__title .line__inner { animation: line-up 1.2s var(--ease-out) .3s backwards; }
.hero__title .line + .line .line__inner { animation-delay: .42s; }
.hero__lead { animation: fade-up 1s var(--ease-out) .65s backwards; }
.signup     { animation: fade-up 1s var(--ease-out) .8s backwards; }
.thanks     { animation: fade-up .8s var(--ease-out) backwards; }

/* Kartica: izroni i ispravi se, zatim se nacrtaju talasi i pređe odsjaj */
.card               { animation: card-in 1.6s var(--ease-out) .45s backwards; }
.card__icon circle  { --d: .95s; }
.card__icon .arc {
  animation:
    draw 1s var(--ease-out) var(--d) backwards,
    pulse 2.4s ease-in-out calc(var(--d) + 1.2s) infinite;
}
.card__bottom { animation: fade-up 1s var(--ease-out) 1.15s backwards; }
.card::after  { animation: sheen 1.4s var(--ease-in-out) 1.7s backwards; }

/* Dok se fontovi ne učitaju, sve animacije stoje na početku. */
.js:not(.is-ready) *,
.js:not(.is-ready) *::before,
.js:not(.is-ready) *::after {
  animation-play-state: paused !important;
}

/* ---------- Pojavljivanje pri skrolovanju ---------- */

.reveal {
  transition:
    opacity 1s var(--ease-out) var(--delay, 0s),
    transform 1s var(--ease-out) var(--delay, 0s);
}
.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(28px);
}

.step::before { transition: transform 1.4s var(--ease-out) var(--delay, 0s); }
.js .step:not(.is-visible)::before { transform: scaleX(0); }

.contrast__old del { transition: background-size 1s var(--ease-in-out) .45s; }
.js .contrast__old:not(.is-visible) del { background-size: 0% 3px; }

/* ---------- Pristupačnost ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .card { transform: none; }
}
