/* ==========================================================================
   mojpredmet.com - public landing site
   Brand: Navy #1A2B4A · Gold #C9A961 · Cream #F5F1E8 · Inter
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts - self-hosted Inter (variable, weights 400–700 per file)
   unicode-range values mirror Google Fonts so each page downloads only
   the subsets its script actually uses.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  --navy-900: #0D1423;
  --navy-800: #141D33;
  --navy-700: #1A2B4A;
  --navy-600: #1F3558;
  --navy-500: #2A4570;
  --navy-100: #C4D2E7;
  --navy-50: #E8EEF7;

  --gold-700: #A88B4F;
  --gold-600: #C9A961;
  --gold-500: #D4B976;
  --gold-300: #E8D9A0;
  --gold-100: #F7F1DA;
  --gold-50: #FBF8ED;

  --cream-500: #F5F1E8;
  --cream-400: #F7F4EC;
  --cream-200: #FBF9F4;
  --cream-100: #FDFCF9;

  --charcoal-700: #2C2C2C;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;

  --radius-btn: 6px;
  --radius-card: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.1);

  --transition: 150ms ease-out;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container: 1120px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--charcoal-700);
  background: linear-gradient(135deg, var(--cream-500) 0%, var(--cream-400) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--navy-600);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
  padding-left: calc(var(--space-3) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--space-3) + env(safe-area-inset-right, 0px));
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  z-index: 100;
  padding: 12px 20px;
  background: var(--navy-700);
  color: var(--cream-500);
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1 {
  font-size: 3rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--navy-700);
}

h3 {
  font-size: 1.5rem;
  line-height: 1.33;
  font-weight: 600;
  color: var(--navy-700);
}

.overline {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-700);
  margin-bottom: var(--space-2);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--gray-600);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 44px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--navy-700);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-600);
  box-shadow: var(--shadow-sm);
}

.btn-primary:active {
  background: var(--navy-800);
}

.btn-gold {
  background: var(--gold-600);
  color: var(--navy-900);
  font-weight: 600;
}

.btn-gold:hover {
  background: var(--gold-500);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--navy-600);
  border: 1px solid var(--navy-100);
}

.btn-ghost:hover {
  border-color: var(--navy-500);
  background: rgba(26, 43, 74, 0.04);
}

.btn-lg {
  min-height: 48px;
  padding: 14px 32px;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid rgba(26, 43, 74, 0.08);
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 72px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}

.wordmark {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--navy-700);
  text-decoration: none;
  line-height: 1;
}

.wordmark .tld {
  color: var(--gold-600);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Script toggle (Latinica | Ћирилица) */
.lang-toggle {
  display: inline-flex;
  gap: 4px;
  background: #fff;
  border-radius: var(--radius-btn);
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.lang-toggle a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

.lang-toggle a:hover {
  color: var(--navy-700);
  background: var(--cream-200);
}

.lang-toggle a[aria-current='page'] {
  background: var(--navy-700);
  color: var(--cream-500);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-12) 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 120%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(26, 43, 74, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: var(--space-8);
}

.hero h1 {
  color: var(--charcoal-700);
  max-width: 18ch;
  margin-bottom: var(--space-3);
}

.hero h1 em {
  font-style: normal;
  color: var(--navy-700);
  box-shadow: inset 0 -0.18em 0 0 var(--gold-300);
}

.hero .lead {
  max-width: 56ch;
  margin-bottom: var(--space-5);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  width: min(360px, 80%);
  filter: drop-shadow(0 24px 40px rgba(26, 43, 74, 0.18));
}

/* Staggered entrance */
.fade-in {
  animation: fadeIn 0.8s ease-out both;
}

.fade-in.d1 { animation-delay: 0.1s; }
.fade-in.d2 { animation-delay: 0.25s; }
.fade-in.d3 { animation-delay: 0.4s; }
.fade-in.d4 { animation-delay: 0.55s; }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Sections (shared)
   -------------------------------------------------------------------------- */
.section {
  padding: var(--space-10) 0;
}

.section-head {
  max-width: 64ch;
  margin-bottom: var(--space-6);
}

.section-head p {
  margin-top: var(--space-2);
  color: var(--gray-600);
  font-size: 1.0625rem;
}

.gold-rule {
  display: block;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold-600);
  margin-bottom: var(--space-2);
}

/* --------------------------------------------------------------------------
   Features grid
   -------------------------------------------------------------------------- */
.features {
  background: var(--cream-100);
  border-top: 1px solid rgba(26, 43, 74, 0.06);
  border-bottom: 1px solid rgba(26, 43, 74, 0.06);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-300);
  box-shadow: var(--shadow-md);
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-card);
  background: var(--navy-50);
  color: var(--navy-700);
  margin-bottom: var(--space-2);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-1);
}

.card p {
  color: var(--gray-600);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Two-sided section (Za advokate / Za klijente)
   -------------------------------------------------------------------------- */
.sides-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.side-panel {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--gold-600);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.side-panel h3 {
  margin-bottom: var(--space-3);
}

.check-list {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--gray-600);
}

.check-list svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--gold-700);
}

/* --------------------------------------------------------------------------
   Trust band (navy)
   -------------------------------------------------------------------------- */
.trust {
  position: relative;
  overflow: hidden;
  background: var(--navy-700);
  color: var(--cream-500);
  padding: var(--space-10) 0;
}

.trust::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -20%;
  width: 140%;
  height: 220%;
  background: radial-gradient(circle at center, rgba(201, 169, 97, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.trust .container {
  position: relative;
}

.trust h2 {
  color: var(--cream-500);
  margin-bottom: var(--space-6);
  max-width: 24ch;
}

.trust .gold-rule {
  background: var(--gold-500);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.trust-item svg {
  color: var(--gold-500);
  margin-bottom: var(--space-2);
}

.trust-item h3 {
  color: var(--cream-500);
  font-size: 1.0625rem;
  margin-bottom: 6px;
}

.trust-item p {
  color: var(--navy-100);
  font-size: 0.9375rem;
}

.trust-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid rgba(245, 241, 232, 0.15);
  padding-top: var(--space-6);
}

.trust-cta p {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream-500);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--navy-100);
  padding: var(--space-6) 0;
  padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.footer-brand .wordmark {
  color: var(--cream-500);
  font-size: 1.25rem;
}

.footer-brand p {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9375rem;
}

.footer-links a {
  color: var(--navy-100);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--gold-500);
}

.footer-links a[aria-current='page'] {
  color: var(--gold-500);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   404 page
   -------------------------------------------------------------------------- */
.error-page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3);
  position: relative;
  overflow: hidden;
}

.error-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(26, 43, 74, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.error-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  animation: fadeIn 0.8s ease-out both;
}

.error-code {
  font-size: clamp(5rem, 18vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--navy-700);
  letter-spacing: -0.03em;
}

.error-code .zero {
  color: var(--gold-600);
}

.error-page .lead {
  font-size: 1.125rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Focus visibility
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold-600);
  outline-offset: 2px;
}

.trust :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--cream-500);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero {
    padding: var(--space-8) 0;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .hero-art {
    order: -1;
  }

  .hero-art img {
    width: min(220px, 60%);
  }

  .section {
    padding: var(--space-8) 0;
  }

  .feature-grid,
  .sides-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .site-header .container {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* Larger touch targets on touch devices */
@media (hover: none) {
  .lang-toggle a {
    padding: 10px 16px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover {
    transform: none;
  }
}
