/* Skeuomorphic Overrides */

/* Background Texture */
body {
  background: radial-gradient(circle at 50% 50%, #1e293b, #020617), url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  background-blend-mode: overlay;
  background-attachment: fixed;
}

/* Navigation Bar */
.nav.scrolled {
  background: linear-gradient(to bottom, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
  border-bottom: 1px solid #334155;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: none;
}

/* Buttons */
.btn {
  background: linear-gradient(to bottom, #6366f1, #4338ca);
  border: 1px solid #312e81;
  border-radius: 8px;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.4), /* Top highlight */
    inset 0 -1px 2px rgba(0, 0, 0, 0.4), /* Bottom shadow */
    0 4px 6px rgba(0, 0, 0, 0.5), /* Drop shadow */
    0 1px 3px rgba(0, 0, 0, 0.3);
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn:hover {
  background: linear-gradient(to bottom, #818cf8, #4f46e5);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4),
    0 6px 8px rgba(0, 0, 0, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.btn:active {
  background: linear-gradient(to bottom, #3730a3, #312e81);
  box-shadow: 
    inset 0 2px 5px rgba(0, 0, 0, 0.7), /* Deep inner shadow */
    0 1px 1px rgba(0, 0, 0, 0.2); /* Reduced drop shadow */
  transform: translateY(2px) !important;
}

/* Ghost Buttons */
.btn-ghost {
  background: linear-gradient(to bottom, #334155, #1e293b);
  border: 1px solid #0f172a;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5),
    0 3px 5px rgba(0, 0, 0, 0.4);
  color: #f8fafc !important;
}

.btn-ghost:hover {
  background: linear-gradient(to bottom, #475569, #334155);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5),
    0 4px 6px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.btn-ghost:active {
  background: linear-gradient(to bottom, #1e293b, #0f172a);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.6),
    0 1px 1px rgba(0, 0, 0, 0.2);
  transform: translateY(2px) !important;
}

/* Cards (Features, Mental States, etc.) */
.feature-card, .state-card, .modal-card, .cta-card, .email-popup-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-top: 1px solid #475569; /* Top light bevel */
  border-bottom: 1px solid #020617; /* Bottom dark bevel */
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.1), /* Inner highlight */
    0 10px 15px -3px rgba(0, 0, 0, 0.7), /* Drop shadow */
    0 4px 6px -2px rgba(0, 0, 0, 0.5);
  border-radius: 16px;
  position: relative;
}

/* Add an inner bevel to cards */
.feature-card::before, .state-card::before, .modal-card::before, .cta-card::before, .email-popup-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 2px 4px rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

/* Inputs */
input[type="email"], .email-popup-input, .footer-signup-input {
  background: linear-gradient(to bottom, #020617, #0f172a);
  border: 1px solid #334155;
  border-top-color: #020617; /* Darker top to look recessed */
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.1); /* Bottom highlight */
  color: #f1f5f9;
}

input[type="email"]:focus, .email-popup-input:focus, .footer-signup-input:focus {
  background: linear-gradient(to bottom, #0f172a, #1e293b);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 0 2px rgba(139, 92, 246, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: #8b5cf6;
}

/* State Cards specific */
.state-card {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.state-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 0 15px rgba(255, 255, 255, 0.05),
    0 20px 25px -5px rgba(0, 0, 0, 0.8),
    0 10px 10px -5px rgba(0, 0, 0, 0.6);
  border-color: #475569;
}

.state-card:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.8),
    0 4px 6px -2px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

/* Modal Close Buttons */
.modal-close, .email-popup-close {
  background: linear-gradient(to bottom, #334155, #1e293b);
  border: 1px solid #0f172a;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.5);
  transition: all 0.1s;
}

.modal-close:hover, .email-popup-close:hover {
  background: linear-gradient(to bottom, #475569, #334155);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5),
    0 4px 6px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.modal-close:active, .email-popup-close:active {
  background: #0f172a;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  transform: translateY(1px);
}

/* App Store Buttons */
.btn-store, .btn-store-light {
  background: linear-gradient(to bottom, #1e293b, #0f172a);
  border: 1px solid #334155;
  color: #f8fafc !important; /* Force white text even if btn-store-light */
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    inset 0 -1px 1px rgba(0, 0, 0, 0.8),
    0 4px 6px rgba(0, 0, 0, 0.6);
}

.btn-store:hover, .btn-store-light:hover {
  background: linear-gradient(to bottom, #334155, #1e293b);
  transform: translateY(-2px);
  border-color: #475569;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -1px 1px rgba(0, 0, 0, 0.8),
    0 6px 8px rgba(0, 0, 0, 0.7);
}

.btn-store:active, .btn-store-light:active {
  background: #020617;
  transform: translateY(2px) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Hero Badge */
.hero-badge {
  background: linear-gradient(to bottom, #1e293b, #0f172a);
  border: 1px solid #334155;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.15),
    0 4px 6px rgba(0, 0, 0, 0.5);
  font-weight: 500;
}

/* Feature Icons with inner shadow */
.feature-icon {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.5), /* Inner shadow to look like a recessed socket */
    0 1px 1px rgba(255, 255, 255, 0.1);
}
