/* ============================================
   OBICS - Online Business Intelligence Consulting Service
   Stylesheet
   ============================================ */

/* ---- Custom Properties ---- */
:root {
  --bg-primary: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a28;
  --text-main: #e8e8f0;
  --text-muted: #9494b8;
  --accent-cyan: #00d4ff;
  --accent-purp: #7b2ff7;
  --gradient: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 100%);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.15);
  --shadow-glow-purple: 0 0 20px rgba(123, 47, 247, 0.15);
  --container-max: 1200px;
  --section-pad-y: 80px;
  --section-pad-x: 24px;
  --header-height: 72px;
  --transition-speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-speed);
}

ul { list-style: none; }

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

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

/* ---- Canvas Background ---- */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main, header, footer {
  position: relative;
  z-index: 1;
}

/* ---- Focus styles for accessibility ---- */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  border: none;
  text-align: center;
}

.btn-accent {
  background: var(--gradient);
  color: #0a0a0f;
}

.btn-accent:hover, .btn-accent:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover, .btn-outline:focus-visible {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.btn-lg {
  padding: 18px 42px;
  font-size: 1.05rem;
}

/* ---- Pulse animation for CTA ---- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
  50% { box-shadow: 0 0 30px 8px rgba(0, 212, 255, 0.2); }
}

.btn-pulse {
  animation: pulse-glow 3s infinite;
}

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  height: var(--header-height);
}

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

.logo {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width var(--transition-speed) ease;
}

.nav-link:hover, .nav-link:focus-visible {
  color: var(--text-main);
}

.nav-link:hover::after {
  width: 100%;
}

/* ---- Header Actions ---- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.lang-toggle:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ---- Hamburger Menu ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all var(--transition-speed) ease;
}

/* ---- Mobile Nav Overlay ---- */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  justify-content: center;
  align-items: center;
}

.mobile-nav-overlay.active {
  display: flex;
}

.mobile-nav-list {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-nav-list a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mobile-nav-list a:hover {
  color: var(--accent-cyan);
}

/* ---- Hero Section ---- */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-pad-y) var(--section-pad-x);
  position: relative;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

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

/* ---- Section Titles ---- */
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* ---- Section Spacing ---- */
.tag-cloud-section,
.trust-bar-section,
.services-section,
.process-section,
.use-cases-section,
.tech-stack-section,
.faq-section,
.final-cta-section,
.contact-section {
  padding: var(--section-pad-y) 0;
}

/* ---- Tag Cloud ---- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

.tag-item {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: default;
  transition: all var(--transition-speed) ease;
  user-select: none;
  white-space: nowrap;
  opacity: 0.7;
}

.tag-item:hover {
  transform: scale(1.3);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
  opacity: 1;
  z-index: 2;
}

/* ---- Tech Tags (static sizing) ---- */
.tech-tags .tag-item {
  font-size: 0.85rem;
  padding: 6px 16px;
  opacity: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tech-tags .tag-item:hover {
  transform: scale(1.1);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

/* ---- Trust Bar ---- */
.trust-bar-section {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.trust-bar-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-placeholder-logo {
  width: 120px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ---- Services Section (Cards Grid) ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card, .usecase-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  transition: all var(--transition-speed) ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.service-card:hover, .usecase-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: var(--shadow-glow-cyan), var(--shadow-card);
}

.card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.card-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-features li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.card-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

/* ---- Use Case Cards ---- */
.card-tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0, 212, 255, 0.1);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-radius: 999px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.usecase-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Process Section (Timeline) ---- */
.process-timeline {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.process-step {
  flex: 1;
  text-align: center;
  max-width: 280px;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
  margin-bottom: 20px;
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.process-connector {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
}

.process-connector::before {
  content: '→';
  font-size: 1.5rem;
  color: var(--text-muted);
  opacity: 0.3;
}

/* ---- FAQ Section ---- */
.faq-container {
  max-width: 800px;
}

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

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: border-color var(--transition-speed);
}

.faq-item.active {
  border-color: rgba(0, 212, 255, 0.3);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  user-select: none;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  text-align: left;
  font-family: var(--font-main);
  gap: 16px;
}

.faq-question:hover {
  color: var(--accent-cyan);
}

.faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform var(--transition-speed) ease;
  color: var(--text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ---- Final CTA Section ---- */
.final-cta-section {
  text-align: center;
  padding: 100px 0;
}

.final-cta-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.final-cta-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Contact Form Section ---- */
.contact-container {
  max-width: 680px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: border-color var(--transition-speed);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(148, 148, 184, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ff4757;
  box-shadow: 0 0 12px rgba(255, 71, 87, 0.2);
}

.form-error {
  font-size: 0.8rem;
  color: #ff4757;
  min-height: 1em;
}

.form-checkbox .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-checkbox .checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-cyan);
  flex-shrink: 0;
}

.form-success {
  text-align: center;
  padding: 24px;
  background: rgba(0, 212, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ---- Footer ---- */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: var(--section-pad-y);
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 16px;
  line-height: 1.6;
}

.footer-nav h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 4px;
}

.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient);
  transition: width var(--transition-speed) ease;
}

.footer-nav a:hover {
  color: var(--accent-cyan);
}

.footer-nav a:hover::after {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Legal Content Section ---- */
.legal-content-section {
  padding: var(--section-pad-y) 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.legal-text-block {
  margin-bottom: 36px;
}

.legal-heading {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.legal-subheading {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.legal-text-block p,
.legal-text-block ul {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.legal-text-block ul {
  padding-left: 24px;
  list-style: disc;
}

.legal-text-block ul li {
  margin-bottom: 8px;
}

.legal-text-block a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* ---- Fade-in Animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #neural-canvas { display: none; }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .btn-pulse { animation: none; }

  .tag-item:hover {
    transform: none;
  }

  .service-card:hover,
  .usecase-card:hover {
    transform: none;
  }
}

/* ---- Tablet (≤ 1024px) ---- */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-timeline {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .process-connector {
    padding-top: 0;
    transform: rotate(90deg);
  }

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

/* ---- Mobile (≤ 768px) ---- */
@media (max-width: 768px) {
  :root {
    --section-pad-y: 56px;
    --section-pad-x: 16px;
  }

  .nav-list, .btn-cta-header, .lang-toggle {
    display: none;
  }

  .hamburger {
    display: flex;
  }

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

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

  .hero-subtitle {
    font-size: 0.95rem;
  }

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

  .hero-ctas .btn {
    width: 100%;
    max-width: 320px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .trust-logos {
    gap: 24px;
  }

  .trust-placeholder-logo {
    width: 80px;
    height: 36px;
  }

  .usecase-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .section-title,
  .final-cta-title {
    font-size: 1.8rem;
  }

  .step-number {
    font-size: 2.4rem;
  }
}

/* ---- Small Mobile (≤ 480px) ---- */
@media (max-width: 480px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--section-pad-y) + var(--header-height));
  }

  .tag-item {
    font-size: 0.7rem;
    padding: 6px 14px;
  }

  .service-card,
  .usecase-card {
    padding: 24px;
  }

  .card-title {
    font-size: 1.15rem;
  }
}
