/* ===== Google Font ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS Custom Variables (Matched to BioQR Dark Security Theme) ===== */
:root {
  --bg-primary: #0a0f1c; /* Dark Slate Blue */
  --bg-gradient: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(120, 119, 198, 0.15), transparent),
                 radial-gradient(ellipse 80% 80% at 80% 30%, rgba(79, 70, 229, 0.05), transparent);
  --bg-card: #1a1f2e; /* Card BG */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #4f46e5; /* Indigo */
  --accent-secondary: #06b6d4; /* Cyan */
  --accent-success: #10b981; /* Emerald */
  --btn-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --border-color: #1e293b;
  --border-width: 2px;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s ease;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 15px 40px rgba(79, 70, 229, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== Layout Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0;
  background-color: rgba(10, 15, 28, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-width) solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

#logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.navbar-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition);
  transform-origin: left center;
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(2px, 0);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(2px, 0);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

.nav-link--primary {
  background: var(--btn-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.2);
}

.nav-link--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.4);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 80px;
}

.hero__content {
  background: rgba(26, 31, 46, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 50px 40px;
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border-color);
  box-shadow: var(--shadow-card);
  max-width: 800px;
  width: 100%;
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(79, 70, 229, 0.15);
  border: var(--border-width) solid rgba(79, 70, 229, 0.3);
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 30px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--btn-gradient);
  color: #ffffff;
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.2);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 45px rgba(79, 70, 229, 0.4);
}

.btn--outline {
  background-color: rgba(26, 31, 46, 0.5);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn--outline:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(79, 70, 229, 0.3);
}

/* ===== Notice Banner ===== */
.notice {
  padding: 40px 0;
}

.notice__card {
  background-color: rgba(30, 27, 75, 0.4); /* Dark Indigo Alert */
  border: var(--border-width) solid rgba(79, 70, 229, 0.3);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: var(--shadow-card);
}

.notice__text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.notice__text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Section Shared ===== */
.section {
  padding: 80px 0;
}

.section__header {
  text-align: center;
  margin-bottom: 50px;
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  background-color: rgba(6, 182, 212, 0.1);
  border: var(--border-width) solid rgba(6, 182, 212, 0.3);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== Screenshots Gallery ===== */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.screenshot-card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.screenshot-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-hover);
}

.screenshot-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-bottom: var(--border-width) solid var(--border-color);
}

.screenshot-card__body {
  padding: 24px;
}

.screenshot-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.screenshot-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== Features List ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.feature-item {
  padding: 24px;
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-secondary);
  background-color: rgba(26, 31, 46, 0.9);
}

.feature-item__text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.feature-item__text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Tech Stack ===== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.tech-card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.tech-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-success);
}

.tech-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tech-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Footer ===== */
.footer {
  padding: 60px 0 40px;
  border-top: var(--border-width) solid var(--border-color);
  background-color: rgba(10, 15, 28, 0.95);
  text-align: center;
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer a {
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: underline;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--accent-secondary);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer__links a:hover {
  text-decoration: underline;
  color: var(--text-primary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar .container {
    height: 60px;
  }

  .navbar-brand {
    gap: 10px;
    font-size: 1.25rem;
  }

  #logo-img {
    height: 30px;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 60px; /* Aligns with mobile container height */
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--bg-card);
    border-bottom: var(--border-width) solid var(--border-color);
    padding: 16px 24px;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }

  .navbar-links.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 0.95rem;
  }

  .nav-link--primary {
    margin-top: 4px;
  }

  .hero {
    padding: 120px 20px 60px;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .notice__card {
    padding: 20px;
  }

  .tech-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Documentation Grid & Flowcharts ===== */
.docs-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.docs-card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.docs-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.docs-card__sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.flowchart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.flow-step {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.flow-step:hover {
  border-color: var(--accent-primary);
}

.flow-step__icon {
  width: 36px;
  height: 36px;
  background: var(--btn-gradient);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 16px;
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.3);
}

.flow-step__label {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.flow-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-secondary);
  animation: pulseArrow 2s infinite ease-in-out;
}

@keyframes pulseArrow {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(5px); opacity: 1; }
}

@media (max-width: 768px) {
  .flowchart {
    flex-direction: column;
    gap: 15px;
  }
  
  .flow-arrow {
    transform: rotate(90deg);
    animation: pulseArrowVertical 2s infinite ease-in-out;
  }
}

@keyframes pulseArrowVertical {
  0%, 100% { transform: rotate(90deg) translateX(0); opacity: 0.6; }
  50% { transform: rotate(90deg) translateX(5px); opacity: 1; }
}

/* ===== Personalization Modal & Widget ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal.active {
  opacity: 1;
  pointer-events: auto;
}
.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(8px);
}
.modal__card {
  position: relative;
  background-color: #111827; /* Dark Grey */
  border: var(--border-width) solid rgba(79, 70, 229, 0.3);
  border-radius: var(--radius);
  padding: 40px 30px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 1001;
  text-align: center;
}
.modal.active .modal__card {
  transform: scale(1);
}
.modal__close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.modal__close:hover {
  color: var(--text-primary);
}
.modal__badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: rgba(79, 70, 229, 0.2);
  color: var(--accent-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  border: var(--border-width) solid rgba(79, 70, 229, 0.3);
  display: inline-block;
  margin-bottom: 15px;
}
.modal__header h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.modal__header p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 25px;
  line-height: 1.5;
}
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.modal__input {
  padding: 12px 16px;
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: var(--radius);
  background-color: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  text-align: center;
}
.modal__input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(79, 70, 229, 0.2);
}
.modal__btn {
  padding: 12px;
  background-color: var(--accent-primary);
  color: var(--text-primary);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
.modal__btn:hover {
  background-color: #4338ca;
  transform: translateY(-1px);
}

/* Floating Badge */
.visitor-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(10px);
  border: var(--border-width) solid rgba(79, 70, 229, 0.3);
  border-radius: 30px;
  padding: 8px 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 999;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.3s ease;
}
.visitor-badge__reset {
  background: none;
  border: none;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
  transition: color 0.2s;
}
.visitor-badge__reset:hover {
  color: var(--text-primary);
}
@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
