/* OwlCalc Web Stylesheet - Modern Glassmorphism & High Contrast Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg-main: #08090D;
  --bg-card: rgba(18, 20, 29, 0.7);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --primary-accent: #6366F1;
  --primary-accent-glow: rgba(99, 102, 241, 0.4);
  --accent-emerald: #10B981;
  --accent-red: #EF4444;
  --accent-amber: #F59E0B;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --backdrop-blur: blur(24px) saturate(180%);
}

[data-theme="glass"] {
  --bg-main: #0B0D14;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-border: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] {
  --bg-main: #F1F5F9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-border: rgba(0, 0, 0, 0.08);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Background Ambient Lighting */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #6366F1 0%, rgba(99,102,241,0) 70%);
  top: -200px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #10B981 0%, rgba(16,185,129,0) 70%);
  bottom: -150px;
  right: -100px;
  animation-delay: -9s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #8B5CF6 0%, rgba(139,92,246,0) 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -4s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* Container & Header */
.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(8, 9, 13, 0.7);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--bg-card-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 14px var(--primary-accent-glow);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-tag {
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: #fff;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--primary-accent-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--bg-card-border);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: var(--backdrop-blur);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* HERO SECTION */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 32px;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 30px;
  color: #818CF8;
  font-size: 13px;
  font-weight: 700;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #818CF8 0%, #C084FC 50%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--bg-card-border);
}

.stat-item h4 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-item p {
  font-size: 13px;
  color: var(--text-muted);
}

/* INTERACTIVE DEMO CONTAINER */
.hero-demo {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 380px;
  height: 760px;
  background: #000;
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(255, 255, 255, 0.15);
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #090A0F;
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.calc-selector-bar {
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.calc-selector-bar::-webkit-scrollbar {
  display: none;
}

.mode-tab {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.mode-tab.active {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-accent-glow);
}

/* CALCULATOR DISPLAY */
.calc-display-area {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: 110px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.calc-expr {
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  min-height: 20px;
  word-break: break-all;
}

.calc-result {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  transition: font-size 0.15s ease;
  word-break: break-all;
}

/* INTERACTIVE TAPE CANVAS */
.tape-canvas {
  flex: 1;
  padding: 8px 16px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tape-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tape-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tape-expr {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.tape-val {
  color: var(--accent-emerald);
  font-weight: 700;
  font-family: var(--font-mono);
}

/* KEYPAD MATRIX */
.calc-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.6);
}

.calc-keypad.scientific-mode {
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
}

.calc-key {
  height: 52px;
  border-radius: 16px;
  border: none;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease, opacity 0.15s ease;
  user-select: none;
}

.calc-key:active {
  transform: scale(0.92);
}

.key-num {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.key-op {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-accent-glow);
}

.key-action {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.key-equals {
  background: var(--accent-emerald);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.key-fn {
  background: rgba(255, 255, 255, 0.05);
  color: #818CF8;
  font-size: 13px;
}

/* SPECIALIZED UTILITY VIEWS */
.specialized-view {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.interop-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px dashed var(--primary-accent);
  border-radius: 10px;
  font-size: 12px;
  color: #818CF8;
  cursor: pointer;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.input-field {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--bg-card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font-mono);
  outline: none;
}

.input-field:focus {
  border-color: var(--primary-accent);
}

.result-card {
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-card h3 {
  font-size: 24px;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

/* FEATURES GRID SECTION */
.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 32px;
}

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

.section-tag {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: var(--backdrop-blur);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.15);
  color: #818CF8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* INTERACTIVE RECEIPT BUILDER DEMO */
.receipt-demo-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: var(--backdrop-blur);
}

.receipt-card-preview {
  background: #FFF;
  color: #0F172A;
  border-radius: 16px;
  padding: 24px;
  font-family: var(--font-mono);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.receipt-card-preview .receipt-header {
  border-bottom: 2px dashed #CBD5E1;
  padding-bottom: 12px;
  text-align: center;
}

.receipt-card-preview .receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.receipt-card-preview .receipt-total {
  border-top: 2px solid #0F172A;
  padding-top: 8px;
  font-weight: 700;
  font-size: 16px;
}

/* PRICING MATRIX */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  backdrop-filter: var(--backdrop-blur);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary-accent);
  box-shadow: 0 8px 32px var(--primary-accent-glow);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  right: 24px;
  background: var(--primary-accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}

.pricing-price {
  font-size: 44px;
  font-weight: 800;
}

.pricing-price span {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* FOOTER */
footer {
  background: rgba(4, 5, 8, 0.95);
  border-top: 1px solid var(--bg-card-border);
  padding: 48px 32px 32px 32px;
  margin-top: auto;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--bg-card-border);
}

.footer-copy {
  text-align: center;
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-badge, .hero-desc {
    align-self: center;
  }

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

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

  .receipt-demo-section {
    grid-template-columns: 1fr;
  }

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