/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.75rem;
  --hue: 208;
  --first-color: hsl(208, 86%, 31%);
  --first-color-alt: hsl(209, 61%, 65%);
  --third-color: hsl(207, 71%, 84%);
  --first-color-lighten: hsl(var(--hue), 24%, 92%);
  --title-color: hsl(0deg 0% 12.94%);
  --text-color: hsl(0deg 0% 25.88%);
  --text-color-light: hsl(var(--hue), 4%, 55%);
  --body-color: hsl(0deg 0% 100%);
  --container-color: hsl(0deg 0% 93.33%);
  --display-font: "neue-haas-grotesk-display", sans-serif;
  --normal-font-size: 0.938rem;
  --h2-font-size: 1.25rem;
  --font-medium: 400;
  --font-semi-bold: 700;
  --mb-0-5: 0.5rem;
  --mb-1: 1rem;
  --mb-2-5: 2.5rem;
  --z-tooltip: 10;
  --z-fixed: 100;
}

body.dark-theme {
  --title-color: hsl(var(--hue), 4%, 95%);
  --text-color: hsl(var(--hue), 4%, 75%);
  --body-color: hsl(var(--hue), 8%, 12%);
  --container-color: hsl(var(--hue), 8%, 16%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-bottom: 3rem; /* 👈 Ensures fixed headers & safe scroll into view space */
}

body {
  font-family: var(--display-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  margin-top: var(--header-height);
  transition: 0.4s;
}

body,
.header,
.section,
.footer,
.about__section-text,
.energy-stage,
.loader {
  transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

html,
body {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

h1,
h2 {
  color: var(--title-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  z-index: var(--z-fixed);
  transition: 0.4s;
}

body.dark-theme .header {
  background-color: rgba(16, 16, 16, 0.8);
}

.nav {
  height: calc(var(--header-height) + 1rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-weight: var(--font-semi-bold);
  font-size: var(--normal-font-size);
  display: flex;
  align-items: center;
}

.beta__version {
  padding-left: 5px;
  font-weight: var(--font-medium);
}

.nav__btns {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.change-theme {
  font-size: 1.15rem;
  padding: 1rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.change-theme:hover {
  background-color: var(--first-color-alt);
  color: var(--title-color);
}

/*=============== MENU ===============*/

.menu-toggle {
  display: inline-flex;
  font-size: 1.7rem;
  cursor: pointer;
  user-select: none;
  padding: 0.75rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.05);
}

.menu-toggle:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.1);
}

.menu-toggle i {
  pointer-events: none;
}

.nav__menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: var(--body-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  /* pointer-events: none; */
}

.nav__list {
  list-style: none;
  padding: 0;
}

.nav__item {
  font-size: 1.5rem;
  font-weight: var(--font-semi-bold);
  margin: 1rem 0;
  color: var(--title-color);
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav__item:hover {
  color: var(--first-color-alt);
  transform: scale(1.05);
}

/* @media screen and (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav__menu {
    display: none;
  }

  .nav__btns a.nav__link {
    display: inline-block;
    margin-left: 1.5rem;
  }
} */

#nav-overlay {
  transition: opacity 0.4s ease;
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.35);
}

/* menu end */

.section {
  padding: 0.75rem 0 1rem;
}

.container {
  max-width: 968px;
  margin-inline: auto;
  padding-inline: var(--mb-0-5);
}

.main {
  overflow: hidden;
}

.section-divider {
  width: 80%;
  margin: 2rem auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--first-color),
    transparent
  );
  opacity: 0.5;
}

.steps__bg {
  background-color: var(--container-color);
  border-radius: 1rem;
  margin-top: 5rem;
  padding: 3rem 0.5rem;
}

.svg-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: var(--svg-spacing);
  padding-bottom: var(--svg-spacing);
}

.svg-wrapper svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 600px;
  transform-origin: center center;
  margin: 0 auto;
  overflow: visible;
}

.svg-wrapper path {
  stroke: var(--first-color);
  stroke-width: 2;
  filter: drop-shadow(0 0 2px var(--first-color));
  transition: filter 0.4s ease;
}

body.dark-theme .svg-wrapper path {
  filter: drop-shadow(0 0 4px var(--first-color-alt));
}

.chat__wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.steps__container {
  height: calc(var(--vh, 1vh) * 100);
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 4rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#customgpt_chat {
  height: 100vh !important;
  pointer-events: auto !important;
  touch-action: pan-y !important;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cgptcb-embed-chat-box-container {
  height: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
}

.cgptcb-chat-box-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-padding-bottom: 6rem;
}

.cgptcb-chat-box-body::-webkit-scrollbar {
  display: none !important;
}

.chat__wrapper,
#customgpt_chat {
  background-color: var(--container-color);
  border-radius: 1.25rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

body.dark-theme .chat__wrapper {
  background-color: hsl(var(--hue), 8%, 18%);
}

