/* Cawfee Design System */
:root {
  --bg-dark: #0f0c0a; /* Deep rich espresso black */
  --bg-card: rgba(30, 24, 20, 0.6); /* Glassmorphism base */
  --bg-card-hover: rgba(45, 36, 30, 0.8);
  
  --text-main: #fcfbf9; /* Crema white */
  --text-muted: #d1c8c1; /* Light beige muting */
  
  --brand-primary: #e6b981; /* Golden caramel/coffee accent */
  --brand-primary-glow: rgba(230, 185, 129, 0.3);
  --brand-primary-hover: #f3cca5;
  
  --brand-secondary: #c88141; /* Deeper roasted tone */
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(230, 185, 129, 0.4);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  
  /* Subtle ambient glow in the background */
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(200, 129, 65, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(230, 185, 129, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--brand-primary-hover);
}

/* Base Layout & Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  padding: 100px 0;
  position: relative;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 24px var(--brand-primary-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-spring);
  border: none;
  outline: none;
  gap: 8px;
}

.btn-solid {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: var(--bg-dark);
  box-shadow: 0 4px 16px var(--brand-primary-glow);
}

.btn-solid:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(230, 185, 129, 0.5);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border: 1px solid var(--border-highlight);
}

.btn-outline:hover {
  background: rgba(230, 185, 129, 0.1);
  transform: scale(1.05);
}

/* Header/Nav */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(15, 12, 10, 0.85);
  backdrop-filter: blur(12px);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--brand-primary);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px; /* Offset for header */
}

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

.hero-content h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  letter-spacing: -1px;
  margin-bottom: 24px;
  background: linear-gradient(to right, #ffffff, var(--brand-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  max-width: 500px;
}

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

/* Hero Card (3D Tilt Effect) */
.hero-visual {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  position: relative;
}

.cawfee-card {
  width: 340px;
  height: 540px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(230, 185, 129, 0.9), rgba(200, 129, 65, 0.95));
  box-shadow: 
    0 30px 60px rgba(0,0,0,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.3),
    inset 0 20px 20px rgba(255,255,255,0.1);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px;
  overflow: hidden;
}

.cawfee-card::before {
  content: '';
  position: absolute;
  top: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  transform: translateY(-20%) rotate(30deg);
  pointer-events: none;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transform: translateZ(40px);
}

.card-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: #1e1814;
}

.card-chip {
  width: 45px;
  height: 35px;
  background: linear-gradient(135deg, #e0e0e0, #999);
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.1);
}

.card-middle {
  transform: translateZ(50px);
  text-align: center;
}

.card-amount {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #1e1814;
  letter-spacing: -2px;
}

.card-type {
  font-size: 1rem;
  color: rgba(30, 24, 20, 0.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.card-bottom {
  transform: translateZ(30px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-recipient {
  color: #1e1814;
  font-weight: 600;
  font-size: 1.1rem;
}

.contactless-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #1e1814;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* Floating Elements around Card */
.float-element {
  position: absolute;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  padding: 12px 20px;
  border-radius: 16px;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: float 6s ease-in-out infinite;
  z-index: 10;
}

.float-1 { top: 10%; right: -10%; animation-delay: 0s; }
.float-2 { bottom: 20%; left: -15%; animation-delay: -2s; }

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Problem Section */
.problem-statement {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.problem-statement h2 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}

.problem-statement p {
  font-size: 1.5rem;
  color: var(--text-main);
}

.problem-statement .highlight {
  color: var(--brand-primary);
  font-style: italic;
}

/* How It Works Layered Steps */
.how-it-works {
  background: linear-gradient(to bottom, transparent, rgba(30, 24, 20, 0.3), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 16px;
}

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

.step-card {
  padding: 40px 32px;
  text-align: center;
  position: relative;
}

.step-number {
  position: absolute;
  top: -20px;
  left: 32px;
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  color: rgba(230, 185, 129, 0.15);
  line-height: 1;
}

.step-icon {
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(230, 185, 129, 0.1);
  color: var(--brand-primary);
  font-size: 2rem;
}

.step-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--text-main);
}

/* Features Grid (Why This Wins) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-item {
  display: flex;
  gap: 20px;
  padding: 32px;
}

.feature-item .icon {
  font-size: 2rem;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.feature-item h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.feature-item p {
  font-size: 1rem;
}

/* Use Cases */
.use-cases-band {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
}

.pill {
  padding: 12px 24px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 500;
}

/* Footer */
footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-glass);
  margin-top: 100px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 64px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

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

.link-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-group h4 {
  margin-bottom: 8px;
  color: var(--text-main);
}

.link-group a {
  color: var(--text-muted);
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ---------------------------------
   SIMULATION MODAL STYLES
   --------------------------------- */
.sim-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.sim-modal.active {
  opacity: 1;
  pointer-events: all;
}

.sim-modal-content {
  background: var(--bg-dark);
  border: 1px solid var(--border-glass);
  border-radius: 32px;
  padding: 48px;
  width: 90%;
  max-width: 1000px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8);
  transform: translateY(20px);
  transition: var(--transition-spring);
}

.sim-modal.active .sim-modal-content {
  transform: translateY(0);
}

.sim-close {
  position: absolute;
  top: 24px; right: 24px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.sim-close:hover {
  background: rgba(255,255,255,0.2);
}

.sim-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.sim-subtitle {
  text-align: center;
  margin-bottom: 40px;
}

.sim-phones-container {
  display: flex;
  justify-content: center;
  gap: 64px;
}

.sim-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 300px;
  opacity: 0.5; /* dim inactive ones */
  transition: var(--transition-smooth);
}
.sim-phone.focus {
  opacity: 1;
  transform: scale(1.05);
}

.phone-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--text-main);
  padding: 6px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
}

