/* ===========================================================================
   styles.css — Zajednički stylesheet za sve stranice na app.mp-dizajn.com
   Dizajn-sistem: Svijetli profesionalni SaaS
   =========================================================================== */

/* === DESIGN TOKENS ====================================================== */
:root {
  /* Boje — primarna paleta */
  --bg:           #fafafa;
  --bg-elevated:  #ffffff;
  --bg-subtle:    #f4f4f5;
  --bg-muted:     #f9fafb;

  --text:         #18181b;
  --text-2:       #3f3f46;
  --text-3:       #71717a;
  --text-4:       #a1a1aa;

  --border:       #e4e4e7;
  --border-2:     #d4d4d8;
  --border-3:     #f4f4f5;

  /* Accent — duboka inteligentna plava */
  --accent:       #2563eb;
  --accent-h:     #1d4ed8;
  --accent-soft:  #eff6ff;
  --accent-bdr:   #bfdbfe;

  /* Status boje */
  --green:        #16a34a;
  --green-soft:   #f0fdf4;
  --green-bdr:    #bbf7d0;

  --amber:        #d97706;
  --amber-soft:   #fffbeb;
  --amber-bdr:    #fde68a;

  --red:          #dc2626;
  --red-soft:     #fef2f2;
  --red-bdr:      #fecaca;

  /* Tipografija */
  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Spacing skala (8pt) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;

  /* Shadow */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --sh-md: 0 4px 6px -1px rgba(15, 23, 42, .04), 0 10px 15px -3px rgba(15, 23, 42, .07);
  --sh-lg: 0 10px 15px -3px rgba(15, 23, 42, .05), 0 20px 25px -5px rgba(15, 23, 42, .08);
  --sh-xl: 0 25px 50px -12px rgba(15, 23, 42, .15);

  --maxw: 1180px;
  --maxw-text: 720px;
}

/* === RESET & BASE ======================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

/* Subtilna grain tekstura na pozadini za topliju atmosferu */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% -10%, rgba(37, 99, 235, .035), transparent 50%),
    radial-gradient(circle at 80% 110%, rgba(37, 99, 235, .025), transparent 45%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

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

/* === TIPOGRAFIJA ======================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
  letter-spacing: -.035em;
  font-weight: 450;
}

h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -.025em;
}

h3 {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 500;
}

p { color: var(--text-2); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 580px;
}

/* === LAYOUT ============================================================= */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-6);
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--s-6);
  position: relative;
  z-index: 1;
}

section { padding: var(--s-20) 0; }
section.tight { padding: var(--s-12) 0; }

/* === NAV ================================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-6);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--text);
}
.nav-brand-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--accent), #1e40af);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: -.03em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}
.nav-links a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); }

/* === HAMBURGER (mobile nav) ============================================ */
.nav-hamburger {
  display: none;                 /* skriven na desktopu */
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color .15s, background .15s;
}
.nav-hamburger:hover {
  border-color: var(--border-2);
  background: var(--bg-elevated);
}
.nav-hamburger .hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-hamburger.is-open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-open .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.is-open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop iza mobile menia */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  transition: opacity .2s ease;
}
.nav-backdrop.is-open {
  display: block;
  opacity: 1;
}

/* Mobile slide-in panel */
.nav-mobile {
  position: fixed;
  top: 0;
  right: 0;
  width: 84%;
  max-width: 360px;
  height: 100dvh;                /* full height na novim browserima */
  height: 100vh;                 /* fallback */
  background: var(--bg-elevated);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -10px 0 30px rgba(15, 23, 42, .12);
  visibility: hidden;
}
.nav-mobile.is-open {
  transform: translateX(0);
  visibility: visible;
}
.nav-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border);
  height: 64px;
}
.nav-close {
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  cursor: pointer;
  border-radius: var(--r-md);
  transition: background .15s, color .15s;
}
.nav-close:hover {
  background: var(--bg-subtle);
  color: var(--text);
}
.nav-mobile-links {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5);
}
.nav-mobile-links a {
  display: flex;
  align-items: center;
  padding: var(--s-4) var(--s-5);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-md);
  min-height: 48px;              /* touch-friendly */
  transition: background .15s, color .15s;
}
.nav-mobile-links a:not(.btn):hover {
  background: var(--bg-subtle);
  color: var(--accent);
}
.nav-mobile-cta {
  margin-top: var(--s-4);
  justify-content: center !important;
  font-size: 15px;
}

@media (max-width: 720px) {
  .nav-links { display: none !important; }   /* sakrij desktop linkove */
  .nav-hamburger { display: flex; }          /* prikaži hamburger */
}

/* === BUTTONS ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 11px 18px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--text);
  color: var(--bg-elevated);
  border-color: var(--text);
}
.btn-primary:hover {
  background: #000;
  color: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: var(--sh-md);
}
.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-h);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, .35);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-2);
}
.btn-lg {
  font-size: 15px;
  padding: 14px 22px;
  border-radius: var(--r-lg);
}

/* === CARDS ============================================================== */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  box-shadow: var(--sh-sm);
}

/* === FORMS ============================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--bg-elevated);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* === ALERTS ============================================================= */
.alert {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: 14px;
  line-height: 1.55;
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
}
.alert-info {
  background: var(--accent-soft);
  border-color: var(--accent-bdr);
  color: var(--accent-h);
}
.alert-success {
  background: var(--green-soft);
  border-color: var(--green-bdr);
  color: #166534;
}
.alert-warn {
  background: var(--amber-soft);
  border-color: var(--amber-bdr);
  color: #92400e;
}
.alert-error {
  background: var(--red-soft);
  border-color: var(--red-bdr);
  color: #991b1b;
}

