/* ================================
   Can Lojistik — CRITICAL CSS
   Scope: Above-the-fold (Header + Hero)
   Notes: Keep this file lean (<10KB gz ideally)
=================================== */

/* 1) CSS Reset (mini) */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: transparent; border: 0; font: inherit; }

/* 2) Design Tokens */
:root{
  --brand-50:#eff6ff;
  --brand-100:#dbeafe;
  --brand-200:#bfdbfe;
  --brand-300:#93c5fd;
  --brand-400:#60a5fa;
  --brand-500:#3b82f6;
  --brand-600:#2563eb;
  --brand-700:#1d4ed8;
  --brand-800:#1e40af;
  --brand-900:#1e3a8a;

  --bg:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --border:#e2e8f0;
  --card:#ffffff;

  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 10px 20px rgba(0,0,0,.08);

  --container: 1200px;
}

html[data-theme="dark"]{
  --bg:#0b1220;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:#1f2937;
  --card:#0f172a;
}

/* 3) Base */
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: clamp(16px, 1.2vw, 18px);
  text-rendering: optimizeLegibility;
}
.container{
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* 4) Accessibility */
.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus{
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .5rem .75rem;
  border-radius: .5rem;
  background: var(--brand-700);
  color: #fff;
  z-index: 9999;
}

/* 5) Header */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-container{
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: .75rem 0;
}
.logo img{ height: 44px; width: auto; }

/* Navigation */
.main-nav{ display: contents; }
.nav-list{
  list-style: none;
  display: flex;
  gap: clamp(.25rem, 2vw, 1.25rem);
  padding: 0; margin: 0;
}
.nav-link{
  padding: .5rem .75rem;
  border-radius: .6rem;
  font-weight: 600;
  color: var(--muted);
  transition: transform .15s ease, color .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.nav-link:hover{ color: var(--text); background: var(--brand-50); }
.nav-link.active{ color: #fff; background: var(--brand-700); }

/* Header actions */
.header-actions{ display:flex; gap:.5rem; align-items:center; }
.theme-toggle{
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.theme-toggle:focus-visible{ outline: 2px solid var(--brand-500); outline-offset: 2px; }

/* Hamburger (mobile) */
.hamburger{ width: 44px; height: 40px; border-radius: 12px; display: none; place-content:center; gap:4px; border:1px solid var(--border); background: var(--card); }
.hamburger span{ display:block; width:22px; height:2px; background: var(--text); border-radius: 2px; transition: transform .2s ease; }

/* 6) Hero (Above the fold) */
.hero{
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: center;
  overflow: clip;
  background: linear-gradient(135deg, var(--brand-800) 0%, var(--brand-500) 100%);
}
.hero-overlay{
  position: absolute; inset: 0;
  background:
    radial-gradient(80rem 80rem at 10% 10%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(60rem 60rem at 90% 20%, rgba(255,255,255,.08), transparent 55%);
  pointer-events: none;
}
.hero-container{ position: relative; z-index: 1; }
.hero-content{ max-width: 680px; color: #fff; }
.hero-badge{
  display:inline-block;
  font-weight: 700;
  letter-spacing:.2px;
  padding:.4rem .7rem;
  border-radius: 999px;
  background: color-mix(in srgb, #fff 18%, var(--brand-700));
  border: 1px solid rgba(255,255,255,.25);
  margin-bottom: .9rem;
}
.hero-title{
  font-weight: 800;
  line-height: 1.1;
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  margin: 0 0 .4rem 0;
}
.hero-subtitle{
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  margin: 0 0 .5rem 0;
  color: rgba(255,255,255,.92);
}
.hero-description{ color: rgba(255,255,255,.88); margin: 0 0 1.2rem 0; }

.hero-actions{ display:flex; gap:.75rem; flex-wrap: wrap; }
.hero-cta,
.hero-cta-secondary{
  display:inline-flex; align-items:center; gap:.5rem;
  padding: .8rem 1.1rem;
  border-radius: .9rem;
  font-weight: 700;
  border:1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  will-change: transform;
}
.hero-cta{
  background:#fff; color: var(--brand-800);
  box-shadow: var(--shadow-md);
}
.hero-cta:hover{ transform: translateY(-1px); }
.hero-cta-secondary{
  background: transparent; color:#fff;
  border-color: rgba(255,255,255,.35);
}
.hero-cta-secondary:hover{ background: rgba(255,255,255,.1); }

.hero-scroll-indicator{
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  text-align: center;
  user-select: none;
}

/* 7) Mobile nav placeholder */
.mobile-nav{ display: none; }

/* 8) Reduced motion */
@media (prefers-reduced-motion: reduce){
  .hero-cta, .hero-cta-secondary, .nav-link{ transition: none; }
}

/* 9) Responsive */
@media (max-width: 1024px){
  .header-container{ grid-template-columns: 1fr auto; }
  .nav-list{ display: none; } /* hidden until hydrated by JS -> mobile menu */
  .hamburger{ display: grid; }
}