/* ============================================
   ALGOYA GmbH — Professional Website Styles
   ============================================ */

/* --- Custom Logo Font --- */
@font-face {
  font-family: 'AlgoyaLogo';
  src: url('font.woff2') format('woff2'),
       url('font.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1528;
  --bg-card: #111a2e;
  --accent-green: #00e68a;
  --accent-green-dim: rgba(0, 230, 138, 0.15);
  --accent-blue: #4a8eff;
  --accent-blue-dim: rgba(74, 142, 255, 0.1);
  --text-heading: #e0f7ff;
  --text-body: #c8d6e5;
  --text-muted: #8899aa;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 230, 138, 0.3);
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container-max: 1200px;
  --header-height: 72px;
}

/* --- Page Load Animation --- */
.page-loading {
  opacity: 0;
}

body {
  transition: opacity 0.8s ease;
  opacity: 1;
}

/* --- Scroll Progress Bar --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  z-index: 1100;
  transition: width 0.1s linear;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-green);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #33ffaa;
}

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

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

/* --- Section Divider --- */
.section-divider {
  max-width: 800px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), var(--accent-blue-dim), transparent);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 36px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--accent-green);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #33ffaa;
  color: var(--bg-primary);
  box-shadow: 0 0 24px rgba(0, 230, 138, 0.35);
  transform: translateY(-1px);
}

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

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

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'AlgoyaLogo', var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--accent-green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo:hover {
  color: #33ffaa;
}

.logo-img {
  height: 44px;
  width: auto;
  display: inline-block;
}

.main-nav {
  display: flex;
  gap: 36px;
}

.main-nav a {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-body);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-green);
  transition: width 0.3s ease;
}

.main-nav a:hover {
  color: var(--text-heading);
}

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

.main-nav a.active {
  color: var(--accent-green);
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-body);
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 230, 138, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(74, 142, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 10% 70%, rgba(0, 230, 138, 0.04) 0%, transparent 50%),
    var(--bg-primary);
  animation: heroShift 12s ease-in-out infinite alternate;
}

@keyframes heroShift {
  0% {
    background-position: 0% 0%;
    filter: hue-rotate(0deg);
  }
  100% {
    background-position: 100% 100%;
    filter: hue-rotate(10deg);
  }
}

/* Subtle grid overlay */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Bottom gradient fade */
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
}

/* Hero trading chart background */
.hero-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.hero-chart svg {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 3px;
  line-height: 1.3;
  color: var(--text-heading);
  text-shadow: 0 0 60px rgba(0, 230, 138, 0.15);
}

/* Hero word-by-word reveal */
.hero-reveal .reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}

.hero-reveal.revealed .reveal-word {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============================================
   INTRO
   ============================================ */
.intro {
  padding: 100px 0;
  text-align: center;
}

.intro-text {
  max-width: 800px;
  margin: 0 auto 48px;
}

.intro-text p {
  font-size: 1.2rem;
  margin-bottom: 24px;
  color: var(--text-body);
}

.intro-text p:first-child {
  font-size: 1.35rem;
  color: var(--text-heading);
  font-weight: 500;
}

/* ============================================
   STATS COUNTER STRIP
   ============================================ */
.stats-strip {
  padding: 60px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

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

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: 60px;
  text-transform: uppercase;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-green);
  border-radius: 6px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
  border-left-color: var(--accent-green);
}

.service-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.service-card-header h3 {
  margin-bottom: 0;
}

.service-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

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

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-green);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.service-list,
.service-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-list li {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-body);
}

.service-sublist {
  margin-top: 2px;
}

.service-sublist li {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.service-sublist li::before {
  content: '\00B7';
  position: absolute;
  left: 6px;
  color: var(--text-muted);
  font-size: 1.4rem;
}

/* ============================================
   WHO WE ARE
   ============================================ */
.who-we-are {
  padding: 100px 0;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 48px;
}

.about-text p {
  font-size: 1.15rem;
  margin-bottom: 20px;
  color: var(--text-body);
}

.about-text p:last-child {
  margin-bottom: 0;
}

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

/* About section visual */
.about-visual {
  width: 100%;
  max-width: 380px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-visual:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 230, 138, 0.06);
}

.about-visual svg {
  width: 100%;
  height: auto;
  display: block;
}

.about-text-continued {
  margin-bottom: 32px;
}

.about-text-continued p {
  font-size: 1.15rem;
  margin-bottom: 20px;
  color: var(--text-body);
}

.about-text-continued p:last-child {
  margin-bottom: 0;
}

.about-closing {
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-heading);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 32px;
}

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

/* ============================================
   ACHIEVEMENTS
   ============================================ */
.achievements {
  padding: 100px 0;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 40px 32px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

/* Achievement icons */
.achievement-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}

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

.achievement-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-green);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.achievement-card p {
  font-size: 1.05rem;
  color: var(--text-body);
  line-height: 1.8;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  padding: 100px 0;
}

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

.contact-form {
  max-width: 680px;
  margin: 0 auto;
}

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

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-heading);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px var(--accent-green-dim);
}

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

.contact-form .btn {
  width: 100%;
  padding: 16px;
  font-size: 0.95rem;
}

/* ============================================
   TECH STACK
   ============================================ */
.tech-stack {
  padding: 100px 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 230, 138, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tech-item svg {
  width: 48px;
  height: 48px;
}

.tech-item span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-accent);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent-green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(0, 230, 138, 0.12);
  box-shadow: 0 0 20px rgba(0, 230, 138, 0.15);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer-brand .logo {
  font-size: 1.6rem;
}

.footer-info p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-align: right;
}

.footer-info a {
  color: var(--text-body);
}

.footer-info a:hover {
  color: var(--accent-green);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

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

  .about-image {
    order: -1;
  }

  .about-visual {
    max-width: 280px;
  }

  .achievements-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

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

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --header-height: 60px;
  }

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(10, 14, 26, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 999;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav a {
    font-size: 1.1rem;
  }

  .hero-content h1 {
    font-size: clamp(1.4rem, 6vw, 2rem);
    letter-spacing: 2px;
  }

  .intro {
    padding: 60px 0;
  }

  .services,
  .who-we-are,
  .achievements,
  .contact {
    padding: 60px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

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

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-info p {
    text-align: center;
  }

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

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

  .tech-stack {
    padding: 60px 0;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}
