/* Landing — LunaMatch (kosmička tema, povjerenje & sigurnost) */

:root {
  --lp-bg: #05040a;
  --lp-bg-mid: #0c0a14;
  --lp-fg: #f4f0e8;
  --lp-muted: rgba(200, 190, 175, 0.78);
  --lp-muted-2: rgba(244, 240, 232, 0.45);
  --lp-accent: #d8c28c;
  --lp-accent-warm: #e8d5a0;
  --lp-line: rgba(216, 194, 140, 0.2);
  --lp-glass: rgba(16, 12, 28, 0.72);
  --lp-font-sans: "DM Sans", system-ui, sans-serif;
  --lp-font-serif: "Instrument Serif", Georgia, serif;
  --lp-pad: clamp(1.375rem, 5vw + 0.5rem, 2rem);
  --lp-content-max: 22.5rem; /* ~360px — udobna širina teksta i CTA na mobitelu */
  --lp-max: 1120px;
  --lp-radius: 16px;
  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .lp-stars span,
  .lp-hero__glow,
  .lp-fade-in,
  .lp-pwa-install__card {
    animation: none !important;
    transition: none !important;
  }
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: hidden;
}

body.lp {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: var(--lp-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--lp-fg);
  background: var(--lp-bg);
  background-image:
    radial-gradient(ellipse 100% 70% at 50% -15%, #1e1838 0%, transparent 52%),
    linear-gradient(175deg, #0e0c18 0%, var(--lp-bg) 50%, #06040c 100%);
  -webkit-font-smoothing: antialiased;
}

.lp-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.lp-stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  animation: lp-twinkle 4s var(--lp-ease) infinite;
}

.lp-stars span:nth-child(3n) {
  background: rgba(216, 194, 140, 0.7);
  animation-duration: 5.5s;
}

.lp-stars span:nth-child(5n) {
  width: 3px;
  height: 3px;
  opacity: 0.35;
}

@keyframes lp-twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.15);
  }
}

.lp-wrap {
  position: relative;
  z-index: 1;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding-left: max(var(--lp-pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--lp-pad), env(safe-area-inset-right, 0px));
}

/* Header */
.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 0 1rem;
  min-height: 3.5rem;
}

.lp-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--lp-fg);
}

.lp-logo__mark {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  object-fit: contain;
}

.lp-logo__text {
  font-family: var(--lp-font-serif);
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lp-header__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-inline-end: 0.25rem;
}

.lp-lang select {
  min-height: 40px;
  padding: 0 2rem 0 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--lp-line);
  background: rgba(16, 12, 28, 0.65);
  color: var(--lp-fg);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d8c28c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

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

.lp-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

button.lp-btn {
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background 0.2s var(--lp-ease),
    border-color 0.2s var(--lp-ease),
    color 0.2s var(--lp-ease),
    transform 0.15s var(--lp-ease);
}

.lp-btn:active {
  transform: scale(0.97);
}

.lp-btn--ghost {
  color: var(--lp-fg);
  border-color: var(--lp-line);
  background: transparent;
}

.lp-btn--ghost:hover {
  border-color: rgba(216, 194, 140, 0.45);
  background: rgba(216, 194, 140, 0.06);
}

.lp-btn--primary {
  color: #141018;
  background: linear-gradient(165deg, var(--lp-accent-warm) 0%, var(--lp-accent) 100%);
  box-shadow: 0 4px 24px rgba(216, 194, 140, 0.22);
}

.lp-btn--primary:hover {
  filter: brightness(1.06);
}

.lp-btn--lg {
  min-height: 46px;
  padding: 0 1.3rem;
  font-size: 0.9375rem;
}

/* Hero */
.lp-hero {
  position: relative;
  padding: clamp(2rem, 8vw, 5rem) 0 clamp(2.5rem, 10vw, 5.5rem);
  text-align: center;
  /* Sprječava overflow od eyebrow badge na uskim ekranima */
  overflow: hidden;
}

