/* ═══════════════════════════════════════════════════════════
   QUANTECH — Global Stylesheet
   Design tokens, shared components, header, footer
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0A1628;
  color: #F0F6FF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
  --bg-primary: #0A1628;
  --bg-secondary: #0D1B2A;
  --surface: #1A2332;
  --surface-hover: #243447;
  --accent: #00C2FF;
  --accent-hover: #00E5FF;
  --accent-bg: rgba(0,194,255,0.08);
  --text-primary: #F0F6FF;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  --green: #10D690;
  --amber: #F59E0B;
  --red: #FF4D6A;
  --border-subtle: rgba(255,255,255,0.08);
  --border-medium: rgba(255,255,255,0.12);
  --border-accent: rgba(0,194,255,0.20);
}

/* ═══════════════════════════════════════════
   TYPOGRAPHY HELPERS
   ═══════════════════════════════════════════ */
.mono { font-family: 'IBM Plex Mono', 'SF Mono', monospace; }

.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   REVEAL ANIMATION
   ═══════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 500ms cubic-bezier(0.16,1,0.3,1),
              transform 500ms cubic-bezier(0.16,1,0.3,1);
}
.revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn-primary {
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  color: #000D1A; background: var(--accent);
  padding: 14px 28px; border-radius: 6px;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: all 200ms cubic-bezier(0.16,1,0.3,1);
  border: none; cursor: pointer;
}
.btn-primary:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,194,255,0.30);
}

.btn-secondary {
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--text-primary); background: transparent;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 14px 28px; border-radius: 6px;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: all 200ms cubic-bezier(0.16,1,0.3,1); cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.22);
}

.ghost-btn {
  border: 1px solid rgba(0,194,255,0.30); color: var(--accent);
  background: transparent; padding: 10px 20px; border-radius: 6px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center;
  transition: background 200ms ease;
}
.ghost-btn:hover { background: rgba(0,194,255,0.08); }

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */
.badge-accent {
  display: inline-block; font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  background: rgba(0,194,255,0.08); border: 1px solid rgba(0,194,255,0.20);
  color: var(--accent); border-radius: 9999px; padding: 2px 8px;
}
.badge-neutral {
  display: inline-block; font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary); border-radius: 9999px; padding: 2px 8px;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.header {
  position: sticky; top: 0; z-index: 50;
  width: 100%; height: 60px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 200ms ease;
}
.header.scrolled {
  background: rgba(10,22,40,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}

/* Logo */
.header-logo {
  display: flex; align-items: center; text-decoration: none;
}
.header-logo img {
  height: 40px; width: auto; display: block;
}

/* Navigation */
.header-nav {
  display: flex; align-items: center; gap: 32px; height: 100%;
}
.header-nav a {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: color 150ms ease;
  display: flex; align-items: center; height: 100%;
  position: relative; padding-bottom: 0;
}
.header-nav a:hover { color: var(--text-primary); }
.header-nav a.active {
  color: var(--text-primary);
}
.header-nav a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--accent);
}

/* Actions */
.header-actions { display: flex; align-items: center; gap: 16px; }

/* Language dropdown */
.lang-dropdown-wrap { position: relative; }
.lang-dropdown-trigger {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.06); transition: all 150ms ease; user-select: none;
}
.lang-dropdown-trigger:hover { border-color: rgba(255,255,255,0.20); }
.lang-dropdown-trigger .lang-flag { display: none; }
.lang-dropdown-trigger .lang-code {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 600;
  color: var(--text-primary); letter-spacing: 0.04em;
}
.lang-dropdown-trigger .lang-chevron {
  transition: transform 200ms ease; display: flex; align-items: center;
}
.lang-dropdown-wrap.open .lang-dropdown-trigger .lang-chevron { transform: rotate(180deg); }
.lang-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: #1A2332; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  z-index: 100; min-width: 150px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.lang-dropdown-wrap.open .lang-dropdown-menu { display: block; }
.lang-dropdown-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; transition: background 100ms ease;
  font-size: 13px; color: #94A3B8;
}
.lang-dropdown-option:hover { background: rgba(0,194,255,0.08); color: #F0F6FF; }
.lang-dropdown-option.active { color: #00C2FF; background: rgba(0,194,255,0.06); }
.lang-dropdown-option .lang-flag { }
.lang-flag img { width: 20px; height: 14px; border-radius: 2px; vertical-align: middle; }

/* Login & CTA */
.header-login {
  font-size: 13px; color: var(--text-tertiary);
  text-decoration: none; transition: color 150ms ease;
}
.header-login:hover { color: var(--text-secondary); }
.header-cta {
  font-size: 13px; font-weight: 600; color: #000D1A;
  background: var(--accent); padding: 8px 16px; border-radius: 6px;
  text-decoration: none; display: inline-flex; align-items: center;
  transition: all 200ms cubic-bezier(0.16,1,0.3,1);
}
.header-cta:hover {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,194,255,0.30);
}
.header-login {
  font-size: 13px; font-weight: 500; color: #94A3B8;
  padding: 8px 4px; border-radius: 0;
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  transition: color 200ms ease; background: none;
  border: none;
}
.header-login:hover {
  background: none; color: #F0F6FF; transform: none;
}
.mobile-login {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; padding: 8px 16px; margin-bottom: 8px;
  font-size: 13px; font-weight: 600; color: #94A3B8;
  background: rgba(255,255,255,0.06); border: none;
  border-radius: 6px; text-decoration: none;
}

/* Hamburger */
.header-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 4px; flex-direction: column; justify-content: center;
  align-items: center; gap: 4px;
}
.header-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-secondary); border-radius: 1px;
}

