:root {
  --cb-green: #29c96b;
  --cb-green-soft: #74f0a7;
  --cb-dark: #050b08;
  --cb-dark-soft: #0d1712;
  --cb-panel: rgba(7, 18, 14, 0.8);
  --cb-text: #f4f7f3;
  --cb-muted: #b7c2bb;
  --cb-border: rgba(255, 255, 255, 0.12);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.24);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  overflow-x: hidden;
  height: 100%;
}

body {
  margin: 0;
  background: var(--cb-dark);
  color: var(--cb-text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 3.2rem;
  min-height: 100%;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  height: 100vh;
  overflow: visible;
  background: var(--cb-dark);
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(135deg, rgba(5, 11, 8, 0.95), rgba(5, 11, 8, 0.2)), url('../img/new/LogoNuovoCB.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0.1;
}

.page-shell > * {
  position: relative;
  z-index: 1;
}

body.open {
  overflow: hidden;
}

a {
  text-decoration: none;
}

#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, rgba(4, 10, 8, 0.95), rgba(4, 10, 8, 0.35));
  backdrop-filter: blur(16px);
}

#nav.scrolled-down {
  background: rgba(4, 10, 8, 0.9);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  border-bottom: 1px solid rgba(116, 240, 167, 0.14);
}

#nav .container.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#nav .menu-items {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

#nav .menu {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

#nav .menu-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

#nav .burger {
  display: none;
}

#nav .kochibi-pop {
  background: transparent;
  border: 0;
  padding: 0;
}

#nav #KochibiTalk {
  width: 52px;
  height: auto;
  padding: 0;
}

.menu a {
  color: var(--cb-text);
  opacity: 0.96;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.menu a:hover {
  color: var(--cb-green-soft);
  background: rgba(116, 240, 167, 0.08);
}

.menu-right a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
}

.menu-right a:hover {
  background: rgba(116, 240, 167, 0.16);
}

.section {
  position: relative;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  background: var(--cb-dark);
}

.section > .container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(5, 11, 8, 1) 0%, rgba(11, 24, 18, 1) 100%);
}

.section::before {
  content: none;
}

.section > .container,
.section > .hero-content {
  position: relative;
  z-index: 1;
}

.hero-section {
  min-height: 100svh;
  padding: 0;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(5, 11, 8, 0.95), rgba(5, 11, 8, 0.2)), url('../img/new/LogoNuovoCB.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(116, 240, 167, 0.16), transparent 45%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: min(100%, 900px);
  padding: 42px 24px 72px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--cb-green-soft);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.4rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.hero-slogan-stack {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin: 1.2rem 0 1.5rem;
}

.hero-slogan-layer {
  display: inline-block;
  font-size: clamp(1.45rem, 3.2vw, 2.35rem);
  font-weight: 600;
  opacity: 0;
  transform: translateY(18px);
  transition: all 0.6s ease;
}

.hero-slogan-layer.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-slogan-layer.is-final {
  color: var(--cb-green-soft);
}

.hero-copy {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--cb-muted);
  max-width: 720px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--cb-green), var(--cb-green-soft));
  color: #031009;
  box-shadow: 0 14px 36px rgba(41, 201, 107, 0.24);
}

.btn.secondary {
  border: 1px solid var(--cb-border);
  color: var(--cb-text);
  background: rgba(255, 255, 255, 0.04);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  margin-bottom: 1rem;
}

.section-heading p {
  color: var(--cb-muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.panel,
.project-card,
.cta-card {
  background: var(--cb-panel);
  border: 1px solid var(--cb-border);
  border-radius: 24px;
  padding: 1.4rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.panel h3,
.project-card h3,
.cta-card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}

.panel p,
.project-card p,
.cta-card p,
.project-card strong {
  color: var(--cb-muted);
  line-height: 1.7;
  margin: 0;
}

.panel-list {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0;
  display: grid;
  gap: 0.55rem;
  color: var(--cb-muted);
}

.panel-list li::before {
  content: '•';
  color: var(--cb-green-soft);
  margin-right: 0.45rem;
}

.project-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card strong {
  color: var(--cb-green-soft);
}

.project-card .tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--cb-green-soft);
  margin-bottom: 0.6rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mystery-block {
  background: linear-gradient(135deg, rgba(5, 11, 8, 0.95), rgba(5, 11, 8, 0.2)), url('../img/new/LogoNuovoCB.png') center/cover;
  border-radius: 32px;
  padding: 3rem;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--cb-border);
}

