/* ============================================
   FORTURIO — Stylesheet
   Adapted from Vibesoft design system
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--white);
  background-color: var(--deep-blue);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Custom Properties (Forturio palette) --- */
:root {
  --deep-blue: #01395E;
  --deep-blue-rgb: 1, 57, 94;
  --mid-blue: #01518E;
  --mid-blue-rgb: 1, 81, 142;
  --light-cyan: #8DCEFF;
  --light-cyan-rgb: 141, 206, 255;
  --white: #F8FAFC;
  --white-rgb: 248, 250, 252;
  --soft-gray: #9CB8D0;
  --soft-gray-light: #C5DCF0;
  --light-bg: #EFF6FC;
  --light-bg-alt: #D6E8F5;
  --slate: #023A5F;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-dark-hover: rgba(255, 255, 255, 0.15);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-bg-hover: rgba(255, 255, 255, 0.06);
  --nav-height: 72px;
  --section-padding: 120px;
  --container-max: 1200px;
  --container-padding: 24px;
}

@media (min-width: 768px) {
  :root {
    --container-padding: 48px;
  }
}

@media (min-width: 1024px) {
  :root {
    --container-padding: 80px;
    --section-padding: 140px;
  }
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
}

.section-light h1,
.section-light h2,
.section-light h3,
.section-light h4 {
  color: var(--deep-blue);
}

.section-light {
  color: var(--slate);
}

h1 { font-size: clamp(2.25rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: clamp(1.0625rem, 2vw, 1.25rem); }

p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--soft-gray);
}

.section-light p {
  color: #3A5F7C;
}

a {
  color: var(--light-cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #fff;
}

strong { font-weight: 600; }

code, .mono {
  font-family: 'JetBrains Mono', monospace;
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-dark {
  background-color: var(--deep-blue);
}

.section-mid {
  background-color: var(--slate);
}

.section-light {
  background-color: var(--light-bg);
}

/* --- Section Labels --- */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--light-cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: block;
  text-align: left;
}

.section-light .section-label {
  color: var(--mid-blue);
}

.section-title {
  margin-bottom: 20px;
  max-width: 720px;
}

.section-subtitle {
  font-size: 1.25rem;
  max-width: 640px;
  margin-bottom: 60px;
  line-height: 1.6;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--mid-blue), var(--light-cyan));
  color: #fff;
  box-shadow: 0 4px 20px rgba(var(--mid-blue-rgb), 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(var(--mid-blue-rgb), 0.5);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--soft-gray-light);
  border: 1px solid var(--border-dark-hover);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.section-light .btn-secondary {
  color: var(--slate);
  border-color: var(--light-bg-alt);
}

.section-light .btn-secondary:hover {
  background: var(--light-bg-alt);
  color: var(--deep-blue);
}

.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.3s ease;
  background: transparent;
}

.nav.scrolled {
  background: rgba(var(--deep-blue-rgb), 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dark);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0;
}

.nav-logo svg {
  height: 28px;
  width: auto;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 32px;
  align-items: center;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-size: 0.9375rem;
  color: var(--soft-gray);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-cta {
  display: none;
}

@media (min-width: 1024px) {
  .nav-cta {
    display: inline-flex;
  }
}

.nav-cta .btn {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
}

.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--soft-gray);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.lang-btn:hover {
  color: var(--white);
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--mid-blue), var(--light-cyan));
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--mid-blue-rgb), 0.3);
}

.lang-switch-mobile {
  margin-bottom: 16px;
  align-self: flex-start;
}

@media (max-width: 1023px) {
  .nav-inner .lang-switch {
    margin-right: 8px;
  }
}

/* Mobile toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(var(--deep-blue-rgb), 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: 100px 32px 40px;
  flex-direction: column;
  gap: 8px;
}

.nav-mobile.active {
  display: flex;
}

.nav-mobile a {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--soft-gray);
  text-decoration: none;
  padding: 12px 0;
  transition: color 0.2s ease;
  border-bottom: 1px solid var(--border-dark);
}

.nav-mobile a:hover { color: var(--white); }

.nav-mobile .btn {
  margin-top: 24px;
  text-align: center;
  justify-content: center;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(var(--white-rgb), 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--deep-blue), transparent);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
  }
}

.hero-content {
  max-width: 580px;
}

.hero-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--light-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  display: block;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--light-cyan), #B8E2FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--soft-gray);
  margin-bottom: 40px;
  max-width: 500px;
  line-height: 1.7;
}

.hero-microcopy {
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--soft-gray);
}

/* Hero visual — logo grid animation */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: none;
  max-width: 420px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  width: 280px;
  perspective: 500px;
}

.hero-grid-cell {
  aspect-ratio: 1;
  border-radius: 14px;
  transition: filter 0.3s ease, box-shadow 0.6s ease;
  will-change: transform;
}

.hero-grid-cell.white {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-grid-cell.empty {
  background: transparent;
  border: none;
}

.hero-grid-cell.blue {
  background: rgba(var(--mid-blue-rgb), 0.5);
  border: 1px solid rgba(var(--light-cyan-rgb), 0.3);
  box-shadow: 0 0 35px rgba(var(--light-cyan-rgb), 0.12);
}

.hero-grid-cell:hover {
  filter: brightness(1.15);
}

.hero-grid-cell.blue:hover {
  box-shadow: 0 0 50px rgba(var(--light-cyan-rgb), 0.22);
}

/* Orbiting labels */
.hero-visual .orbit-label {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  color: var(--soft-gray);
  background: var(--slate);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-dark);
  white-space: nowrap;
  will-change: transform;
  transition: transform 0.15s ease;
}

