/* Self-hosted (SIL OFL) so the page makes no third-party request and leaks no visitor IP to Google. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Outfit.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/JetBrainsMono.woff2') format('woff2');
}

:root {
  --bg-base: #0a0a0a;
  --bg-surface: #171717;
  --bg-surface-elevated: rgba(38, 38, 38, 0.7);
  
  --text-primary: #f8fafc;
  --text-secondary: #a1a1aa;
  --text-accent: #fbbf24; /* Gold */
  
  --primary: #d97706; /* Darker Gold for buttons */
  --primary-glow: rgba(251, 191, 36, 0.4); /* Gold glow */
  --success: #fcd34d; /* Light Gold */
  --success-glow: rgba(252, 211, 77, 0.3);
  --accent: #e2e8f0; /* Platinum */
  
  --border-light: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(251, 191, 36, 0.3);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(251, 191, 36, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(226, 232, 240, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.1) 0px, transparent 50%);
  background-size: 200% 200%;
  animation: gradientBG 15s ease infinite;
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow-x: hidden;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.2);
  border-radius: 10px;
  border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.5);
}

header {
  padding: 1.5rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 9, 19, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo-container img {
  height: 44px;
  filter: drop-shadow(0px 0px 10px var(--primary-glow));
}

.logo-container h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(to right, #fbbf24, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-container {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
}

.hero-text {
  text-align: center;
  margin-bottom: 4rem;
}

.hero-text h2 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  line-height: 1.1;
  background: linear-gradient(to right, #ffffff, #fcd34d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: 1.35rem;
  color: var(--text-secondary);
  max-width: 750px;
  margin: 0 auto;
  font-weight: 300;
}

/* Feature Cards */
.info-card {
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.info-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 191, 36, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

.info-card h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.info-card p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--text-accent);
  font-weight: bold;
}

.feature-list strong {
  color: var(--text-accent);
  font-weight: 600;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  background: rgba(15, 23, 42, 0.5);
  padding: 0.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn:hover:not(.active) {
  color: var(--text-primary);
}

.tab-content {
  display: none;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-content.active {
  display: block;
}

/* Actions */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  padding: 1.25rem 3rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px var(--primary-glow);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(251, 191, 36, 0.5);
  background: #f59e0b;
}

.action-btn:disabled {
  background: #334155;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* QR Section */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-light);
}

.demo-banner {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.5rem 1.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

#qrcode {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

/* Record Display */
.record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.record-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-light);
  padding: 2rem;
  border-radius: 16px;
}

.record-box h4 {
  color: var(--text-accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.record-box p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.record-box strong {
  color: var(--text-primary);
}

.code-block {
  background: #0f0f0f;
  color: #fbbf24;
  padding: 1.25rem;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  border: 1px solid rgba(251, 191, 36, 0.2);
  margin-top: 1rem;
  line-height: 1.5;
}

.loading-spinner {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 5rem 0;
}

footer {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1rem;
  border-top: 1px solid var(--border-light);
  background: rgba(6, 9, 19, 0.8);
  margin-top: auto;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
