/* ===== CSS Custom Properties ===== */
:root {
  /* Dark theme base palette */
  --color-bg: #0a0e1a;
  --color-bg-alt: #0f1424;
  --color-surface: #141929;
  --color-border: rgba(255, 255, 255, 0.08);

  /* Brand colors */
  --color-primary: #06b6d4;
  --color-primary-dark: #0891b2;
  --color-secondary: #a855f7;
  --color-accent: #06b6d4;
  --gradient-brand: linear-gradient(135deg, #06b6d4 0%, #a855f7 100%);

  /* Text hierarchy */
  --color-text: #e2e8f0;
  --color-text-light: #94a3b8;
  --color-text-heading: #f1f5f9;

  /* Glassmorphism tokens */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;

  /* Layout tokens */
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Scroll Animation Utilities ===== */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
}

.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ===== Header & Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

.header.scrolled {
  background: rgba(10, 14, 26, 0.92);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
}

.logo span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-list {
  display: flex;
  gap: 32px;
}

.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
  transition: color var(--transition);
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-brand);
  transition: width var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-primary);
}

.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Main Content ===== */
main {
  flex: 1;
  margin-top: var(--header-height);
}

/* ===== Hero Section ===== */
.hero {
  padding: 120px 0 100px;
  background:
    linear-gradient(to bottom, rgba(10, 14, 26, 0.6) 0%, rgba(10, 14, 26, 0.85) 100%),
    url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?w=1920&q=80') center/cover no-repeat;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.15;
  color: var(--color-text-heading);
}

.hero h1 span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  position: relative;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.3), 0 4px 12px rgba(168, 85, 247, 0.2);
}

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

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
  transform: translateY(-2px);
}

/* ===== Section Styles ===== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-image-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.section-image-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 14, 26, 0.85) 0%, rgba(10, 14, 26, 0.92) 100%);
  z-index: 0;
}

.section-image-bg > .container {
  position: relative;
  z-index: 1;
}

/* Split layout: text + image side by side */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split-image {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  height: 360px;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .split-section {
    grid-template-columns: 1fr;
  }

  .split-image {
    height: 240px;
  }
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-heading);
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.08), 0 4px 12px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-primary);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-bottom: 8px;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== Process Step Numbers ===== */
.card-icon.step-number {
  font-size: 1.2rem;
  font-weight: 800;
  background: rgba(6, 182, 212, 0.1);
  border: 2px solid var(--glass-border);
  color: var(--color-primary);
}

/* ===== Stats Counter Section ===== */
.stats-section {
  padding: 60px 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item {
  padding: 24px 16px;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--color-text-light);
  font-weight: 500;
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* ===== Page Header (inner pages) ===== */
.page-header {
  padding: 60px 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    var(--color-bg);
  color: #fff;
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--color-text-heading);
}

.page-header p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 540px;
  margin: 0 auto;
}

/* ===== About Page ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 16px;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--color-text);
}

.about-image {
  background: var(--glass-bg);
  border-radius: 16px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 1rem;
  border: 1px solid var(--glass-border);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.value-item {
  text-align: center;
  padding: 32px 24px;
  border-radius: 16px;
  transition: all var(--transition);
}

.value-item:hover {
  background: var(--glass-bg);
}

.value-item .icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.value-item .icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-bottom: 8px;
}

.value-item p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ===== Contact Page ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-heading);
  transition: color var(--transition);
}

.form-group.focused label {
  color: var(--color-primary);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-family);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-light);
  opacity: 0.6;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group .error-message {
  color: #f87171;
  font-size: 0.8rem;
  display: none;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #f87171;
}

.form-group.error .error-message {
  display: block;
}

.contact-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 24px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-item .icon {
  width: 44px;
  height: 44px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-item .icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-info-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-bottom: 4px;
}

.contact-info-item p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ===== Toast Notification ===== */
.toast-container {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 10px;
  padding: 16px 20px;
  min-width: 320px;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideInRight 0.4s ease forwards;
}

.toast.toast-exit {
  animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toast-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
}

.toast-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-heading);
  margin-bottom: 4px;
}

.toast-content p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ===== Footer ===== */
.footer {
  background: #060812;
  color: #64748b;
  padding: 48px 0 24px;
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: #f1f5f9;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4 {
  color: #f1f5f9;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-list.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list li {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-list.open li { opacity: 1; transform: translateX(0); }
  .nav-list.open li:nth-child(1) { transition-delay: 0.05s; }
  .nav-list.open li:nth-child(2) { transition-delay: 0.1s; }
  .nav-list.open li:nth-child(3) { transition-delay: 0.15s; }
  .nav-list.open li:nth-child(4) { transition-delay: 0.2s; }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section {
    padding: 48px 0;
  }

  .page-header {
    padding: 40px 0;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 48px);
  }
}
