/* =============================================
   QIJI Energy — Design System
   ============================================= */

:root {
  --color-primary: #0047BB;
  --color-primary-dark: #003694;
  --color-accent: #8BC53F;
  --color-accent-dark: #6fa030;
  --color-dark: #0A1628;
  --color-dark-soft: #1a2d4a;
  --color-light: #F5F7FA;
  --color-white: #ffffff;
  --color-gray-100: #e8edf3;
  --color-gray-300: #b0bec5;
  --color-gray-500: #607d8b;
  --color-gray-700: #37474f;

  --font-heading: "DM Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.08);
  --shadow-md: 0 8px 32px rgba(10, 22, 40, 0.12);
  --shadow-lg: 0 16px 48px rgba(10, 22, 40, 0.16);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --navbar-height: 72px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-gray-700);
  background: var(--color-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =============================================
   Navbar
   ============================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-height);
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.navbar--scrolled {
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar__logo-main {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.navbar__logo-sub {
  font-size: 0.7rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.navbar__nav {
  display: flex;
  gap: 2rem;
}

.navbar__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition);
}

.navbar__nav a:hover {
  color: var(--color-accent);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  transition: background var(--transition);
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lang-toggle__option--active {
  color: var(--color-accent);
}

.lang-toggle__separator {
  opacity: 0.4;
}

.navbar__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.navbar__menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: transform var(--transition), opacity var(--transition);
}

.navbar__menu-btn--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__menu-btn--open span:nth-child(2) {
  opacity: 0;
}

.navbar__menu-btn--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   Hero
   ============================================= */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__carousel {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero__slide--active {
  opacity: 1;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 22, 40, 0.88) 0%,
    rgba(10, 22, 40, 0.45) 50%,
    rgba(10, 22, 40, 0.25) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding-top: var(--navbar-height);
}

.hero__tagline {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-dark);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 197, 63, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.hero__badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem 2rem;
  backdrop-filter: blur(8px);
}

.hero__badge-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.hero__badge-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: -0.25rem;
}

.hero__badge-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.hero__controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero__arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero__dots {
  display: flex;
  gap: 0.5rem;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.hero__dot--active {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* =============================================
   Sections — Shared
   ============================================= */

.section {
  padding: 6rem 0;
}

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--color-dark);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section__desc {
  font-size: 1.05rem;
  color: var(--color-gray-500);
  max-width: 640px;
  margin: 0 auto;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   Swap Demo
   ============================================= */

.swap-demo {
  background: var(--color-white);
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.swap-demo__media {
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-100);
}

.swap-demo__media img {
  width: 100%;
  height: auto;
  display: block;
}

.swap-demo__media figcaption {
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--color-gray-500);
  text-align: center;
  background: var(--color-light);
  border-top: 1px solid var(--color-gray-100);
}

/* =============================================
   About
   ============================================= */

.about {
  background: var(--color-light);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-gray-700);
}

.about__list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about__list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.about__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.about__list strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-dark);
  margin-bottom: 0.25rem;
}

.about__list span {
  font-size: 0.9rem;
  color: var(--color-gray-500);
}

/* =============================================
   Solution Cards
   ============================================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-100);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.card__icon svg {
  width: 100%;
  height: 100%;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.card__text {
  font-size: 0.9rem;
  color: var(--color-gray-500);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.card__features li {
  font-size: 0.85rem;
  color: var(--color-gray-700);
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.card__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* =============================================
   Stats
   ============================================= */

.stats {
  background: var(--color-dark);
  padding: 4rem 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat {
  text-align: center;
  color: var(--color-white);
}

.stat__value {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  display: block;
}

.stat__value--range {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
}

.stat__unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  display: block;
  margin-top: 0.15rem;
}

.stat__label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =============================================
   How It Works — Timeline
   ============================================= */

.how-it-works {
  background: var(--color-light);
}

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
}

.timeline__step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.timeline__step:last-child {
  margin-bottom: 0;
}

.timeline__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.timeline__content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.timeline__content p {
  font-size: 0.95rem;
  color: var(--color-gray-500);
  line-height: 1.7;
}

.highlight-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--color-white);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  max-width: 700px;
  margin: 0 auto;
}

.highlight-box__icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.highlight-box h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.highlight-box p {
  font-size: 0.9rem;
  color: var(--color-gray-500);
  line-height: 1.7;
}

/* =============================================
   Benefits
   ============================================= */

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.benefit {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.benefit:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.benefit__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  color: var(--color-primary);
}

.benefit__icon svg {
  width: 100%;
  height: 100%;
}

.benefit h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.benefit p {
  font-size: 0.9rem;
  color: var(--color-gray-500);
  line-height: 1.7;
}

/* =============================================
   Network
   ============================================= */

.network {
  background: var(--color-light);
  position: relative;
  overflow: hidden;
}

.network__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.network__card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--color-gray-100);
  transition: transform var(--transition), box-shadow var(--transition);
}

.network__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.network__card--featured {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, rgba(0, 71, 187, 0.04), rgba(139, 197, 63, 0.06));
}

.network__year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  background: rgba(0, 71, 187, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.network__card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.network__card p {
  font-size: 0.9rem;
  color: var(--color-gray-500);
  line-height: 1.7;
}

/* Stylized network map */
.network__visual {
  position: relative;
  height: 200px;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.5;
}

.network__line {
  position: absolute;
  background: var(--color-primary);
  opacity: 0.3;
}

.network__line--h1 { top: 30%; left: 10%; right: 10%; height: 2px; }
.network__line--h2 { top: 55%; left: 5%; right: 15%; height: 2px; }
.network__line--h3 { top: 75%; left: 15%; right: 5%; height: 2px; }
.network__line--v1 { left: 25%; top: 15%; bottom: 15%; width: 2px; }
.network__line--v2 { left: 55%; top: 10%; bottom: 20%; width: 2px; }

.network__node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(139, 197, 63, 0.5);
}

.network__node--1 { top: 28%; left: 23%; }
.network__node--2 { top: 53%; left: 53%; }
.network__node--3 { top: 73%; left: 73%; }
.network__node--4 { top: 28%; left: 73%; }
.network__node--5 { top: 53%; left: 23%; }

/* =============================================
   Footer
   ============================================= */

.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  display: block;
  margin-bottom: 0.75rem;
}

.footer__brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 400px;
}

.footer__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefits__grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .navbar__nav {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: rgba(10, 22, 40, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .navbar__nav--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .navbar__menu-btn {
    display: flex;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .network__grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
  }

  .hero__controls {
    bottom: 1.5rem;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .hero__badge {
    padding: 0.75rem 1.5rem;
  }

  .hero__badge-value {
    font-size: 2rem;
  }
}
