/* HWY Platform — Mobile-First Design System */

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

:root {
  --gold: #f0a500;
  --gold-dark: #c98900;
  --bg: #0a0c10;
  --surface: #12151c;
  --surface2: #1a1e28;
  --surface3: #202435;
  --border: #222636;
  --border2: #2e3347;
  --text: #e0e3ee;
  --muted: #7a8098;
  --muted2: #555a70;
  --blue: #5b8ff0;
  --blue-dark: #3a6dd4;
  --green: #3dba5e;
  --green-dark: #2d9649;
  --red: #e05c5c;
  --appbar-h: 56px;
  --sidebar-w: 260px;
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--appbar-h);
}

/* ─── APPBAR (mobile) ─── */
.hwy-appbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--appbar-h);
  background: rgba(10,12,16,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.hwy-appbar .menu-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: background 0.2s;
}
.hwy-appbar .menu-btn:hover { background: var(--surface2); }
.hwy-appbar .menu-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hwy-appbar .logo {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: -0.5px;
  flex: 1;
}
.hwy-appbar .logo span { color: var(--text); font-weight: 600; }
.hwy-appbar .appbar-actions { display: flex; gap: 8px; align-items: center; }
.hwy-appbar .appbar-actions a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s;
}
.hwy-appbar .appbar-actions a:hover { color: var(--text); }
.hwy-appbar .appbar-actions .btn-primary {
  background: var(--gold);
  color: #080600;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.hwy-appbar .appbar-actions .btn-primary:hover { background: var(--gold-dark); color: #080600; }

/* ─── DRAWER OVERLAY ─── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

/* ─── SIDE DRAWER (mobile) ─── */
.hwy-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 400;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.hwy-drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-logo {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  text-decoration: none;
}
.drawer-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
}

.drawer-section {
  padding: 12px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted2);
}
.drawer-nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.drawer-nav a:hover, .drawer-nav a.active { background: var(--surface2); }
.drawer-nav a .nav-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.drawer-nav a .nav-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-gold { background: var(--gold); }
.dot-green { background: var(--green); }
.dot-blue { background: var(--blue); }

.drawer-footer {
  margin-top: auto;
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.drawer-footer a {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.drawer-footer .btn-signin {
  color: var(--muted);
  border: 1px solid var(--border);
}
.drawer-footer .btn-signup {
  background: var(--gold);
  color: #080600;
}

/* ─── DESKTOP NAV (hidden on mobile) ─── */
.desktop-nav { display: none; }

/* ─── LAYOUT ─── */
.page-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}
.page-hero {
  padding: 40px 16px 48px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(28px, 6vw, 54px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}
.page-hero p {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.accent-gold { color: var(--gold); }
.accent-green { color: var(--green); }
.accent-blue { color: var(--blue); }

/* ─── SECTION ─── */
.section { padding: 32px 16px; }
.section-title { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.section-sub { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ─── CARDS ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border2); }

/* ─── CAROUSEL ─── */
.carousel-wrap { position: relative; overflow: hidden; }
.carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: calc(100vw - 48px);
  max-width: 320px;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.carousel-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border2);
  transition: background 0.2s, width 0.2s;
}
.carousel-dots span.active {
  background: var(--gold);
  width: 18px;
  border-radius: 3px;
}

/* ─── GRID ─── */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ─── TAGS / BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}
.badge-gold { background: rgba(240,165,0,.12); color: var(--gold); }
.badge-green { background: rgba(61,186,94,.12); color: var(--green); }
.badge-blue { background: rgba(91,143,240,.12); color: var(--blue); }
.badge-live { background: rgba(61,186,94,.12); color: var(--green); }
.badge-live::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-gold { background: var(--gold); color: #080600; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { font-size: 12px; padding: 7px 14px; }
.btn-full { width: 100%; }
.btn-icon { padding: 10px; border-radius: 8px; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input::placeholder { color: var(--muted2); }
select { appearance: none; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }

/* ─── DIVIDER ─── */
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ─── CHIPS / FILTERS ─── */
.chip-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-bottom: 16px; }
.chip-bar::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.chip:hover, .chip.active {
  background: rgba(240,165,0,.12);
  border-color: rgba(240,165,0,.3);
  color: var(--gold);
}

/* ─── SEARCH BAR ─── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  padding: 0;
}
.search-bar input:focus { outline: none; }
.search-bar svg { color: var(--muted); flex-shrink: 0; }

/* ─── BOTTOM TAB BAR (mobile only) ─── */
.bottom-tab {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(18,21,28,0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 150;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-tab a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 0 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s;
}
.bottom-tab a.active { color: var(--gold); }
.bottom-tab a span { font-size: 22px; line-height: 1; }

/* ─── FOOTER ─── */
.hwy-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 16px 80px; /* extra bottom for mobile tab bar */
}
.footer-logo { font-size: 20px; font-weight: 900; color: var(--gold); margin-bottom: 8px; }
.footer-tagline { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted2); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--muted2); padding-top: 20px; border-top: 1px solid var(--border); }

/* ─── RESPONSIVE: TABLET → DESKTOP ─── */
@media (min-width: 768px) {
  .carousel-track > * { width: 320px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  :root { --appbar-h: 0px; }
  body { padding-top: 0; }

  /* Hide mobile elements */
  .hwy-appbar { display: none; }
  .hwy-drawer { display: none; }
  .drawer-overlay { display: none; }
  .bottom-tab { display: none; }

  /* Show desktop nav */
  .desktop-nav {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(10,12,16,0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    height: 64px;
    align-items: center;
    padding: 0 32px;
    gap: 0;
  }
  .desktop-nav .nav-logo {
    font-size: 20px;
    font-weight: 900;
    color: var(--gold);
    text-decoration: none;
    margin-right: 40px;
    letter-spacing: -0.5px;
  }
  .desktop-nav .nav-links {
    display: flex;
    flex: 1;
    gap: 0;
  }
  .desktop-nav .nav-links > a,
  .desktop-nav .nav-links > .dropdown {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 0 14px;
    height: 64px;
    transition: color 0.2s;
    position: relative;
    cursor: pointer;
  }
  .desktop-nav .nav-links > a:hover,
  .desktop-nav .nav-links > .dropdown:hover { color: var(--text); }
  .desktop-nav .nav-links > a.active,
  .desktop-nav .nav-links > .dropdown.active { color: var(--text); }

  /* Dropdown */
  .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 200px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  }
  .dropdown:hover .dropdown-menu { display: flex; flex-direction: column; gap: 2px; }
  .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
    height: auto;
    transition: background 0.15s;
  }
  .dropdown-menu a:hover { background: var(--surface2); }

  .desktop-nav .nav-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }
  .desktop-nav .nav-right a {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 7px;
    transition: color 0.2s;
  }
  .desktop-nav .nav-right a:hover { color: var(--text); }
  .desktop-nav .nav-right .btn-cta {
    background: var(--gold);
    color: #080600;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
  }
  .desktop-nav .nav-right .btn-cta:hover { background: var(--gold-dark); color: #080600; }

  .page-container { padding: 0 32px; }
  .section { padding: 48px 32px; }
  .page-hero { padding: 64px 32px 72px; }
  .hwy-footer { padding: 64px 32px; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