/* === FOOTER ============================================================= */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: var(--s-12) 0 var(--s-8);
  margin-top: var(--s-20);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-12);
  margin-bottom: var(--s-8);
}
.footer-brand {
  flex: 1;
  min-width: 240px;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-3);
  margin-top: var(--s-3);
  max-width: 320px;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: var(--s-4);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--s-2); }
.footer-col a {
  font-size: 14px;
  color: var(--text-2);
}
.footer-col a:hover { color: var(--text); }
.footer-disclaimer {
  padding: var(--s-6) 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-3);
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.footer-disclaimer strong { color: var(--text-2); font-weight: 600; }
.footer-bottom {
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
  font-size: 13px;
  color: var(--text-3);
}

/* === ENTRY ANIMATION ==================================================== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up .6s cubic-bezier(.16, 1, .3, 1) backwards; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
.delay-4 { animation-delay: .32s; }
.delay-5 { animation-delay: .40s; }

/* === DEMO SEKCIJA NA LANDINGU ========================================= */
.demo-section {
  padding: var(--s-16) 0 var(--s-12);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-soft), transparent 60%),
    var(--bg);
  position: relative;
}
.demo-frame {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-xl);
  position: relative;
  box-sizing: border-box;
}
.demo-browser-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  overflow: hidden;
}
.demo-browser-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.demo-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 12px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demo-video {
  width: 100%;
  max-width: 100%;
  display: block;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-sizing: border-box;
}
@media (max-width: 720px) {
  .demo-section { padding: var(--s-12) 0 var(--s-10); }
  .demo-url { display: none; }
  .demo-frame { border-radius: var(--r-lg); }
  .demo-browser-bar { padding: var(--s-2) var(--s-3); }
}

/* === LEGAL PAGES (uvjeti, privatnost) ================================= */
.legal-page {
  padding: var(--s-12) var(--s-6) var(--s-20);
}
.legal-page h1 {
  margin: var(--s-3) 0 var(--s-2);
}
.legal-page .updated {
  color: var(--text-3);
  font-size: 14px;
  margin-bottom: var(--s-12);
}
.legal-section {
  margin-bottom: var(--s-10);
  padding: 0;
}
.legal-section h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-bottom: var(--s-4);
  color: var(--text);
}
.legal-section h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  margin-top: var(--s-5);
  margin-bottom: var(--s-2);
  color: var(--text);
}
.legal-section p,
.legal-section li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: var(--s-3);
}
.legal-section ul {
  padding-left: var(--s-6);
  margin: var(--s-2) 0 var(--s-4);
}
.legal-section li {
  margin-bottom: var(--s-2);
}
.legal-section strong {
  color: var(--text);
  font-weight: 600;
}
.legal-section code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--text);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-3) 0;
  font-size: 14.5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
}
.legal-table tr:last-child td {
  border-bottom: none;
}
.legal-table th {
  background: var(--bg-muted);
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  letter-spacing: .01em;
}
.legal-table td {
  color: var(--text-2);
}

/* === PAUSED / WAITLIST MODE (cijene.html) ============================== */
.paused-card {
  background: var(--bg-elevated);
  border: 1px solid var(--accent-bdr);
  border-radius: var(--r-2xl);
  padding: var(--s-10);
  box-shadow: var(--sh-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.paused-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--amber), #b45309);
}
.paused-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 999px;
  margin-bottom: var(--s-5);
}
.paused-badge .dot {
  width: 6px; height: 6px;
  background: var(--amber);
  border-radius: 50%;
  animation: paused-pulse 2s ease-in-out infinite;
}
@keyframes paused-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.paused-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.02em;
  margin-bottom: var(--s-3);
  color: var(--text);
}
.paused-text {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto var(--s-6);
}
.paused-existing-note {
  background: var(--green-soft);
  border: 1px solid var(--green-bdr);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: 13.5px;
  color: #166534;
  margin-bottom: var(--s-6);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 380px;
  margin: 0 auto;
}
.waitlist-form .input {
  text-align: center;
  font-size: 15px;
}
.waitlist-form .btn {
  justify-content: center;
  padding: 13px 22px;
  font-size: 15px;
}
.waitlist-success {
  background: var(--green-soft);
  border: 1px solid var(--green-bdr);
  border-radius: var(--r-md);
  padding: var(--s-5);
  text-align: center;
  color: #166534;
  font-size: 15px;
  line-height: 1.6;
}
.waitlist-success strong { display: block; margin-bottom: 4px; font-size: 17px; }
.waitlist-error {
  font-size: 13px;
  color: var(--red);
  text-align: center;
  margin-top: -4px;
}
.paused-faq {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}

/* === NAV SKELETON (placeholder dok status.php ne odgovori) ============== */
.nav-skeleton {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.skeleton-pill {
  display: inline-block;
  height: 14px;
  width: 60px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--bg-subtle) 0%,
    var(--border-3) 50%,
    var(--bg-subtle) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-pill:nth-child(2) { width: 50px; }
.skeleton-pill:nth-child(3) { width: 70px; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (max-width: 720px) {
  .nav-skeleton { display: none; }   /* na mobilu samo hamburger skeleton */
}
.nav-hamburger[disabled] {
  opacity: .4;
  cursor: default;
}

/* === NAV LOGOUT LINK ==================================================== */
.nav-logout {
  cursor: pointer;
}
.nav-logout:hover {
  color: var(--red) !important;
}
.nav-mobile-email {
  padding: var(--s-3) var(--s-5);
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-mobile-logout {
  color: var(--red) !important;
  font-weight: 500;
  border-top: 1px solid var(--border);
  margin-top: var(--s-3);
  padding-top: var(--s-5) !important;
}
.nav-mobile-logout:hover {
  background: var(--red-soft) !important;
  color: var(--red) !important;
}
