/* ============================================
   BSO Cloud — Main Stylesheet
   ============================================ */

/* --- Material Icons (self-hosted) --- */
@font-face {
  font-family: 'Material Icons Outlined';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/material-icons-outlined.woff2') format('woff2');
  font-display: block;
}

.material-icon {
  font-family: 'Material Icons Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  color: #00c9a7;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a2e;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #00c9a7;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #00b396;
}

ul,
ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a2e;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.125rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  color: #4a4a68;
}

.text-muted {
  color: #6b7280;
}

.text-center {
  text-align: center;
}

.text-white {
  color: #ffffff;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: #f5f7fa;
}

.section-dark {
  background-color: #0a1628;
  color: #ffffff;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #ffffff;
}

.section-dark p {
  color: #c0c8d8;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header p {
  font-size: 1.125rem;
  color: #6b7280;
}

.section-dark .section-header p {
  color: #c0c8d8;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

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

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

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

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Flex utilities */
.flex {
  display: flex;
}

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

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

/* Spacing utilities */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  line-height: 1.4;
}

.btn-primary {
  background-color: #00c9a7;
  color: #ffffff;
  border-color: #00c9a7;
}

.btn-primary:hover {
  background-color: #00b396;
  border-color: #00b396;
  color: #ffffff;
}

.btn-secondary {
  background-color: transparent;
  color: #00c9a7;
  border-color: #00c9a7;
}

.btn-secondary:hover {
  background-color: #00c9a7;
  color: #ffffff;
}

.btn-white {
  background-color: #ffffff;
  color: #0a1628;
  border-color: #ffffff;
}

.btn-white:hover {
  background-color: #f0f0f0;
  border-color: #f0f0f0;
  color: #0a1628;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: #ffffff;
}

.nav-logo span {
  color: #00c9a7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: #c0c8d8;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-cta {
  margin-left: 0.5rem;
}

.nav-cta .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#nav-check {
  display: none;
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: rgba(10, 22, 40, 0.98);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1.05rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .nav-cta .btn {
    display: block;
    text-align: center;
  }

  #nav-check:checked ~ .nav-links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  #nav-check:checked ~ .nav-toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  #nav-check:checked ~ .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  #nav-check:checked ~ .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

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

/* Staggered children animation */
.stagger-children .card,
.stagger-children .pricing-card,
.stagger-children .blog-card,
.stagger-children .metric-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children.visible .card,
.stagger-children.visible .pricing-card,
.stagger-children.visible .blog-card,
.stagger-children.visible .metric-item {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children.visible :nth-child(1) { transition-delay: 0s; }
.stagger-children.visible :nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible :nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible :nth-child(4) { transition-delay: 0.2s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .stagger-children .card,
  .stagger-children .pricing-card,
  .stagger-children .blog-card,
  .stagger-children .metric-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero::after { animation: none; }
  .hero-content { transform: none !important; opacity: 1 !important; }
}

/* --- Hero --- */
.hero {
  background-color: #0a1628;
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(0, 201, 167, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Floating glow orb for parallax depth */
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 201, 167, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float-slow 8s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, -20px); }
}

/* Hero content parallax via scroll */
.hero-content {
  position: relative;
  z-index: 1;
  will-change: transform, opacity;
}

.hero h1 {
  font-size: 3.25rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.25rem;
  color: #c0c8d8;
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

.hero .btn {
  position: relative;
}

/* Hero for sub-pages (smaller) */
.hero-sm {
  padding: 8rem 0 3rem;
}

.hero-sm h1 {
  font-size: 2.5rem;
}

/* --- Metrics Bar --- */
.metrics {
  background-color: #0f1f38;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-item .metric-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: #00c9a7;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.metric-item .metric-label {
  font-size: 0.9375rem;
  color: #8892a6;
  font-weight: 500;
}

/* --- Cards --- */
.card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 2rem;
  transition: all 0.25s ease;
}

.card:hover {
  border-color: #00c9a7;
  box-shadow: 0 8px 30px rgba(0, 201, 167, 0.08);
  transform: translateY(-2px);
}

.card-icon {
  margin-bottom: 1rem;
  display: block;
}

