:root {
  --primary: #10B981;
  --primary-hover: #059669;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  
  --bg-color: #f8fafc;
  --surface: #ffffff;
  
  --border-color: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
}

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

/* Base Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Subtle Background Pattern */
.page-background {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

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

.brand-logo {
  height: 48px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px; /* Pill shape is fine if it's clean and non-glowing */
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-primary {
  background-color: var(--text-main);
  color: #fff;
}

.btn-primary:hover {
  background-color: #000;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

/* Hero Section */
.hero {
  padding: 120px 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--primary-hover);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
  line-height: 1.7;
}

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

.hero-visual {
  position: relative;
}

.hero-image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: var(--surface);
  transform: rotate(2deg);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 289px;
  margin: 0 auto;
}

.hero-image-wrapper:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-image-wrapper img {
  width: 100%;
  display: block;
}

/* Stats Marquee (Clean, Structural) */
.stats-marquee {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 40px 0;
}

.stats-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
}

.stat-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-val {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-lbl {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background-color: var(--border-color);
}

/* Section Common */
.section-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.section-lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

/* Social Section */
.social {
  padding: 160px 40px;
}

.social-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 120px;
  align-items: center;
}

.phone-mockup {
  border-radius: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 8px solid #000;
  background: #000;
  max-width: 289px;
  margin: 0 auto;
  transform: rotate(-3deg);
}

.phone-mockup img {
  width: 100%;
  display: block;
}

.premium-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.premium-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.list-icon {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.list-text {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 8px;
}

.list-text strong {
  color: var(--text-main);
  font-weight: 700;
}

.mt-l {
  margin-top: 48px;
}

/* Features Grid */
.features {
  padding: 120px 40px;
}

.features-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 80px;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
  font-size: 2.5rem;
  margin-bottom: 32px;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.feature-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Calculator & Vault Section */
.calculator-section {
  padding: 160px 40px;
}

.calc-grid-layout {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 100px;
  align-items: center;
}

.calculator-hardware {
  position: relative;
  width: 100%;
  aspect-ratio: 0.7; /* Ensures consistent size for flip */
  perspective: 1200px;
}

.hardware-view {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 40px;
  padding: 32px;
  box-shadow: 
    inset 0 2px 4px rgba(255,255,255,0.8),
    0 25px 50px -12px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  backface-visibility: hidden;
}

/* Calculator View */
#calc-standard {
  transform: rotateY(0deg);
  z-index: 2;
}

#calc-standard.hidden {
  transform: rotateY(-180deg);
  z-index: 1;
}

.hardware-screen {
  background: #f1f5f9;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: inset 0 4px 6px rgba(0,0,0,0.05);
}

#calc-input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 4rem;
  text-align: right;
  font-weight: 500;
  font-family: inherit;
  color: #0f172a;
  outline: none;
}

.hardware-keypad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  flex-grow: 1;
}

.key {
  border-radius: 99px;
  border: none;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,0.1);
  transition: transform 0.1s, box-shadow 0.1s;
}

.key:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.key.fn { background: #cbd5e1; color: #334155; }
.key.num { background: #f8fafc; color: #0f172a; }
.key.op { background: #f59e0b; color: #fff; font-size: 1.75rem; }
.key.eq { background: var(--primary); color: #fff; font-size: 1.75rem; }
.key.wide { grid-column: span 2; }

/* Vault View */
#calc-vault {
  background: #0f172a;
  border-color: #1e293b;
  transform: rotateY(180deg);
  z-index: 1;
  box-shadow: 
    inset 0 2px 4px rgba(255,255,255,0.05),
    0 25px 50px -12px rgba(15, 23, 42, 0.4);
}

#calc-vault.active {
  transform: rotateY(0deg);
  z-index: 2;
}

.vault-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 24px;
}

.vault-status {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.vault-lock {
  background: transparent;
  border: none;
  color: #64748b;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.875rem;
}

.vault-chat {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  margin-bottom: 24px;
}

.msg {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  max-width: 85%;
}

.msg.sys {
  align-self: center;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px;
}

.msg.bot {
  background: #1e293b;
  color: #f8fafc;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg.user {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.vault-input-box {
  display: flex;
  gap: 8px;
}

#vault-input {
  flex-grow: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 99px;
  padding: 0 20px;
  color: #f8fafc;
  outline: none;
  font-family: inherit;
}

#vault-input:focus {
  border-color: var(--primary);
}

.vault-input-box button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  height: 32px;
  margin-bottom: 12px;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links-col {
  display: flex;
  gap: 32px;
}

.footer-links-col a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links-col a:hover {
  color: var(--text-main);
}

@media (max-width: 960px) {
  .hero-grid, .social-wrapper, .calc-grid-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .features-grid { grid-template-columns: 1fr; }
  .nav-links, .header-action { display: none; }
  .stats-container { flex-direction: column; gap: 24px; }
  .stat-divider { width: 48px; height: 1px; }
  .phone-mockup { transform: rotate(0); }
  .premium-list li { text-align: left; }
  .hero-actions { justify-content: center; }
  .footer-layout { flex-direction: column; gap: 32px; text-align: center; }
}