.mystery-block p {
  color: var(--cb-muted);
  max-width: 620px;
  line-height: 1.8;
}

.cta-card {
  background: linear-gradient(135deg, rgba(41, 201, 107, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(116, 240, 167, 0.25);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--cb-border);
  color: var(--cb-text);
  background: rgba(255, 255, 255, 0.04);
}

.social-link:hover {
  border-color: rgba(116, 240, 167, 0.4);
  color: var(--cb-green-soft);
}

.go-panel {
  padding: 1.6rem;
}

.go-layout {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.go-visual {
  flex: 0 0 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(116, 240, 167, 0.18);
}

.go-visual img {
  width: 100%;
  max-width: 180px;
  height: auto;
  display: block;
}

.go-copy {
  flex: 1;
}

.footer-dark {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #07110d 0%, #030806 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3.5rem 1rem 5rem;
  color: var(--cb-text);
}

.footer-dark .row {
  margin-bottom: 1rem;
}

.footer-dark .socialCard {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.footer-dark .socialContainer {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.footer-dark .socialContainer:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 240, 167, 0.28);
}

.section-footer {
  background: linear-gradient(180deg, rgba(5, 11, 8, 1) 0%, rgba(8, 17, 13, 1) 100%);
}

.footer-shell {
  align-items: center;
  text-align: center;
  gap: 1.2rem;
}

.footer-social-grid {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.footer-social-grid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  color: var(--cb-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-section {
  display: flex;
  align-items: center;
}

.pp-section {
  position: absolute !important;
  height: 100% !important;
  width: 100% !important;
  backface-visibility: hidden !important;
}

.pp-section.pp-table {
  display: table !important;
}

.pp-tableCell {
  display: table-cell !important;
  vertical-align: middle !important;
  width: 100% !important;
  height: 100% !important;
}

.footer-social-grid a:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 240, 167, 0.32);
  color: var(--cb-green-soft);
}

.footer-note {
  margin: 0;
  color: var(--cb-muted);
}

.footer-dark-fixed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(90deg, rgba(3, 8, 6, 0.97), rgba(8, 22, 16, 0.95));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 0;
  color: var(--cb-text);
  cursor: pointer;
}

.footer-dark-fixed.is-visible,
.footer-dark-fixed.scrolled-down {
  transform: translateY(0);
  opacity: 1;
}

.footer-dark-fixed:hover,
.footer-dark-fixed.is-hovered {
  box-shadow: 0 -12px 30px rgba(41, 201, 107, 0.14);
  border-color: rgba(116, 240, 167, 0.24);
}

.footer-dark-fixed::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(116, 240, 167, 0.16), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.footer-dark-fixed:hover::before,
.footer-dark-fixed.is-hovered::before {
  transform: translateX(100%);
}

.footer-dark-fixed .copyright {
  margin: 0;
  color: var(--cb-muted);
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.footer-dark-fixed .copyright strong {
  color: var(--cb-green-soft);
  font-weight: 700;
}

.footer-dark-fixed:focus-visible {
  outline: 2px solid var(--cb-green-soft);
  outline-offset: 2px;
}

#tothetopFloat {
  right: 1.2rem;
  bottom: 1.2rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cb-green), var(--cb-green-soft));
  box-shadow: 0 16px 35px rgba(41, 201, 107, 0.24);
}

#tothetopFloat img {
  width: 8vh;
  max-width: 56px;
}

@media (max-width: 992px) {
  .panel-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .mystery-block {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  html {
    scroll-snap-type: none;
  }

  #nav .container.flex {
    flex-wrap: wrap;
  }

  #nav .menu-items {
    display: none;
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.7rem;
  }

  body.open #nav .menu-items {
    display: flex;
  }

  #nav .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  #nav .burger {
    display: block;
  }

  .section {
    min-height: auto;
    padding: 100px 0;
  }

  .hero-section {
    min-height: 100svh;
  }

  .hero-content {
    padding: 84px 18px 64px;
  }

  .hero-slogan-stack {
    min-height: 112px;
  }

  .menu-left {
    display: none;
  }

  .menu-right {
    margin-left: auto;
  }

  .social-links {
    flex-direction: column;
    align-items: flex-start;
  }
}
