/* 
 * 🚀 Coder Window: Global Stylesheet (v1.0)
 * Integrating Brand Tokens and Neumorphic Design System.
 */

/* --- 1. Imports & Fonts --- */
/* Using standard system font stacks as placeholders for Aeonik and Geist */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Color Tokens */
  --base-bg: #0F172A;
  --surface: #1E293B;
  --accent-cyan: #38BDF8;
  --accent-indigo: #818CF8;
  --success: #34D399;
  --text-heading: #F8FAFC;
  --text-body: #94A3B8;
  
  /* Neumorphic Shadow Tokens */
  --nm-shadow-dark: rgba(0, 0, 0, 0.4);
  --nm-shadow-light: rgba(255, 255, 255, 0.03);
  
  /* Glassmorphism Tokens */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(12px);

  /* Spacing Tokens */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --section-gap: 120px;
}

/* --- 2. Reset & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--base-bg);
  color: var(--text-body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-family: 'Inter', sans-serif; /* Placeholder for Aeonik */
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- 3. Neumorphism Classes (from specs.css) --- */
.nm-elevated {
  background: var(--surface);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 
    12px 12px 24px var(--nm-shadow-dark),
    -8px -8px 20px var(--nm-shadow-light);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s ease;
}

.nm-elevated:hover {
  transform: translateY(-4px);
  box-shadow: 
    16px 16px 32px var(--nm-shadow-dark),
    -10px -10px 25px var(--nm-shadow-light);
}

.nm-inset {
  background: var(--base-bg);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 
    inset 6px 6px 12px var(--nm-shadow-dark),
    inset -4px -4px 10px var(--nm-shadow-light);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 4. Shared Components --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent-cyan);
  color: var(--base-bg);
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
  background: transparent;
}

.btn-secondary:hover {
  background: var(--accent-indigo);
  color: var(--text-heading);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

/* --- 5. Navbar Styles --- */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  z-index: 1000;
  padding: 10px 30px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-heading);
  letter-spacing: 1px;
}

.logo-accent {
  color: var(--accent-cyan);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-item {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
}

.nav-item:hover {
  color: var(--accent-cyan);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-heading);
  transition: 0.3s;
}

.mobile-overlay {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  padding: 30px;
  text-align: center;
}

/* --- 6. Footer Styles --- */
.footer {
  padding: var(--section-gap) 0 40px;
}

.footer-wrapper {
  padding: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand p {
  margin-top: 20px;
  font-size: 0.95rem;
}

.footer-links h4, 
.footer-contact h4 {
  color: var(--text-heading);
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links ul li a:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.85rem;
}

/* --- 7. Hero Section Styles --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  z-index: 2;
}

.badge {
  display: inline-block;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 30px;
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 30px;
  max-width: 800px;
}

.text-glow {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

.hero-lead {
  font-size: 1.25rem;
  max-width: 600px;
  margin-bottom: 50px;
}

.hero-cta-group {
  display: flex;
  gap: 20px;
  margin-bottom: 60px;
}

/* Trust Bar */
.trust-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
}

.trust-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.trust-logos {
  display: flex;
  gap: 40px;
  opacity: 0.4;
  filter: grayscale(1);
}

.trust-logo {
  font-weight: 700;
  font-size: 1.1rem;
}

/* Hero Visual & Animations */
.hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.window-frame {
  width: 400px;
  height: 450px;
  transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.window-glass {
  width: 85%;
  height: 85%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-visual-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
  filter: saturate(1.5) contrast(1.1);
}

.window-content-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.line {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.line-1 { width: 60%; background: var(--accent-cyan); }
.line-2 { width: 40%; }
.line-3 { width: 80%; }

.window-spark {
  position: absolute;
  top: 20%;
  right: 20%;
  width: 60px;
  height: 60px;
  background: var(--accent-cyan);
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.5;
  animation: pulse-glow 4s infinite;
}

.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: -1;
}

.orb-1 {
  width: 150px;
  height: 150px;
  background: rgba(56, 189, 248, 0.15);
  top: -20%;
  right: -20%;
  animation: float-slow 8s infinite alternate;
}

.orb-2 {
  width: 120px;
  height: 120px;
  background: rgba(129, 140, 248, 0.15);
  bottom: -10%;
  left: -10%;
  animation: float-slow 10s infinite alternate-reverse;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(0); }
  50% { transform: perspective(1000px) rotateY(-10deg) rotateX(10deg) translateY(-20px); }
}

@keyframes float-slow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.5); opacity: 0.6; }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  position: relative;
}