/* Mobile menu */
.header-mobile-menu {
  display: none; background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.header-mobile-menu .mobile-lang-row {
  padding: 12px 24px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-mobile-menu a {
  display: flex; align-items: center; height: 48px; padding-left: 24px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 150ms ease;
}
.header-mobile-menu a:hover { color: var(--text-primary); }
.header-mobile-menu a.active { color: var(--text-primary); }
.header-mobile-menu .mobile-cta-wrap { padding: 16px; }
.header-mobile-menu .mobile-cta {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: #000D1A;
  background: var(--accent); border-radius: 6px;
  text-decoration: none; border-bottom: none;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  width: 100%; background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}
.footer-main {
  max-width: 1200px; margin: 0 auto; padding: 64px 24px 48px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand-logo {
  display: inline-block; text-decoration: none;
}
.footer-brand-logo img {
  height: 32px; width: auto;
}
.footer-brand-tagline {
  font-size: 13px; color: #94A3B8; line-height: 1.6;
  margin-top: 12px; max-width: 220px;
}
.footer-column { }
.footer-col-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: none; padding: 0;
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 20px; cursor: default;
}
.footer-col-header .chevron {
  width: 14px; height: 14px; display: none; transition: transform 200ms ease;
}
.footer-col-body { overflow: hidden; }
.footer-col-body a {
  display: block; font-size: 13px; color: var(--text-secondary);
  text-decoration: none; line-height: 2.0; transition: color 150ms ease;
}
.footer-col-body a:hover { color: var(--text-primary); }
.footer-location {
  font-size: 13px; color: var(--text-secondary); line-height: 1.8; display: block;
}
.footer-email {
  font-size: 13px; color: var(--accent); text-decoration: none;
  display: block; margin-top: 4px; transition: all 150ms ease;
}
.footer-email:hover { color: var(--accent-hover); text-decoration: underline; }
.footer-cta-block { margin-top: 20px; }
.footer-cta-label { font-size: 12px; color: var(--text-tertiary); display: block; }
.footer-cta-link {
  font-size: 13px; font-weight: 600; color: var(--accent) !important;
  text-decoration: none; display: inline-flex; align-items: center;
  gap: 2px; margin-top: 4px; transition: color 150ms ease;
}
.footer-cta-link:hover { color: var(--accent-hover) !important; font-weight: 700; }
.footer-cta-link .arrow { display: inline-block; transition: transform 150ms ease; }
.footer-cta-link:hover .arrow { transform: translateX(3px); }

.footer-bottom-border { border-top: 1px solid rgba(255,255,255,0.06); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding: 20px 24px;
}
.footer-bottom span { font-size: 12px; color: var(--text-tertiary); }

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.cap-card {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 28px; position: relative; overflow: hidden;
  transition: border-color 300ms ease;
}
.cap-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
  transition: transform 300ms ease;
}
.cap-card:hover { border-color: var(--border-accent); }
.cap-card:hover::before { transform: scaleX(1); }
.cap-card-special {
  border-color: var(--border-accent);
}
.cap-card-special::before { transform: scaleX(1); }

/* Product cards (home) */
.product-card {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 32px; position: relative; overflow: hidden;
  transition: border-color 300ms ease-out, transform 300ms ease-out, box-shadow 300ms ease-out;
}
.product-card:hover {
  border-color: rgba(0,194,255,0.25); transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.product-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); transform-origin: left; transform: scaleX(0);
  transition: transform 300ms ease-out;
}
.product-card:hover .product-accent { transform: scaleX(1); }

/* ═══════════════════════════════════════════
   FORM FIELDS (shared)
   ═══════════════════════════════════════════ */
.form-label {
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); display: block; margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 10px 14px; font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--text-primary);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10); border-radius: 6px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  outline: none;
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,194,255,0.10);
}
.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(255,77,106,0.10);
}
.form-select {
  width: 100%; padding: 10px 14px; font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--text-primary);
  background: rgba(255,255,255,0.04);
  background-color: #0F1D2F;
  border: 1px solid rgba(255,255,255,0.10); border-radius: 6px;
  transition: border-color 150ms ease; outline: none;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-select option {
  background: #0F1D2F; color: #F0F6FF;
}
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,194,255,0.10);
}
.form-textarea {
  width: 100%; padding: 10px 14px; font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--text-primary);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10); border-radius: 6px;
  transition: border-color 150ms ease; outline: none; resize: vertical;
}
.form-textarea::placeholder { color: var(--text-tertiary); }
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,194,255,0.10);
}
.form-error {
  font-size: 12px; color: var(--red); margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }
