/* ============================================================
   HydrOpTop — main.css
   Layout, hero, carousel, ticker, lang switcher
   ============================================================ */

:root {
  --bg-1: #f4f7fb;
  --bg-2: #eaf2ff;
  --ink-1: #0f1b2d;
  --ink-2: #4a5a75;
  --accent-1: #14b8a6;
  --accent-2: #2563eb;
  --accent-3: #7c3aed;
  --accent-grad: linear-gradient(135deg, #14b8a6 0%, #2563eb 50%, #7c3aed 100%);
  --glass: rgba(255, 255, 255, 0.65);
  --shadow: 0 30px 60px -20px rgba(37, 99, 235, 0.35);
  --ticker-h: 38px;
  --lang-h: 36px;
}

/* ---------- Page background with soft radial wash ---------- */
body {
  background: var(--bg-1);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 95% 0%, rgba(124, 58, 237, 0.18) 0%, transparent 70%),
    radial-gradient(50% 40% at 100% 10%, rgba(20, 184, 166, 0.18) 0%, transparent 70%);
}

body > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   News ticker (top strip)
   ============================================================ */
.topbar {
  position: relative;
  z-index: 50;
  height: var(--ticker-h);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 27, 45, 0.06);
  overflow: hidden;
  transition: transform 0.35s ease;
}

.topbar.is-hidden {
  transform: translateY(calc(-1 * var(--ticker-h)));
}

.news-container {
  position: relative;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.news-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--ink-1);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  text-align: center;
  padding: 0 1rem;
}

.news-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.news-item strong {
  color: var(--accent-2);
  margin-right: 0.4em;
  font-weight: 600;
}

.news-item[data-lang] {
  display: none;
}

.news-item[data-lang].is-active {
  display: flex;
}

/* ============================================================
   Language switcher
   ============================================================ */
.lang-bar {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang-bar a {
  padding: 0.1rem 0.3rem;
  color: var(--ink-2);
  font-weight: 600;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.lang-bar a:hover {
  color: var(--ink-1);
}

.lang-bar a.is-active {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.lang-bar .lang-sep {
  color: rgba(15, 27, 45, 0.25);
}

/* ============================================================
   Hero section
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--ticker-h) + 2rem) 0 2rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  align-items: center;
}

/* ---------- Text column ---------- */
.hero-text {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hero-text > * {
  margin: 0;
}

.hero-text h2 {
  margin-top: 0.5rem;
}

.kicker {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

h1 {
  margin-bottom: 1.25rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 1.125rem;
  color: var(--ink-2);
  margin-bottom: 1.75rem;
  max-width: 32em;
}

/* ---------- Construction badge ---------- */
.construction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: #0d7c70;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.construction-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.hero-text h2 {
  margin-bottom: 0.75rem;
  color: var(--ink-1);
}

.hero-text > p[data-i18n="aboutBody"] {
  margin-bottom: 1.5rem;
  color: var(--ink-2);
  font-size: 1rem;
}

.highlights {
  list-style: none;
  margin: 0 0 1.75rem;
}

.highlights li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.6rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.contact-line {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.contact-line a {
  font-weight: 600;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  border-bottom: 1px dashed rgba(37, 99, 235, 0.4);
  transition: opacity 0.2s ease;
}

.contact-line a:hover {
  opacity: 0.7;
}

/* ============================================================
   Carousel
   ============================================================ */
.hero-carousel {
  position: relative;
  border-radius: 20px;
  padding: 3px;
  background: var(--accent-grad);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  max-width: 820px;
  width: 100%;
  justify-self: center;
  overflow: hidden;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.slide.is-active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.slide figcaption {
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  color: var(--ink-1);
  font-weight: 500;
  text-align: center;
  border-top: 1px solid rgba(15, 27, 45, 0.05);
}

.slide-nav {
  position: absolute;
  bottom: 56px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink-1);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 27, 45, 0.18);
  transition: transform 0.2s ease, background 0.2s ease;
}

.slide-nav:hover {
  transform: scale(1.08);
  background: #fff;
}

.slide-nav:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.slide-nav.prev { left: 12px; }
.slide-nav.next { right: 12px; }

.dots {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.75);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  transition: width 0.25s ease, background 0.25s ease;
}

.dot.is-active {
  width: 22px;
  background: var(--accent-grad);
  border-radius: 999px;
}

.dot:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-2);
  border-top: 1px solid rgba(15, 27, 45, 0.06);
  margin-top: 4rem;
  background: rgba(255, 255, 255, 0.4);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero {
    padding: calc(var(--ticker-h) + 2rem) 0 2rem;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 1.25rem;
  }

  .hero-text {
    order: 1;
    max-width: none;
  }

  .hero-carousel {
    order: 2;
  }

  .topbar {
    font-size: 0.8rem;
  }

  .news-container {
    padding: 0 0.5rem;
  }

  .news-item {
    font-size: 0.8rem;
    padding: 0 0.75rem;
  }

  h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .tagline { font-size: 1rem; }
}

@media (max-width: 480px) {
  .lang-bar {
    top: 50%;
    right: 0.5rem;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  .dots {
    bottom: 48px;
  }
}

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

  .construction-badge .dot {
    animation: none;
  }
}