div#cgptcb-embed-chat-box-header.cgptcb-embed-chat-box-header {
  background-color: var(--container-color) !important;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}

button#cgptcb-embed-chat-box-reset.cgptcb-embed-chat-box-reset {
  background-color: var(--container-color) !important;
  color: var(--text-color) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}

div#cgptcb-embed-chat-box-header.cgptcb-embed-chat-box-header,
button#cgptcb-embed-chat-box-reset.cgptcb-embed-chat-box-reset {
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

input,
textarea,
select {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.footer {
  text-align: center;
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--text-color-light);
  margin: 2rem 0 1rem;
}

.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -30%;
  display: inline-flex;
  padding: 0.5rem;
  background-color: var(--third-color);
  color: var(--first-color);
  border-radius: 0.25rem;
  z-index: var(--z-tooltip);
  transition: 0.4s;
}

.scrollup__icon {
  font-size: 1rem;
}

.scrollup:hover {
  background-color: var(--first-color-alt);
  opacity: 1;
}

.show-scroll {
  bottom: 3rem;
}

@media screen and (min-width: 992px) {
  .section {
    padding: 4rem 0 1rem;
  }
  .steps__bg {
    padding: 3.5rem 2.5rem;
  }
}

.about__section-text {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
  font-size: 1.075rem;
  line-height: 1.8;
  color: var(--text-color);
  font-weight: 400;
  transition: color 0.3s ease;
}

.about__section-text em {
  font-style: italic;
  font-weight: 500;
  color: var(--first-color);
}

body.dark-theme .about__section-text em {
  color: var(--first-color-alt);
}

.about__section-text p {
  margin: 1.75rem 0;
}

.about__section-text .about__break {
  margin-top: 2.25rem;
}

.about__list {
  margin: 1rem 0 2rem 1.5rem;
  padding-left: 1rem;
  list-style-type: disc;
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.7;
}

.about__list li::marker {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.about__list li:hover::marker {
  transform: scale(1.2);
  color: var(--first-color-alt);
}

.about__blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--first-color);
  background-color: var(--first-color-lighten);
  color: var(--text-color);
  font-style: italic;
  font-weight: 500;
  border-radius: 0.75rem;
  font-size: 1rem;
  line-height: 1.75;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-theme .about__blockquote {
  background-color: hsl(var(--hue), 16%, 20%);
  color: var(--text-color);
  border-left-color: var(--first-color-alt);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.about__blockquote:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
  transition: all 0.4s ease;
}

.about__section-subtitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  color: var(--first-color);
  transition: color 0.3s ease;
}

body.dark-theme .about__section-subtitle {
  color: var(--first-color-alt);
}

.section__title {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: var(--mb-2-5);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
}

.section__title em {
  color: var(--first-color);
}

body.dark-theme .section__title em {
  color: var(--first-color-alt);
}

/* ENERGY LOOP */

.energy-loop {
  padding: 4rem 1.25rem;
  margin-top: 4rem;
  background: var(--body-color);
}

.energy-loop__wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 768px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .energy-loop__wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

.energy-stage {
  background: var(--container-color);
  border-radius: 1rem;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  opacity: 0;
  transform: translateY(50px);
}

.energy-stage__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block; /* ADD THIS */
  transform-origin: center; /* Smoother scaling */
}

.energy-stage__icon:hover {
  transform: scale(1.15);
  transition: transform 0.4s ease;
}

.energy-stage__title {
  font-size: 1.25rem;
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  margin-bottom: 0.75rem;
}

.energy-stage__desc {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.6;
}

body.dark-theme .energy-stage {
  background: hsl(var(--hue), 8%, 18%);
}

/*=============== LOADER ===============*/
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--body-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.loader__spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--first-color-lighten);
  border-top: 4px solid var(--first-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader__text {
  margin-top: 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  opacity: 0.8;
  animation: fadeIn 1s ease 0.5s forwards;
  letter-spacing: 0.02em;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.loader__dots {
  display: inline-block;
  margin-left: 0.25rem;
}

.loader__dots span {
  display: inline-block;
  font-weight: bold;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(0.25rem);
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loader__dots span:nth-child(1) {
  animation-delay: 0s;
}
.loader__dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loader__dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    opacity: 0;
    transform: translateY(0.25rem);
  }
  40% {
    opacity: 1;
    transform: translateY(0);
  }
}

/*=============== APPLE-CALIBER BUTTON ===============*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: #fff;
  font-weight: var(--font-semi-bold);
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: 0.85rem;
  transition: all 0.35s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1),
    inset 0 0 0 0 var(--first-color-lighten);
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2),
    inset 0 0 14px var(--first-color-lighten);
}

.button:active {
  transform: translateY(0px) scale(0.96);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25),
    inset 0 0 8px var(--first-color-alt);
}

/*=============== ENERGY PULSE SURVEY (APPLE POLISH) ===============*/
#energy-pulse {
  margin-top: 4rem;
  position: relative;
  z-index: 1;
  padding: 0.75rem 1.25rem;
}