.lp-hero__glow {
  position: absolute;
  top: 10%;
  left: 50%;
  width: min(520px, 90vw);
  height: min(520px, 70vw);
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(216, 194, 140, 0.12) 0%, transparent 68%);
  pointer-events: none;
  animation: lp-glow-pulse 8s ease-in-out infinite;
}

@keyframes lp-glow-pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.lp-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 auto 1.25rem;
  padding: 0.35rem 0.85rem;
  font-size: clamp(0.7rem, 2.5vw, 0.8125rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--lp-accent);
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: rgba(16, 12, 28, 0.5);
  max-width: min(100%, var(--lp-content-max));
  text-align: center;
  flex-wrap: wrap;
  justify-content: center;
}

.lp-hero__eyebrow svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.lp-hero h1 {
  position: relative;
  margin: 0 auto 1.1rem;
  max-width: min(14ch, 100%);
  font-family: var(--lp-font-serif);
  font-size: clamp(2.5rem, 7.5vw, 4.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lp-hero__lead {
  position: relative;
  margin: 0 auto 2rem;
  max-width: min(36rem, var(--lp-content-max));
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--lp-muted);
}

.lp-hero__cta {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
  width: 100%;
  max-width: var(--lp-content-max);
  margin: 0 auto 2.5rem;
}

@media (min-width: 480px) {
  .lp-hero__cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }

  .lp-hero__cta .lp-btn {
    flex: 0 0 auto;
    width: auto;
  }
}

.lp-hero__trust {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--lp-muted-2);
}

@media (min-width: 480px) {
  .lp-hero__trust {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
    justify-content: center;
  }
}

.lp-hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.lp-hero__trust svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--lp-accent);
  flex-shrink: 0;
}

/* Features */
.lp-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.lp-section__title {
  margin: 0 0 0.5rem;
  font-family: var(--lp-font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 400;
  text-align: center;
}

.lp-section__sub {
  margin: 0 auto 2.5rem;
  max-width: min(32rem, var(--lp-content-max));
  text-align: center;
  color: var(--lp-muted);
}

.lp-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .lp-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lp-card {
  padding: 1.5rem 1.35rem;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-line);
  background: var(--lp-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s var(--lp-ease), box-shadow 0.25s var(--lp-ease);
}

.lp-card:hover {
  border-color: rgba(216, 194, 140, 0.38);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.lp-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  color: var(--lp-accent);
  background: rgba(216, 194, 140, 0.1);
}

.lp-card__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.lp-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.lp-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--lp-muted);
}

/* Trust band */
.lp-trust {
  /* Ne koristimo negativni margin koji pravi overflow na mobilnom,
     umjesto toga koristimo full-width padding direktno na sekciji */
  padding: clamp(2.5rem, 6vw, 3.5rem) var(--lp-pad);
  background: linear-gradient(180deg, transparent 0%, rgba(12, 10, 20, 0.85) 30%, rgba(12, 10, 20, 0.95) 100%);
  border-top: 1px solid var(--lp-line);
  border-bottom: 1px solid var(--lp-line);
}

.lp-trust__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .lp-trust__inner {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.lp-trust__copy h2 {
  margin: 0 0 0.75rem;
  font-family: var(--lp-font-serif);
  font-size: clamp(1.65rem, 3.5vw, 2rem);
  font-weight: 400;
}

.lp-trust__copy p {
  margin: 0 0 1rem;
  color: var(--lp-muted);
}

.lp-trust__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lp-trust__list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9375rem;
}

.lp-trust__list svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  color: var(--lp-accent);
  flex-shrink: 0;
}

.lp-trust__panel {
  padding: 1.5rem;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-line);
  background: rgba(8, 6, 18, 0.6);
}

.lp-trust__panel blockquote {
  margin: 0;
  font-family: var(--lp-font-serif);
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--lp-fg);
}

.lp-trust__panel cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--lp-font-sans);
  font-size: 0.8125rem;
  font-style: normal;
  color: var(--lp-muted-2);
}

