/* ===================================================
   RATEL SOFTWARE — Main Stylesheet
   =================================================== */

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

:root {
  --primary:        #1E40AF;
  --primary-hover:  #1D4ED8;
  --primary-light:  #EFF6FF;
  --text:           #111827;
  --text-muted:     #6B7280;
  --bg:             #FFFFFF;
  --bg-alt:         #F8FAFC;
  --border:         #E5E7EB;
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow-md:      0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg:      0 8px 32px rgba(0, 0, 0, 0.10);
  --transition:     0.2s ease;
  --container:      1200px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

/* ----- Container ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}

.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover {
  background: #EFF6FF;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 16px;
}

/* ===================================================
   SECTIONS
   =================================================== */
.section {
  padding: 96px 0;
}

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

/* Section header */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===================================================
   HEADER / NAV
   =================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

#site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 0;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

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

.nav-links {
  display: flex;
  gap: 36px;
  margin-left: 48px;
  margin-right: auto;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 4px 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.hamburger:hover {
  background: var(--bg-alt);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===================================================
   HERO
   =================================================== */
.hero-section {
  padding: 88px 0 100px;
  background: linear-gradient(175deg, #F0F7FF 0%, #FFFFFF 55%);
  overflow: hidden;
}

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

.hero-text {
  max-width: 560px;
}

.tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 22px;
}

.hero-text h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 38px;
  max-width: 460px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 520px;
  filter: drop-shadow(0 16px 40px rgba(30, 64, 175, 0.08));
}

/* ===================================================
   STATS BAR
   =================================================== */
.stats-bar {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 44px 0;
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 32px;
}

.stat-num {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-sep {
  width: 1px;
  height: 52px;
  background: var(--border);
  flex-shrink: 0;
}

/* ===================================================
   SERVICES
   =================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: box-shadow var(--transition), transform var(--transition),
              border-color var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: #C7D7F7;
}

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.service-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.service-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===================================================
   PROCESS
   =================================================== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 27px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(to right, var(--primary), #93C5FD);
  z-index: 0;
}

.process-step {
  text-align: center;
  padding: 0 14px;
  position: relative;
  z-index: 1;
}

.step-badge {
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 22px;
  box-shadow: 0 0 0 6px var(--bg);
  position: relative;
}

.process-step h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.process-step p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===================================================
   TECH STACK
   =================================================== */
.tech-categories {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}

.tech-category {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.tech-category-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 88px;
  padding-top: 9px;
  flex-shrink: 0;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-pill {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 7px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--transition), color var(--transition),
              background var(--transition);
  cursor: default;
}

.tech-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ===================================================
   FAQ
   =================================================== */
.faq-container {
  max-width: 760px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

details.faq-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
  transition: border-color var(--transition);
}

details.faq-item[open] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.07);
}

summary.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  gap: 16px;
  user-select: none;
  -webkit-user-select: none;
  transition: color var(--transition);
}

summary.faq-question::-webkit-details-marker {
  display: none;
}

summary.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
  transition: transform 0.25s ease;
}

details[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px 22px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* ===================================================
   CTA BANNER
   =================================================== */
.cta-banner {
  background: var(--primary);
  padding: 88px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(99, 143, 255, 0.25) 0%, transparent 65%),
              radial-gradient(ellipse at 30% 50%, rgba(16, 24, 100, 0.3) 0%, transparent 65%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-inner h2 {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-inner p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 38px;
  line-height: 1.6;
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 72px 0 0;
}

.footer-top {
  padding-bottom: 40px;
}

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

.footer-logo {
  font-size: 20px;
  font-weight: 800;
  color: #fff !important;
  margin-bottom: 14px;
  display: inline-block;
}

.footer-logo span {
  color: #93C5FD !important;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: #64748B;
}


.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 22px 0;
}

.footer-bottom p {
  font-size: 13px;
  color: #475569;
}

/* ===================================================
   404 PAGE
   =================================================== */
.error-section {
  min-height: calc(100vh - 68px - 280px);
  display: flex;
  align-items: center;
  padding: 96px 0;
  background:
    radial-gradient(circle at 20% 10%, var(--primary-light) 0%, transparent 45%),
    radial-gradient(circle at 80% 90%, var(--primary-light) 0%, transparent 45%),
    var(--bg);
}

.error-inner {
  text-align: center;
  max-width: 640px;
}

.error-inner .section-tag {
  margin-bottom: 24px;
}

.error-code {
  font-size: 180px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--primary) 0%, #60A5FA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
}

.error-inner h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.error-inner p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.error-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================================
   SCROLL FADE-IN
   =================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* ===================================================
   RESPONSIVE — 1024px
   =================================================== */
@media (max-width: 1024px) {
  .hero-text h1 {
    font-size: 44px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 48px;
  }

  .process-steps::before {
    display: none;
  }

}

/* ===================================================
   RESPONSIVE — 768px
   =================================================== */
@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .section-header {
    margin-bottom: 44px;
  }

  .section-header h2 {
    font-size: 28px;
  }

  /* Header */
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 0 16px;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 13px 24px;
    font-size: 16px;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero-section {
    padding: 56px 0 64px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-text {
    max-width: 100%;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .hero-sub {
    font-size: 16px;
    max-width: 100%;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }

  /* Stats */
  .stats-bar {
    padding: 32px 0;
  }

  .stats-grid {
    flex-direction: column;
    gap: 28px;
  }

  .stat-sep {
    width: 48px;
    height: 1px;
  }

  .stat-num {
    font-size: 36px;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .process-step {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 0;
  }

  .step-badge {
    margin: 0;
    flex-shrink: 0;
  }

  .process-step-body {
    /* wrapper in HTML not used; targeting inner elements */
  }

  /* Tech */
  .tech-category {
    flex-direction: column;
    gap: 12px;
  }

  .tech-category-label {
    min-width: auto;
    padding-top: 0;
  }

  /* CTA */
  .cta-inner h2 {
    font-size: 28px;
  }

  .cta-inner p {
    font-size: 16px;
  }

  /* 404 */
  .error-section {
    padding: 64px 0;
  }

  .error-code {
    font-size: 120px;
  }

  .error-inner h1 {
    font-size: 28px;
  }

  .error-inner p {
    font-size: 16px;
  }

}

/* ===================================================
   RESPONSIVE — 480px
   =================================================== */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 30px;
  }

.hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    justify-content: center;
  }

  .error-code {
    font-size: 96px;
  }

  .error-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .error-ctas .btn {
    justify-content: center;
  }
}
