/* Enhanced modern variables using FL design system */
:root {
  --bg: var(--fl-bg-primary);
  --card: var(--fl-bg-secondary); 
  --text: var(--fl-text-primary); 
  --muted: var(--fl-text-secondary);
  --primary: var(--fl-primary); 
  --primary-600: var(--fl-primary-hover); 
  --accent: var(--fl-accent);
  --border: var(--fl-border-primary); 
  --shadow: var(--fl-shadow-lg);
  --ring: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--fl-font-sans); 
  color: var(--text); 
  background: linear-gradient(135deg, var(--bg) 0%, color-mix(in oklab, var(--bg) 90%, var(--accent) 10%) 100%);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* NAV */
.navbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in oklab, var(--card) 78%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  color: white;
  font-size: 13px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spacer { flex: 1; }

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .2s ease;
  font-size: 14px;
  white-space: nowrap;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  min-width: 40px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff;
  border-color: transparent;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn.outline { background: var(--card); }

.icon {
  width: 18px;
  height: 18px;
  fill: var(--text);
}

/* user-info */
.user-info { position: relative; }

.user-info-name {
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background .2s ease;
  border: 1px solid transparent;
}

.user-info-name:hover {
  background: var(--card);
  border-color: var(--border);
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 10px;
  min-width: 180px;
  display: none;
  z-index: 100;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .2s ease, transform .2s ease;
}

.user-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.user-dropdown .btn { width: 100%; }

/* hero */
.hero {
  padding-top: 84px;
  padding-bottom: 36px;
  background:
    radial-gradient(600px 220px at 10% 0%, color-mix(in oklab, var(--accent) 24%, transparent), transparent 60%),
    radial-gradient(800px 260px at 100% 0%, color-mix(in oklab, var(--primary) 20%, transparent), transparent 60%);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
}

.kicker {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}

.title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  margin: 8px 0 10px;
  line-height: 1.06;
}

.subtitle {
  color: var(--muted);
  font-size: clamp(14px, 2.2vw, 16px);
}

.cta {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media {
  aspect-ratio: 16/10;
  background: #0f172a;
  position: relative;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badges {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  background: color-mix(in oklab, var(--card) 85%, transparent);
}

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 88%, var(--accent) 5%);
  color: var(--muted);
  white-space: nowrap;
}

/* cards */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform .12s ease, box-shadow .12s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.1);
}

.card-content { flex-grow: 1; }

.thumb {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
  margin-bottom: 12px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

footer {
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
}

/* dropdowns & modal */
.dropdown {
  position: absolute;
  right: 0;
  top: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 10px;
  min-width: 240px;
  display: none;
  z-index: 100;
}

.dropdown.show { display: block; }

.email-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
}

.copy {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px dashed var(--border);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.48);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}

.modal-backdrop.show { display: flex; }

.modal {
  width: min(680px, 94vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
}

.tab {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab.active {
  background: color-mix(in oklab, var(--card) 82%, var(--primary) 12%);
  color: var(--text);
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
}

.modal-body { padding: 16px; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.input {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.note {
  color: var(--muted);
  font-size: 14px;
  background: color-mix(in oklab, var(--card) 80%, var(--primary) 6%);
  border: 1px dashed var(--border);
  padding: 12px;
  border-radius: 10px;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 8px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 70;
  max-width: 90vw;
  text-align: center;
}

.toast.show { display: block; }

/* Language select responsive */
.lang-select {
  margin-right: 6px;
  position: relative;
}

.lang-select select {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 24px 8px 12px;
  border-radius: 8px;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6,9 12,15 18,9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  min-width: 80px;
}

/* Responsive breakpoints */
@media(max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-card { order: -1; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media(max-width: 768px) {
  .brand-name { display: none; }
  .nav-inner { padding: 8px 12px; }
  .hero { padding-top: 76px; }
  .hero-inner {
    padding: 24px 12px;
    gap: 20px;
  }
  .title { font-size: clamp(24px, 6vw, 32px); }
  .section { padding: 24px 12px; }
  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .modal {
    margin: 10px;
    width: calc(100vw - 20px);
  }
  .modal-body { padding: 12px; }
  .actions { flex-direction: column; }
  .actions .btn { width: 100%; }
}

@media(max-width: 520px) {
  .icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .controls { gap: 6px; }
  .cta { flex-direction: column; }
  .cta .btn { width: 100%; }
  .hero-badges { gap: 6px; }
  .badge {
    font-size: 11px;
    padding: 4px 8px;
  }
  .contact-wrap { position: static; }
  .dropdown {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 10px;
    min-width: auto;
  }
  .lang-select select {
    min-width: 60px;
    padding-right: 20px;
    font-size: 13px;
  }
}

@media(max-width: 400px) {
  .nav-inner { gap: 8px; }
  .brand-badge {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .hero-inner { padding: 20px 8px; }
  .section { padding: 20px 8px; }
  .modal-body { padding: 8px; }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn, .icon-btn, .tab, .copy {
    min-height: 44px;
    min-width: 44px;
  }
  .input { min-height: 44px; }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-media img, .thumb img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* --- Hamburger Menu & Sidebar Styles --- */
.hamburger-menu {
  display: none; 
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; 
  margin-left: 12px;
}

.hamburger-menu span {
  width: 100%;
  height: 3px;
  background-color: var(--text);
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 260px;
  background: var(--card);
  border-right: 1px solid var(--border);
  z-index: 1000;
  padding: 80px 20px 20px;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar.open {
  transform: translateX(0);
  box-shadow: var(--shadow);
}

.sidebar .sidebar-link {
  display: block;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s;
  background-color: transparent;
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.sidebar .sidebar-link:hover {
  background-color: color-mix(in oklab, var(--card) 90%, var(--primary) 10%);
}

.sidebar .sidebar-socials {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar .sidebar-socials a {
  color: var(--muted);
  text-decoration: none;
}

.sidebar .sidebar-socials a:hover { color: var(--primary); }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* --- Responsive adjustments for menu --- */
@media (max-width: 960px) { 
  .controls { display: none; }
  .hamburger-menu { display: flex; }
  .brand-name { display: none; }
}