.scroll-dot {
  width: 5px;
  height: 5px;
  background: var(--accent-cyan);
  border-radius: 50%;
  position: absolute;
  left: -2px;
  animation: scroll-dot-move 2s infinite;
}

@keyframes scroll-dot-move {
  0% { top: 0; opacity: 0; }
  20% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* --- 8. Services Section Styles --- */
.services-section {
  padding: var(--section-gap) 0;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.03), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-lead {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.service-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.col-2 {
  grid-column: span 2;
}

.card-icon {
  width: 50px;
  height: 50px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 25px;
  transition: 0.3s;
}

.service-card:hover .card-icon {
  background: var(--accent-cyan);
  color: var(--base-bg);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-footer {
  margin-top: 30px;
}

.learn-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.6;
  transition: 0.3s;
}

.service-card:hover .learn-more {
  opacity: 1;
  transform: translateX(5px);
}

.card-bg {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
  z-index: 0;
  transition: 0.5s;
}

.service-card:hover .card-bg {
  transform: scale(1.5);
  opacity: 0.8;
}

/* --- 9. About Section Styles --- */
.about-section {
  padding: var(--section-gap) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.expertise-card {
  padding: 2px; /* For border effect */
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  border-radius: 34px;
}

.expertise-inner {
  padding: 50px;
  border-radius: 32px;
  text-align: center;
}

.quote {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 30px 0;
  font-style: italic;
}

.founder-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.founder-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.founder-name {
  font-weight: 700;
  color: var(--text-heading);
}

.founder-role {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* --- 10. Workflow Section Styles --- */
.workflow-section {
  padding: var(--section-gap) 0;
}

.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-indigo), transparent);
}

.timeline-step {
  position: relative;
  width: 50%;
  padding: 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.timeline-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-step.left {
  left: 0;
  text-align: right;
  padding-right: 60px;
}

.timeline-step.right {
  left: 50%;
  padding-left: 60px;
}

.step-dot {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--base-bg);
  z-index: 2;
  transform: translateY(-50%);
}

.left .step-dot {
  right: -22px;
}

.right .step-dot {
  left: -22px;
}

.step-card {
  padding: 30px;
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 15px;
}

/* --- 11. Blog Section Styles --- */
.blog-section {
  padding: var(--section-gap) 0;
  background: radial-gradient(circle at bottom left, rgba(129, 140, 248, 0.03), transparent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.blog-image-wrapper {
  width: 100%;
  height: 220px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.blog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
  transform: scale(1.1);
}

.blog-image-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, rgba(15, 23, 42, 0.4) 100%);
  z-index: 1;
}

.blog-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.blog-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-indigo);
  margin-bottom: 15px;
  display: block;
}

.blog-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.blog-card p {
  font-size: 0.95rem;
  margin-bottom: 25px;
  opacity: 0.8;
}

.read-more {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.blog-footer {
  margin-top: 60px;
  text-align: center;
}

.blog-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  font-style: italic;
  opacity: 0.6;
}

/* --- 12. Contact Section Styles --- */
.contact-section {
  padding: var(--section-gap) 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  padding: 80px;
}

.contact-title {
  font-size: 2.5rem;
  margin-bottom: 25px;
}

.contact-lead {
  font-size: 1.1rem;
  margin-bottom: 50px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.info-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.info-value {
  font-size: 1.25rem;
  color: var(--text-heading);
}

.social-pills {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

/* Form Styling */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-heading);
  margin-left: 5px;
}

.nm-input {
  background: var(--base-bg);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 15px 20px;
  color: var(--text-heading);
  font-family: inherit;
  font-size: 1rem;
  box-shadow: inset 6px 6px 12px var(--nm-shadow-dark), 
              inset -4px -4px 10px var(--nm-shadow-light);
  outline: none;
  transition: border-color 0.3s ease;
}

.nm-input:focus {
  border-color: var(--accent-cyan);
}

textarea.nm-input {
  min-height: 150px;
  resize: vertical;
}

.error-msg {
  font-size: 0.75rem;
  color: #ff5e5e;
  margin-top: 5px;
  display: none;
}

.btn-submit {
  width: 100%;
  padding: 18px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 15px;
}

.loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  display: none;
  margin-left: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success State */
.success-state {
  display: none;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  height: 100%;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--success);
  margin-bottom: 30px;
}

.success-state h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.success-state p {
  margin-bottom: 30px;
}

/* --- 13. Responsive Breakpoints --- */
@media (max-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 60px 40px;
    gap: 60px;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}
