/* ==========================================================================
   TRACE — Ephemeral 24h Real-Time Social Network
   Design System & Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-black: #08090C;
  --bg-surface: #0E1117;
  --bg-card: #151820;
  --bg-card-hover: #1A1E28;
  --bg-glass: rgba(18, 22, 30, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 87, 34, 0.45);
  
  --accent-orange: #FF4500;
  --accent-blaze: #FF5722;
  --accent-glow: rgba(255, 87, 34, 0.35);
  --accent-cyan: #00E5FF;
  --accent-mint: #00E676;
  --accent-purple: #BF5AF2;

  --text-primary: #FFFFFF;
  --text-secondary: #9DA3AE;
  --text-muted: #626978;
  --text-dim: #454B57;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-card: 0 16px 40px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-glow: 0 0 35px rgba(255, 69, 0, 0.28);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark light;
}

body {
  background-color: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body, .site-nav, .feature-card, .trace-card, .pro-banner, .site-footer, .modal-card, .btn-secondary, .form-input, .cat-pill, .info-feature-item {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Background Ambient Radar Grid & Glow */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(255, 87, 34, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 85% 75%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(8, 9, 12, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.radar-beacon {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beacon-core {
  width: 10px;
  height: 10px;
  background-color: var(--accent-orange);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-orange);
  z-index: 2;
}

.beacon-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--accent-orange);
  opacity: 0;
  animation: radarWave 2.4s infinite cubic-bezier(0.1, 0.7, 0.1, 1);
}

.beacon-ring:nth-child(2) {
  animation-delay: 1.2s;
}

@keyframes radarWave {
  0% { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-blaze));
  color: white;
  box-shadow: 0 4px 18px rgba(255, 69, 0, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(255, 69, 0, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 80px 0 100px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
  min-height: calc(100vh - 72px);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.protocol-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid rgba(255, 87, 34, 0.3);
  border-radius: var(--radius-pill);
  width: fit-content;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-orange);
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-orange);
  box-shadow: 0 0 8px var(--accent-orange);
}

.hero-title {
  font-size: clamp(42px, 5.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-title span.glow {
  background: linear-gradient(135deg, #FFF 20%, #FFA270 60%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.hero-metrics {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   INTERACTIVE TRACE CARD (HERO MOCKUP)
   ========================================================================== */
.hero-visual {
  perspective: 1200px;
  display: flex;
  justify-content: center;
}

.trace-card-wrapper {
  transform: rotateY(-8deg) rotateX(6deg);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
  max-width: 420px;
}

.trace-card-wrapper:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

.trace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  position: relative;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}

.chip-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.chip-location .radar-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-orange);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-orange);
}

.chip-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-orange);
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.35);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
}

.card-image-box {
  width: 100%;
  height: 300px;
  position: relative;
  background: #101216;
  overflow: hidden;
}

.card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.trace-card:hover .card-image-box img {
  transform: scale(1.04);
}

.card-text-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(to top, rgba(14, 17, 23, 0.95) 10%, transparent 100%);
  font-size: 15px;
  font-weight: 500;
  color: white;
  line-height: 1.45;
}

.card-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-orange);
}

.author-name {
  font-size: 13px;
  font-weight: 600;
}

.pro-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
  margin-left: 6px;
}

.time-ago {
  font-size: 12px;
  color: var(--text-muted);
}