.energy-pulse__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.energy-pulse__question {
  border: none;
  padding: 0.5rem 0;
}

.energy-pulse__question legend {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--title-color);
  line-height: 1.5;
}

.energy-pulse__scale-help {
  display: block;
  font-size: 0.875rem;
  color: var(--text-color-light);
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
  opacity: 0.85;
}

.energy-pulse__scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.energy-pulse__scale label {
  position: relative;
  flex: 1 1 4rem;
  min-width: 3.5rem;
  padding: 0.85rem 0.5rem;
  text-align: center;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 1rem;
  background: var(--container-color);
  color: var(--text-color);
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.energy-pulse__scale label span {
  display: block;
  font-size: 1.125rem;
}

.energy-pulse__scale input {
  display: none;
}

.energy-pulse__scale label.selected {
  background-color: var(--first-color);
  color: #fff;
  border-color: var(--first-color);
  box-shadow: 0 0 0 2px var(--first-color-alt);
  transform: scale(1.07);
  transition: all 0.25s ease;
}

.energy-pulse__scale label:hover {
  transform: scale(1.05);
  border-color: var(--first-color-alt);
}

.energy-pulse__scale label:active {
  transform: scale(0.97);
}

.energy-pulse__tracker {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  opacity: 0;
  pointer-events: none;
}

.energy-pulse__tracker-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--title-color);
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: -0.01em;
}

.energy-pulse__bar {
  background: var(--first-color-lighten);
  border-radius: 999px;
  overflow: hidden;
  height: 3.5rem;
  display: flex;
  align-items: center; /* 💯 vertically centers label + fill */
  position: relative;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.energy-pulse__bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.6s ease-in-out;
  background-image: linear-gradient(
    135deg,
    var(--first-color) 0%,
    var(--first-color-alt) 100%
  );
  background-size: 200% auto;
  animation: energyPulseBarFill 3s ease-in-out infinite;
  border-radius: 999px;
}

@keyframes energyPulseBarFill {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

.energy-pulse__label {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--body-color);
  z-index: 1;
  line-height: 1.25;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* 👈 pin to left inside bar */
  justify-content: center;
  padding: 0.25rem 0;
  width: 90%; /* 👈 ensures label never overflows */
}

.energy-pulse__label small {
  font-weight: 400;
  font-size: 0.95rem;
  opacity: 0.88;
  display: block;
  margin-top: 0.15rem;
  line-height: 1;
}

.energy-pulse__bar.total {
  background: var(--container-color);
  border: 2px dashed var(--first-color-alt);
}

.energy-pulse__bar.total .energy-pulse__label {
  color: var(--title-color) !important;
  font-weight: 800;
  opacity: 0.95;
}

.dark-theme .energy-pulse__bar.total .energy-pulse__label {
  color: #ffffff !important;
}

.energy-pulse__note {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--title-color);
  max-width: 90%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 1s forwards 1.5s;
  letter-spacing: 0.01em;
  /* margin-bottom: 3rem;  */
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.energy-pulse__note .sub {
  font-size: 1.35rem;
  color: var(--body-color);
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--first-color-alt),
    var(--first-color)
  );
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  margin-top: 0.75rem;
  display: inline-block;
  transition: all 0.3s ease;
}

.copy-button {
  background: none;
  border: none;
  font-size: 1.35rem;
  margin-top: 0.65rem;
  margin-left: 0.65rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease;
  vertical-align: middle;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
}

.copy-button:hover {
  transform: scale(1.2);
  background-color: var(--first-color-lighten);
  color: var(--first-color);
}

.copy-button:disabled {
  opacity: 0.6;
  pointer-events: none;
  transform: none;
}

.copy-button.copied {
  color: var(--first-color-alt);
  font-weight: 700;
  transform: scale(1.1);
}

body.dark-theme .copy-button {
  color: var(--first-color-alt);
}

/* THEME-SPECIFIC ADJUSTMENTS */
.dark-theme .energy-pulse__scale label {
  background-color: hsl(var(--hue), 8%, 20%);
  color: var(--text-color-light);
}

.dark-theme .energy-pulse__bar {
  background-color: hsl(var(--hue), 8%, 26%);
}

.dark-theme .energy-pulse__bar-fill {
  background-image: linear-gradient(
    135deg,
    var(--first-color-alt) 0%,
    var(--first-color) 100%
  );
}

.hidden {
  display: none !important;
}

.energy-pulse__bar-fill-wrapper {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 999px;
}

.energy-pulse__flash {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: -1rem;
  padding: 0 1.5rem;
  color: var(--first-color);
  animation: fadeInUp 1s forwards 0.5s;
}

.dark-theme .energy-pulse__flash {
  color: var(--first-color-alt);
}

#energyResults:not(.hidden) {
  display: flex !important;
  opacity: 1 !important;
}