.orbit-label-1 { top: 8%; left: 5%; animation: labelPulse 4s ease-in-out infinite; }
.orbit-label-2 { top: 15%; right: 2%; animation: labelPulse 4s ease-in-out 1.5s infinite; }
.orbit-label-3 { bottom: 20%; left: 0; animation: labelPulse 4s ease-in-out 3s infinite; }
.orbit-label-4 { bottom: 8%; right: 5%; animation: labelPulse 4s ease-in-out 2s infinite; }

@keyframes labelPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ============================================
   CLIENTS BAR
   ============================================ */
.clients {
  padding: 80px 0;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.clients-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 32px 40px;
  margin-top: 40px;
}

.client-logo {
  height: 40px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.client-logo.revealed {
  opacity: 0.45;
  transform: translateY(0);
}

.client-logo.revealed:hover {
  opacity: 0.8;
}

.client-logo-wide {
  height: 48px;
  max-width: 200px;
}

@media (max-width: 600px) {
  .clients-logos {
    gap: 28px 36px;
  }
  .client-logo {
    height: 28px;
  }
}

/* ============================================
   CARDS
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  padding: 36px;
  border-radius: 14px;
  border: 1px solid var(--border-dark);
  background: var(--card-bg);
  transition: transform 0.25s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--light-cyan-rgb), 0.1), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: var(--border-dark-hover);
}

.section-light .card {
  background: #fff;
  border-color: var(--light-bg-alt);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.section-light .card:hover {
  border-color: #B8D4EA;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(var(--light-cyan-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--light-cyan);
}

.section-light .card-icon {
  background: rgba(var(--mid-blue-rgb), 0.08);
  color: var(--mid-blue);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1.375rem;
}

.card h4,
.card .card-subtitle {
  font-weight: 500;
  color: var(--light-cyan);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.4;
  font-family: 'Satoshi', 'Inter', sans-serif;
}

.section-light .card h4,
.section-light .card .card-subtitle {
  color: var(--mid-blue);
}

.card p {
  font-size: 1rem;
  line-height: 1.7;
}

.card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--light-cyan);
  transition: gap 0.2s ease;
}

.card .card-link:hover {
  gap: 10px;
}

.section-light .card .card-link {
  color: var(--mid-blue);
}

/* ============================================
   STATEMENT SECTION
   ============================================ */

/* ============================================
   VIBESOFT SECTION (featured project)
   ============================================ */
.vibesoft-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}

@media (min-width: 1024px) {
  .vibesoft-feature {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
  }
}

.vibesoft-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--light-cyan);
  background: rgba(var(--light-cyan-rgb), 0.08);
  border: 1px solid rgba(var(--light-cyan-rgb), 0.15);
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.vibesoft-visual {
  position: relative;
  padding: 40px;
}

.vibesoft-points {
  list-style: none;
  margin-top: 24px;
}

.vibesoft-points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--soft-gray-light);
}

.section-light .vibesoft-points li {
  color: #3A5F7C;
}

.vibesoft-points .point-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(var(--light-cyan-rgb), 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  color: var(--light-cyan);
}

.section-light .vibesoft-points .point-icon {
  background: rgba(var(--mid-blue-rgb), 0.08);
  color: var(--mid-blue);
}

.vibesoft-points .point-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info h3 {
  margin-bottom: 16px;
}

.contact-info p {
  margin-bottom: 0;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-details li {
  font-size: 1rem;
  color: var(--soft-gray);
  padding: 0 0 16px 0;
  line-height: 1.5;
}

.contact-details li strong {
  color: var(--white);
  display: block;
  margin-bottom: 2px;
}

.section-light .contact-details li strong {
  color: var(--deep-blue);
}

.contact-details li a {
  color: var(--light-cyan);
  font-weight: 500;
}

.section-light .contact-details li a {
  color: var(--mid-blue);
}

/* ============================================
   CTA FOOTER
   ============================================ */
.cta-footer {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-footer::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(var(--light-cyan-rgb), 0.06), transparent 70%);
  pointer-events: none;
}

.cta-footer h2,
.cta-footer .section-subtitle,
.cta-footer .btn,
.cta-footer .cta-contact {
  position: relative;
  z-index: 1;
}

.cta-footer .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.cta-contact {
  margin-top: 40px;
  font-size: 0.9375rem;
  color: var(--soft-gray);
}

.cta-contact a {
  color: var(--soft-gray-light);
  font-weight: 500;
}

.cta-contact span {
  margin: 0 12px;
  color: var(--border-dark-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border-dark);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--soft-gray);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--soft-gray);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1023px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 60px;
  }
  section {
    padding: 80px 0;
  }
}

@media (max-width: 639px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  section { padding: 64px 0; }
  .card { padding: 28px; }
  .btn-group {
    flex-direction: column;
  }
  .btn-group .btn {
    justify-content: center;
  }
}

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.section-title.text-center,
.section-subtitle.text-center {
  margin-left: auto;
  margin-right: auto;
}

::selection {
  background: rgba(var(--light-cyan-rgb), 0.3);
  color: var(--white);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--deep-blue); }
::-webkit-scrollbar-thumb { background: var(--slate); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--soft-gray); }