.card-actions-bar {
  padding: 12px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.reply-pill-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.reply-pill-input:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.like-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.like-btn:hover, .like-btn.liked {
  color: #FF3366;
  background: rgba(255, 51, 102, 0.15);
  border-color: rgba(255, 51, 102, 0.4);
}

/* ==========================================================================
   FEATURE GRID / CORE PILLARS
   ========================================================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.section-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-orange);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-size: clamp(32px, 3.8vw, 44px);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--bg-card);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 87, 34, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 24px;
}

.feature-card.pro .feature-icon-wrapper {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
}

.feature-card.radar .feature-icon-wrapper {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-mint);
}

.feature-title {
  font-size: 20px;
  margin-bottom: 12px;
}

.feature-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   PRO RADAR BANNER SECTION
   ========================================================================== */
.pro-banner {
  background: linear-gradient(135deg, rgba(21, 24, 32, 0.95), rgba(14, 17, 23, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.pro-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.pro-content h3 {
  font-size: 32px;
  margin-bottom: 16px;
}

.pro-content p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 480px;
}

.pro-theme-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
}

.theme-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.theme-dot.noir { background: #FFFFFF; }
.theme-dot.gold { background: #FFD700; }
.theme-dot.pink { background: #FF3366; }
.theme-dot.cyan { background: #00E5FF; }
.theme-dot.lava { background: #FF3D00; }

/* ==========================================================================
   FOOTER (STRICTLY CONFORMING TO USER SPEC & IMAGE)
   ========================================================================== */
.site-footer {
  margin-top: 80px;
  padding: 80px 0 60px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(8, 9, 12, 0.9);
  position: relative;
  z-index: 10;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

/* Left Aligned: Made by Cache Technologies, In New Jersey */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.footer-credit {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.footer-meta {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.2);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-mint);
  width: fit-content;
}

.pulse-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 6px var(--accent-mint);
}

/* Right Aligned: Columnar Link Architecture */
.footer-right {
  display: flex;
  gap: 60px;
  justify-content: flex-end;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

/* Links style: Clean underlined style from user reference image */
.footer-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
  font-family: inherit;
}

.footer-link:hover {
  color: var(--accent-orange);
  text-decoration-color: var(--accent-orange);
}

/* ==========================================================================
   MODAL: REPORT BUG & SUBMIT FEEDBACK
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #12141A;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 32px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.modal-header {
  margin-bottom: 24px;
}

.modal-title {
  font-size: 24px;
  margin-bottom: 6px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.category-pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.cat-pill {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-pill.active {
  background: rgba(255, 87, 34, 0.15);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.15);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.diagnostics-box {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.success-state {
  text-align: center;
  padding: 32px 16px;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.12);
  color: var(--accent-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}

.info-feature-item {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.trace-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 22, 30, 0.95);
  border: 1px solid rgba(255, 87, 34, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 87, 34, 0.2);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
  opacity: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}

.trace-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   PASSCODE ACCESS GATE
   ========================================================================== */
html.grid-locked body {
  overflow: hidden !important;
}

html.grid-locked .site-nav,
html.grid-locked main,
html.grid-locked .site-footer {
  filter: blur(28px);
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
  transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 9, 12, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gate-overlay.unlocked {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.gate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gate-card.shake {
  animation: gateShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes gateShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.gate-beacon {
  margin: 0 auto 20px;
  width: 52px;
  height: 52px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-beacon .beacon-core {
  width: 14px;
  height: 14px;
  background-color: var(--accent-orange);
  box-shadow: 0 0 16px var(--accent-orange);
}

.gate-brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.gate-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.35);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-orange);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.gate-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 28px;
}

.gate-input-group {
  position: relative;
  margin-bottom: 14px;
}

.gate-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 48px 14px 18px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.15em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text-primary);
  outline: none;
  transition: all 0.25s ease;
}

.gate-input:focus {
  border-color: var(--accent-orange);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.18), 0 0 20px rgba(255, 87, 34, 0.25);
}

.gate-input::placeholder {
  letter-spacing: 0.08em;
  font-size: 13px;
  color: var(--text-muted);
}

.gate-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.gate-eye-btn:hover {
  color: var(--text-primary);
}

.gate-submit-btn {
  width: 100%;
  height: 48px;
  font-size: 14px;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.gate-error {
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #FF453A;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gate-success-msg {
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--accent-mint);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gate-hint {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gate-hint code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    padding: 60px 0;
  }

  .hero-content {
    align-items: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-metrics {
    justify-content: center;
  }

  .pro-banner {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    text-align: center;
  }

  .pro-content p {
    margin: 0 auto 24px;
  }

  .pro-theme-chips {
    justify-content: center;
  }

  .footer-layout {
    flex-direction: column;
    gap: 48px;
  }

  .footer-right {
    justify-content: flex-start;
    width: 100%;
    gap: 48px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .footer-right {
    flex-direction: row;
    gap: 40px;
  }

  .modal-card {
    padding: 24px 18px;
  }

  .category-pill-group {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SYSTEM THEME ADAPTATION: LIGHT MODE
   (@media prefers-color-scheme: light)
   Follows operating system light appearance automatically with 0 manual buttons.
   ========================================================================== */
@media (prefers-color-scheme: light) {
  :root {
    --bg-black: #F8FAFD;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F1F5F9;
    --bg-glass: rgba(248, 250, 253, 0.85);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-card: rgba(15, 23, 42, 0.12);
    --border-active: rgba(255, 87, 34, 0.65);
    
    --accent-orange: #FF4500;
    --accent-blaze: #FF5722;
    --accent-glow: rgba(255, 87, 34, 0.18);
    --accent-cyan: #0097A7;
    --accent-mint: #00873D;
    --accent-purple: #7B1FA2;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-dim: #94A3B8;

    --shadow-card: 0 16px 40px -12px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 8px 30px rgba(255, 69, 0, 0.12);
  }

  html {
    color-scheme: light;
  }

  body {
    background-color: var(--bg-black);
    color: var(--text-primary);
  }

  /* Ambient light grid & subtle radiant beacons */
  body::before {
    background-image: 
      radial-gradient(circle at 50% 12%, rgba(255, 87, 34, 0.08) 0%, transparent 60%),
      radial-gradient(circle at 85% 75%, rgba(0, 151, 167, 0.04) 0%, transparent 50%),
      linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  }

  /* Sticky Navigation */
  .site-nav {
    background: rgba(248, 250, 253, 0.82);
    border-bottom: 1px solid var(--border-subtle);
  }

  /* Action Buttons */
  .btn-secondary {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-primary);
    border-color: var(--border-card);
  }

  .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.22);
  }

  /* Hero Title Glow: Deep crisp slate with fiery blaze highlight */
  .hero-title span.glow {
    background: linear-gradient(135deg, #0F172A 15%, #E64A19 60%, #FF4500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero-metrics {
    border-top-color: var(--border-subtle);
  }

  /* 3D Hero Trace Card */
  .trace-card {
    background: #FFFFFF;
    border-color: var(--border-card);
    box-shadow: var(--shadow-card), var(--shadow-glow);
  }

  .card-header {
    background: #FFFFFF;
  }

  .chip-location {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-primary);
  }

  .chip-timer {
    color: var(--accent-blaze);
    background: rgba(255, 87, 34, 0.08);
    border-color: rgba(255, 87, 34, 0.3);
  }

  .card-image-box {
    background: #E2E8F0;
  }

  .card-text-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 15%, transparent 100%);
    color: #FFFFFF;
  }

  .card-author-bar {
    background: #F8FAFD;
    border-top-color: var(--border-subtle);
  }

  .author-name {
    color: var(--text-primary);
  }

  .pro-badge {
    background: rgba(0, 151, 167, 0.12);
    color: var(--accent-cyan);
    border-color: rgba(0, 151, 167, 0.3);
  }

  .reply-pill-input {
    background: rgba(15, 23, 42, 0.04);
    border-color: var(--border-subtle);
    color: var(--text-muted);
  }

  .reply-pill-input:hover {
    background: rgba(15, 23, 42, 0.07);
    border-color: rgba(15, 23, 42, 0.18);
  }

  .like-btn {
    background: rgba(15, 23, 42, 0.04);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
  }

  .like-btn:hover, .like-btn.liked {
    color: #E11D48;
    background: rgba(225, 29, 72, 0.08);
    border-color: rgba(225, 29, 72, 0.3);
  }

  /* Feature Pillars */
  .feature-card {
    background: #FFFFFF;
    border-color: var(--border-subtle);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  }

  .feature-card:hover {
    background: #FFFFFF;
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 14px 32px -8px rgba(15, 23, 42, 0.1);
  }

  .feature-icon-wrapper {
    background: rgba(255, 87, 34, 0.08);
  }

  .feature-card.pro .feature-icon-wrapper {
    background: rgba(0, 151, 167, 0.1);
  }

  .feature-card.radar .feature-icon-wrapper {
    background: rgba(0, 135, 61, 0.1);
  }

  /* Hardware Pro Banner */
  .pro-banner {
    background: linear-gradient(135deg, #FFFFFF, #F8FAFD);
    border-color: var(--border-card);
    box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.05);
  }

  .pro-banner::after {
    background: radial-gradient(circle, rgba(0, 151, 167, 0.08) 0%, transparent 70%);
  }

  .theme-chip {
    background: rgba(15, 23, 42, 0.04);
    border-color: var(--border-subtle);
    color: var(--text-primary);
  }

  .theme-dot.noir {
    background: #0F172A;
  }

  /* Site Footer (Reference Image Layout in Light Mode) */
  .site-footer {
    background: #EEF2F7;
    border-top-color: var(--border-subtle);
  }

  .footer-link {
    color: var(--text-primary);
    text-decoration-color: rgba(15, 23, 42, 0.35);
  }

  .footer-link:hover {
    color: var(--accent-orange);
    text-decoration-color: var(--accent-orange);
  }

  .footer-status-pill {
    background: rgba(0, 135, 61, 0.08);
    border-color: rgba(0, 135, 61, 0.22);
    color: var(--accent-mint);
  }

  /* Modals */
  .modal-overlay {
    background: rgba(15, 23, 42, 0.55);
  }

  .modal-card {
    background: #FFFFFF;
    border-color: var(--border-card);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06);
  }

  .modal-close-btn {
    background: rgba(15, 23, 42, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
  }

  .modal-close-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    color: var(--text-primary);
  }

  .cat-pill {
    background: rgba(15, 23, 42, 0.03);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
  }

  .cat-pill:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-primary);
  }

  .cat-pill.active {
    background: rgba(255, 87, 34, 0.12);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
  }

  .form-input, .form-textarea, .form-select {
    background: #F8FAFD;
    border-color: rgba(15, 23, 42, 0.14);
    color: #0F172A;
  }

  .form-input::placeholder, .form-textarea::placeholder {
    color: #94A3B8;
  }

  .form-input:focus, .form-textarea:focus, .form-select:focus {
    background: #FFFFFF;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.16);
  }

  .form-select option {
    background: #FFFFFF;
    color: #0F172A;
  }

  .diagnostics-box {
    background: #F8FAFD;
    border-color: var(--border-subtle);
    color: var(--text-secondary);
  }

  .info-feature-item {
    background: #F8FAFD;
    border-color: var(--border-subtle);
  }

  .trace-toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 87, 34, 0.35);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 0 20px rgba(255, 87, 34, 0.12);
    color: #0F172A;
  }

  .gate-overlay {
    background: rgba(246, 248, 251, 0.94);
  }

  .gate-card {
    background: #FFFFFF;
    border-color: var(--border-card);
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
  }

  .gate-input {
    background: #F8FAFD;
    border-color: rgba(15, 23, 42, 0.14);
    color: #0F172A;
  }

  .gate-input:focus {
    background: #FFFFFF;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.16);
  }

  .gate-hint code {
    background: rgba(15, 23, 42, 0.05);
    color: #0F172A;
    border-color: var(--border-subtle);
  }
}