.phone-screen {
  width: 280px;
  height: 580px;
  background: #111;
  border: 8px solid #333;
  border-radius: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Phone Notch */
.phone-screen::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 24px;
  background: #333;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 10;
}

/* Steps inside phones */
.sim-step {
  display: none;
  flex-direction: column;
  height: 100%;
  padding-top: 40px;
  animation: fadeIn 0.4s ease-out forwards;
}
.sim-step.active {
  display: flex;
}

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

.sim-header {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: #fff;
}

.sim-options { margin-bottom: 16px; display:flex; gap:8px;}
.sim-option {
  flex: 1;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  cursor: pointer;
}
.sim-option.selected {
  border-color: var(--brand-primary);
  background: rgba(230, 185, 129, 0.1);
}
.sim-option .sim-icon {
  display: block; font-size: 1.5rem; margin-bottom: 4px;
}

.sim-input {
  background: #222;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 12px;
  color: #fff;
  font-family: var(--font-body);
  height: 100px;
  resize: none;
  margin-bottom: auto; /* push button down */
}

.sim-action-btn { width: 100%; padding: 16px; font-size: 1rem; border-radius: 16px;}

.sim-success-icon {
  width: 80px; height: 80px; border-radius: 50%;
  background: #2ecc71; color: white;
  display:flex; justify-content:center; align-items:center;
  font-size: 3rem; margin: 40px auto 0;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.sim-imessage {
  margin-top: auto;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sim-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.sim-bubble.out {
  background: #007aff; color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.sim-bubble.in {
  background: #333; color: white;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.sim-waiting {
  margin: auto; text-align:center; color: #888;
}
.spinner {
  display:inline-block; width: 30px; height:30px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #fff; border-radius:50%;
  animation: spin 1s linear infinite; margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pulse-anim {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(230, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(230, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 185, 129, 0); }
}

.sim-mini-card {
  background: linear-gradient(145deg, rgba(230, 185, 129, 0.9), rgba(200, 129, 65, 0.95));
  border-radius: 16px; padding: 20px; color: #1e1814;
  margin-top: 20px; margin-bottom: auto;
}
.sim-wallet-view {
  margin-top: auto; margin-bottom: auto;
  display:flex; flex-direction:column; align-items:center; gap:30px;
}
.wallet-ready {
  width: 100%; transform: scale(1.1); box-shadow: 0 10px 30px rgba(230, 185, 129, 0.2);
}
.tap-icon {
  background: rgba(255,255,255,0.1); width: 80px; height:80px; border-radius:50%;
  display:flex; justify-content:center; align-items:center;
  animation: tapPulse 1.5s infinite alternate;
}
@keyframes tapPulse {
  from { transform: translateY(0); opacity:0.7; }
  to { transform: translateY(-10px); opacity:1; }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 80px;
  }
  
  .hero-content p {
    margin: 0 auto 40px;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .sim-phones-container {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }
  
  .sim-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 20px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 40px;
  }
  
  .footer-links {
    flex-wrap: wrap;
    gap: 40px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
  }
  
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 2.25rem; }
  .problem-statement h2 { font-size: 1.8rem; }
}