.form-submit {
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  color: #000D1A; background: var(--accent);
  padding: 13px 28px; border-radius: 6px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 200ms cubic-bezier(0.16,1,0.3,1); width: 100%;
}
.form-submit:hover:not(:disabled) {
  background: var(--accent-hover); transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,194,255,0.30);
}
.form-submit:disabled {
  opacity: 0.4; cursor: not-allowed; transform: none;
}
.form-submit .spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(0,13,26,0.3); border-top-color: #000D1A;
  border-radius: 50%; animation: spin 1s linear infinite;
  vertical-align: middle; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Custom checkboxes */
.check-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 6px 0; user-select: none;
}
.check-box {
  width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  transition: all 150ms ease;
}
.check-box svg { opacity: 0; transition: opacity 100ms ease; }
.check-row.checked .check-box {
  background: var(--accent); border-color: var(--accent);
}
.check-row.checked .check-box svg { opacity: 1; }
.check-label {
  font-size: 14px; color: var(--text-secondary); transition: color 150ms ease;
}
.check-row.checked .check-label { color: var(--text-primary); }

/* ═══════════════════════════════════════════
   CONFIRMATION PAGES
   ═══════════════════════════════════════════ */
@keyframes check-in {
  0%   { opacity: 0; transform: scale(0.6); }
  60%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1.0); }
}
@keyframes fade-up {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.conf-check  { animation: check-in 500ms cubic-bezier(0.16,1,0.3,1) forwards; }
.conf-headline { opacity: 0; animation: fade-up 400ms cubic-bezier(0.16,1,0.3,1) 200ms forwards; }
.conf-sub     { opacity: 0; animation: fade-up 400ms cubic-bezier(0.16,1,0.3,1) 350ms forwards; }
.conf-callout { opacity: 0; animation: fade-up 400ms cubic-bezier(0.16,1,0.3,1) 400ms forwards; }
.conf-actions { opacity: 0; animation: fade-up 400ms cubic-bezier(0.16,1,0.3,1) 500ms forwards; }

.conf-card {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 18px 20px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: border-color 200ms ease; text-decoration: none;
}
.conf-card:hover { border-color: var(--border-accent); }
.conf-card-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px;
  background: rgba(0,194,255,0.10);
  display: flex; align-items: center; justify-content: center;
}
.conf-card-link {
  font-size: 13px; font-weight: 600; color: var(--accent);
  margin-top: 8px; display: block; text-decoration: none;
  transition: color 150ms ease;
}
.conf-card-link:hover { color: var(--accent-hover); }

/* ═══════════════════════════════════════════
   BOUNCE ANIMATION
   ═══════════════════════════════════════════ */
@keyframes bounce-kf {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
.bounce-icon { animation: bounce-kf 2s ease-in-out infinite; }

/* ═══════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════ */
.max-w-1200 { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.max-w-800 { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* ── Tablet ── */
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-main { padding: 48px 24px 40px; }
}

@media (min-width: 768px) {
  .header-hamburger { display: none !important; }
  .header-mobile-menu { display: none !important; }
  .footer-col-body { max-height: none !important; }
}

/* ── Mobile ── */
@media (max-width: 767px) {
  .header-nav { display: none !important; }
  .header-actions { display: none !important; }
  .header-hamburger { display: flex !important; }
  .header-mobile-menu.open { display: block !important; }

  /* Buttons */
  .btn-primary, .btn-secondary { font-size: 14px; padding: 12px 24px; }
  .ghost-btn { font-size: 12px; padding: 9px 16px; }

  /* Cards */
  .cap-card { padding: 22px; border-radius: 10px; }
  .product-card { padding: 24px; border-radius: 10px; }

  /* Forms */
  .form-input, .form-select, .form-textarea { font-size: 16px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr !important; gap: 0 !important;
  }
  .footer-grid > div:first-child {
    margin-bottom: 32px; padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .footer-column {
    border-bottom: 1px solid rgba(255,255,255,0.06); padding: 16px 0;
  }
  .footer-col-header {
    cursor: pointer !important; margin-bottom: 0 !important;
  }
  .footer-col-header .chevron { display: block !important; }
  .footer-col-body {
    max-height: 0; transition: max-height 250ms ease, padding 250ms ease;
    padding-top: 0;
  }
  .footer-col-body.open { max-height: 300px; padding-top: 12px; }
  .footer-main { padding: 40px 20px 32px; }
  .footer-bottom { text-align: center; padding: 16px 20px; }

  /* Utility */
  .max-w-1200, .max-w-800 { padding: 0 20px; }

  /* Confirmation pages */
  .conf-card { padding: 14px 16px; gap: 12px; }
}
