:root {
  --color-primary-bg: #02120e;
  --color-secondary-bg: #1c473c;
  --color-accent-light: #8fbfb3;
  --color-accent-dark: #0b3a2e;
  --color-accent-mid: #5c8a7e;
  --header-height: 70px;
}

html,
body {
  height: 100%
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--color-primary-bg);
  color: var(--color-accent-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: var(--header-height);
}

/* Header always on top */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000;
}

.navbar {
  background: var(--color-secondary-bg);
  color: var(--color-accent-light);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  min-height: var(--header-height);
}

.logo {
  font-weight: bold;
  padding: 1rem 0;
}

.logo img {
  height: 40px;
  width: auto;
}

.language-select {
  margin-left: auto;
}

.language-select select {
  background: transparent;
  color: var(--color-accent-light);
  border: 1px solid var(--color-accent-light);
  padding: .25rem;
}

.auth {
  margin-left: 1rem;
  display: flex;
  align-items: center;
}

#connect-wallet {
  min-width: 180px;
  height: 2.5rem;
}

#account {
  margin-left: .5rem;
}

.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: 1rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--color-accent-light);
  margin-bottom: 4px;
}

.menu {
  list-style: none;
  margin-left: 1rem;
  display: flex;
}

.menu li {
  position: relative;
  margin: 0 .5rem;
}

.menu a {
  color: var(--color-accent-light);
  text-decoration: none;
  white-space: nowrap;
}

/* Desktop dropdown */
.menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-accent-light);
  border-radius: 10px;
  padding: .5rem 0;
  min-width: 220px;
  z-index: 6000;
  /* above hero/content */
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
  display: none;
}

.menu li.open>ul {
  display: block;
}

@media(hover:hover) {
  .menu li:hover>ul {
    display: block;
  }
}

.menu li ul li {
  padding: .5rem 1rem;
}

.menu li ul li:hover {
  background: var(--color-accent-mid);
}

/* ===== Mobile: ≤980px ===== */
@media (max-width:980px) {
  .hamburger {
    display: flex;
  }

  .menu {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: .5rem;
    width: clamp(240px, 85vw, 360px);
    background: var(--color-secondary-bg);
    padding: 1rem;
    border-radius: 12px;
    display: none;
    z-index: 5500;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
  }

  .menu li {
    margin: 0;
    width: 100%;
    padding: .5rem .25rem;
  }

  .menu li>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .menu li>ul {
    position: static !important;
    display: none;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: .35rem 0 0 0;
    width: 100%;
  }

  .menu li.open>ul {
    display: block;
  }

  .menu li ul li {
    padding: .4rem 1rem;
    white-space: normal;
  }

  .menu-toggle:checked+.hamburger+.menu {
    display: flex;
  }
}

/* CTA right */
.menu li.cta {
  margin-left: auto;
}

.navbar .menu li.cta>a.cta-nav {
  display: inline-block;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .1px;
  padding: .40rem .80rem;
  border-radius: 12px;
  border: 1px solid #ffffffbf;
  background-image: linear-gradient(180deg, #b9dcd4, #a9d6cc);
  background-color: var(--color-accent-light);
  color: #0b2b24;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.navbar .menu li.cta>a.cta-nav:hover {
  filter: brightness(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .24);
  transform: translateY(-1px);
}

.navbar .menu a:hover:not(.cta-nav) {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}

.navbar .menu a:focus-visible {
  outline: 2px solid var(--color-accent-light);
  outline-offset: 2px;
}

/* Layout containers */
main,
.container {
  flex: 1 0 auto;
  padding: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
}

.databox {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .05);
  font-size: 1rem;
}

/* Hero (explicitly not sticky, no z-index) */
.hero-box {
  background: #eef6f6;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
  text-align: center;
  position: static;
  z-index: auto;
}

.hero-box h1 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.hero-box p {
  font-size: 1.1rem;
  color: #4a4a4a;
  max-width: 600px;
  margin: auto;
}

/* Sections */
.light-section {
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
  max-width: 1000px;
  margin: auto;
}

footer {
  background: var(--color-accent-dark);
  color: var(--color-accent-light);
  padding: 1rem;
  text-align: center;
  margin-top: auto;
}