.card-icon .material-icon {
  font-size: 2.5rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 0;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  color: inherit;
}

/* Dark section cards */
.section-dark .card {
  background-color: #131d33;
  border-color: rgba(255, 255, 255, 0.08);
}

.section-dark .card:hover {
  border-color: #00c9a7;
  box-shadow: 0 8px 30px rgba(0, 201, 167, 0.12);
}

.section-dark .card h3 {
  color: #ffffff;
}

.section-dark .card p {
  color: #8892a6;
}

/* --- Service Page --- */
.service-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.service-features li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  font-size: 1.0625rem;
  color: #4a4a68;
  border-bottom: 1px solid #f0f0f5;
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background-color: #00c9a7;
  border-radius: 50%;
}

.service-features li:last-child {
  border-bottom: none;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.pricing-card.highlight {
  border-color: #00c9a7;
  box-shadow: 0 0 0 2px #00c9a7;
  position: relative;
}

.pricing-card.highlight::before {
  content: 'Most Popular';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #00c9a7;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-card .pricing-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.25rem;
}

.pricing-card .pricing-desc {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.pricing-card .pricing-price {
  font-size: 3rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-card .pricing-period {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.pricing-card .pricing-features {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
  flex: 1;
  text-align: left;
}

.pricing-card .pricing-features li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9375rem;
  color: #4a4a68;
}

.pricing-card .pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: #00c9a7;
  border-radius: 50%;
}

.pricing-card .btn {
  width: 100%;
}

/* --- Blog --- */
.blog-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 2rem;
  transition: all 0.25s ease;
}

.blog-card:hover {
  border-color: #00c9a7;
  box-shadow: 0 8px 30px rgba(0, 201, 167, 0.08);
  transform: translateY(-2px);
}

.blog-card .blog-meta {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
}

.blog-card h3 {
  margin-bottom: 0.5rem;
}

.blog-card h3 a {
  color: #1a1a2e;
}

.blog-card h3 a:hover {
  color: #00c9a7;
}

.blog-card p {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 0;
}

/* Blog single */
.blog-post {
  max-width: 780px;
  margin: 0 auto;
}

.blog-post-meta {
  font-size: 0.9375rem;
  color: #6b7280;
  margin-bottom: 2rem;
  display: flex;
  gap: 1.5rem;
}

.blog-post-content {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.blog-post-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-content p {
  color: #4a4a68;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-post-content ul {
  list-style: disc;
}

.blog-post-content ol {
  list-style: decimal;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
  color: #4a4a68;
}

.blog-post-content code {
  background-color: #f5f7fa;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.blog-post-content pre {
  background-color: #0a1628;
  color: #e0e0e0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.blog-post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* --- Contact / Forms --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 1.0625rem;
}

.contact-info .contact-detail {
  margin-bottom: 1.5rem;
}

.contact-info .contact-detail strong {
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1a1a2e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #00c9a7;
  box-shadow: 0 0 0 3px rgba(0, 201, 167, 0.12);
}

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

/* --- Footer --- */
.footer {
  background-color: #0a1628;
  color: #8892a6;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand .nav-logo {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #8892a6;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: #8892a6;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: #00c9a7;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

/* --- CTA Section --- */
.cta-section {
  background-color: #0a1628;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 201, 167, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.cta-section h2 {
  color: #ffffff;
  margin-bottom: 1rem;
}

.cta-section p {
  color: #c0c8d8;
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* --- Content page (about, generic) --- */
.content-page {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.content-page h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content-page h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-page p {
  color: #4a4a68;
}

.content-page ul {
  margin-bottom: 1.5rem;
  padding-left: 0;
}

.content-page ul li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: #4a4a68;
}

.content-page ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: #00c9a7;
  border-radius: 50%;
}

.content-page strong {
  color: #1a1a2e;
}

/* --- Responsive Typography --- */
@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.25rem; }

  .hero {
    padding: 8rem 0 4rem;
  }

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

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

  .hero-sm {
    padding: 7rem 0 2.5rem;
  }

  .hero-sm h1 {
    font-size: 1.875rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}