/* Final CTA */
.lp-cta {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.lp-cta h2 {
  margin: 0 0 0.75rem;
  font-family: var(--lp-font-serif);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 400;
}

.lp-cta p {
  margin: 0 auto 1.75rem;
  max-width: min(28rem, var(--lp-content-max));
  color: var(--lp-muted);
}

.lp-cta .lp-btn--lg {
  margin-inline: auto;
  max-width: var(--lp-content-max);
}

/* Footer */
.lp-footer {
  padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--lp-line);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--lp-muted-2);
}

.lp-footer a {
  color: var(--lp-muted);
  text-decoration: none;
}

.lp-footer a:hover {
  color: var(--lp-accent);
}

/* PWA install banner */
.lp-pwa-install {
  position: fixed;
  z-index: 100;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 max(var(--lp-pad), env(safe-area-inset-left, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px))
    max(var(--lp-pad), env(safe-area-inset-right, 0px));
  pointer-events: none;
}

.lp-pwa-install:not([hidden]) {
  pointer-events: auto;
}

.lp-pwa-install__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(var(--lp-max), calc(100vw - 2 * var(--lp-pad)));
  margin: 0 auto;
  padding: 1rem 1rem 1.1rem;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-line);
  background: rgba(12, 10, 20, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(216, 194, 140, 0.08);
  animation: lp-pwa-in 0.45s var(--lp-ease) both;
}

.lp-pwa-install__row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.lp-pwa-install__icon {
  flex-shrink: 0;
}

.lp-pwa-install__icon img {
  display: block;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
}

.lp-pwa-install__title {
  margin: 0;
  font-family: var(--lp-font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.2;
}

.lp-pwa-install__body {
  min-width: 0;
}

.lp-pwa-install__text {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--lp-muted);
  line-height: 1.45;
}

.lp-pwa-install__ios {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--lp-muted);
  line-height: 1.45;
}

.lp-pwa-install__ios strong {
  color: var(--lp-fg);
  font-weight: 600;
}

.lp-pwa-install__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lp-pwa-install__actions .lp-btn {
  flex: 1 1 auto;
  min-width: 7rem;
}

@keyframes lp-pwa-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 479px) {
  .lp-pwa-install__actions {
    flex-direction: column;
  }

  .lp-pwa-install__actions .lp-btn {
    width: 100%;
    min-width: 0;
  }
}

.lp-fade-in {
  animation: lp-fade-up 0.7s var(--lp-ease) both;
}

.lp-fade-in--2 {
  animation-delay: 0.1s;
}

.lp-fade-in--3 {
  animation-delay: 0.2s;
}

@keyframes lp-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ——— Mobile-specific overrides (< 480px) ——— */
@media (max-width: 479px) {
  :root {
    --lp-pad: 1.5rem;
    --lp-content-max: 18.5rem; /* ~296px — margine unutar paddinga, nije preusko */
  }

  .lp-lang select {
    min-height: 36px;
    padding-right: 1.75rem;
    font-size: 0.75rem;
  }

  /* Header: sakrij "Prijava" ghost dugme, ostavi samo "Registracija" */
  .lp-nav .lp-btn--ghost {
    display: none;
  }

  .lp-header .lp-nav {
    margin-inline-end: 0.5rem;
  }

  /* Logo: smanjiti mark malo */
  .lp-logo__mark {
    width: 2.15rem;
    height: 2.15rem;
  }

  /* CTA: širina bloka, ne cijeli viewport */
  .lp-hero__cta .lp-btn--lg {
    width: 100%;
    min-height: 44px;
  }

  .lp-cta .lp-btn--lg {
    width: 100%;
    display: flex;
  }

  /* Trust list malo tješnji */
  .lp-trust__list {
    gap: 0.7rem;
  }

  /* Smanji padding kartica */
  .lp-card {
    padding: 1.25rem 1.1rem;
  }

  /* Blockquote manja margina */
  .lp-trust__panel {
    padding: 1.25rem;
  }
}

/* Srednji breakpoint: 480px–640px */
@media (min-width: 480px) and (max-width: 639px) {
  .lp-hero__cta .lp-btn--lg {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 0;
  }
}
