/* base typography and global behavior */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #363636;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga' 1, 'kern' 1;
}

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

/* Modern Typography */
.title {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.subtitle {
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.button {
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.65;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 4px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 100;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  font-weight: 600;
  position: relative;
  z-index: 101;
  min-width: 50px;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 1);
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-text {
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
}

/* Hide text-only element by default (but not buttons) */
[data-lang]:not(.lang-btn) {
  display: none !important;
}

[data-lang].active:not(.lang-btn) {
  display: inline !important;
}

/* For block-level translated content */
[data-lang].active.block-content {
  display: block !important;
}

/* Language buttons should always be visible */
.lang-btn[data-lang] {
  display: flex !important;
}

/* primary color overrides for Bulma */

.has-text-primary {
  color: #425b72 !important;
}

.is-primary,
.is-primary:link,
.is-primary:visited {
  background: rgba(66, 91, 114, 0.6) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15),
              inset 0 1px 1px rgba(255, 255, 255, 0.3),
              inset 0 -1px 1px rgba(0, 0, 0, 0.1) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.is-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.is-primary:hover::before {
  left: 100%;
}

.is-primary:hover,
.is-primary:focus,
.is-primary:active {
  background: rgba(66, 91, 114, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.4),
              inset 0 -1px 1px rgba(0, 0, 0, 0.1) !important;
}

.is-primary span,
.is-primary .icon {
  position: relative;
  z-index: 1;
}

.is-primary.is-light {
  background: rgba(232, 249, 246, 0.6) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  color: #584294 !important;
  border: 1px solid rgba(88, 66, 148, 0.3) !important;
  box-shadow: 0 8px 32px rgba(88, 66, 148, 0.1),
              inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
}

.is-primary.is-light:hover {
  background: rgba(219, 212, 236, 0.7) !important;
  transform: translateY(-2px);
}

.is-primary.is-light:focus,
.is-primary.is-light:active {
  background: rgba(205, 197, 228, 0.8) !important;
  outline: none !important;
}

/* General button glassmorphism */
.button {
  position: relative;
  overflow: hidden;
}

.button span,
.button .icon {
  position: relative;
  z-index: 1;
}

/* hero video and overlay */

#home-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  z-index: -3;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(34, 38, 39, 0.6);
  z-index: -2;
}

/* special primary hero button */

.special-button {
  background: rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.3),
              inset 0 -1px 1px rgba(0, 0, 0, 0.1) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.special-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.special-button:hover::before {
  left: 100%;
}

.special-button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
              inset 0 1px 1px rgba(255, 255, 255, 0.4),
              inset 0 -1px 1px rgba(0, 0, 0, 0.1) !important;
}

/* rotating hero messages */

.hero-messages {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
}

.msg-wrapper {
  /* reserved if you want wrappers later */
}

.msg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  text-align: center;
}

/* scroll section offsets for fixed navbar */

.scroll-margin-top-section {
  scroll-margin-top: 92px;
}

/* responsive scroll margin adjustments */

@media screen and (max-width: 768px) {
  .main-title-mobile-fit {
    height: 164px;
  }

  .scroll-margin-top-section {
    scroll-margin-top: 108px;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .scroll-margin-top-section {
    scroll-margin-top: 108px;
  }
}

@media screen and (min-width: 1024px) {
  .timeline-container {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* hero text animations */

.fadeInOut {
  animation: fadeInOut 4s ease-in-out forwards;
}

@keyframes fadeInOut {
  0% {
    opacity: 0;
    display: none;
  }
  10% {
    opacity: 1;
    display: block;
  }
  50% {
    opacity: 1;
    display: block;
  }
  90% {
    opacity: 0;
    display: none;
  }
  100% {
    opacity: 0;
    display: none;
  }
}

.scaleInOut {
  animation: scaleInOut 4s ease-in-out forwards;
  animation-delay: 4s;
}

@keyframes scaleInOut {
  0% {
    opacity: 0;
    display: none;
  }
  10% {
    opacity: 1;
    display: block;
  }
  50% {
    opacity: 1;
    display: block;
  }
  90% {
    opacity: 0;
    display: none;
  }
  100% {
    opacity: 0;
    display: none;
  }
}

.slideInOut {
  animation: slideInOut 4s ease-in-out forwards;
  animation-delay: 8s;
}

@keyframes slideInOut {
  0% {
    opacity: 0;
    display: none;
  }
  10% {
    opacity: 1;
    display: block;
  }
  50% {
    opacity: 1;
    display: block;
  }
  90% {
    opacity: 1;
    display: block;
  }
  100% {
    opacity: 1;
    display: block;
  }
}

/* timeline container and dashed path */

.timeline-container {
  position: relative;
  padding-top: 2rem;
  padding-bottom: 2rem;
  z-index: 10;
}

.timeline-svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 2000px;
  z-index: 0;
  overflow: visible;
}

.timeline-path {
  fill: none;
  stroke: #9a9a9a;
  stroke-width: 2;
  stroke-dasharray: 5, 5;
}

/* circular images in the timeline */

.timeline-container img {
  border-radius: 50% !important;
}

/* step fade in for timeline elements */

.fade-step {
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 1;
}

.fade-step.visible {
  opacity: 1;
}

/* scroll hint at bottom of hero */

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  z-index: 5;
  color: #ffffff;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-hint-text {
  font-weight: 500;
}

.scroll-hint-line {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.7);
  position: relative;
  overflow: hidden;
}

.scroll-hint-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: #ffffff;
  transform: translateY(-100%);
  animation: scrollHintMove 1.6s infinite;
}

@keyframes scrollHintMove {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  20% {
    transform: translateY(0);
    opacity: 1;
  }
  80% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

.scroll-hint--hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
}

/* scroll progress indicator on the right */

.scroll-progress {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 120px;
  z-index: 20;
  pointer-events: none;
}

.scroll-progress-track {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(66, 91, 114, 0.2);
  overflow: hidden;
}

.scroll-progress-bar {
  width: 100%;
  height: 100%;
  transform-origin: bottom center;
  transform: scaleY(0);
  background: linear-gradient(to top, #425b72, #ffffff);
  transition: transform 0.2s ease-out;
}

/* adjust scroll indicator on small screens */

@media screen and (max-width: 768px) {
  .scroll-progress {
    right: 0.75rem;
    height: 80px;
  }
}

/* reduced motion preferences:
   show content without animation if the user prefers less motion */

@media (prefers-reduced-motion: reduce) {
  .fade-step {
    transition: none;
    opacity: 1 !important;
  }

  .msg {
    animation: none !important;
    opacity: 1;
  }

  .scroll-hint-line::after {
    animation: none;
    opacity: 0;
  }
}
