/* ==========================================================================
   TSG AI - Section-Specific Styles
   ========================================================================== */

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-4) 0;
  transition: background-color var(--duration-normal) ease,
              box-shadow var(--duration-normal) ease,
              padding var(--duration-normal) ease;
}

.nav--scrolled {
  background-color: var(--tsg-white);
  box-shadow: var(--shadow-nav);
  padding: var(--space-3) 0;
}

.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  position: relative;
  width: 160px;
  height: 40px;
  flex-shrink: 0;
}

.nav__logo-white,
.nav__logo-color {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity var(--duration-normal) ease;
}

.nav__logo-white {
  opacity: 1;
}

.nav__logo-color {
  opacity: 0;
}

.nav--scrolled .nav__logo-white {
  opacity: 0;
}

.nav--scrolled .nav__logo-color {
  opacity: 1;
}

.nav__links {
  display: none;
  gap: var(--space-8);
}

.nav__link {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--tsg-white);
  text-decoration: none;
  position: relative;
  padding: var(--space-2) 0;
  transition: color var(--duration-fast) ease;
}

.nav--scrolled .nav__link {
  color: var(--tsg-gray-700);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--tsg-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.nav__link:hover::after,
.nav__link--active::after {
  transform: scaleX(1);
}

.nav__link:hover {
  color: var(--tsg-white);
}

.nav--scrolled .nav__link:hover {
  color: var(--tsg-teal);
}

.nav__cta {
  display: none;
}

/* Hamburger */
.nav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  z-index: calc(var(--z-overlay) + 1);
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--tsg-white);
  border-radius: 2px;
  transition: transform var(--duration-normal) var(--ease-out-expo),
              opacity var(--duration-fast) ease,
              background-color var(--duration-fast) ease;
}

.nav--scrolled .nav__hamburger span {
  background: var(--tsg-black);
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.nav__overlay {
  position: fixed;
  inset: 0;
  background: var(--gradient-dark);
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-out-expo);
}

.nav__overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav__overlay .nav__link {
  font-size: var(--text-2xl);
  color: var(--tsg-white);
}

.nav__overlay .btn {
  margin-top: var(--space-4);
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-dark);
  padding-top: 80px;
}

.hero__container {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  width: 100%;
}

.hero__content {
  max-width: 100%;
}

.hero__eyebrow {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tsg-teal);
  margin-bottom: var(--space-6);
  display: block;
}

.hero__heading {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  color: var(--tsg-white);
  margin-bottom: var(--space-6);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

.hero__heading em {
  font-style: normal;
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subheading {
  font-size: var(--text-lg);
  font-weight: var(--weight-light);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  max-width: 520px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__visual svg {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* ---------- Problem Section ---------- */

.problem__quote {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--tsg-black);
  text-align: center;
  line-height: var(--leading-snug);
  margin-bottom: var(--space-8);
  position: relative;
}

.problem__quote::before {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--gradient-teal);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-8);
}

.problem__text {
  text-align: center;
  font-size: var(--text-lg);
  max-width: 700px;
  margin: 0 auto var(--space-12);
  color: var(--tsg-gray-600);
  line-height: var(--leading-relaxed);
}

.problem__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.problem__source {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--tsg-gray-500);
  font-style: italic;
  margin-top: var(--space-8);
}

/* ---------- Stats Section ---------- */

.stats__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

/* ---------- Services Section ---------- */

.services__pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.services__details {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.services__connector {
  display: none;
  text-align: center;
  margin: var(--space-8) 0;
  color: var(--tsg-gray-400);
}

.services__connector svg {
  width: 24px;
  height: 40px;
}

/* ---------- Framework Section ---------- */

.framework {
  overflow: hidden;
}

.framework__timeline {
  position: relative;
  padding-left: var(--space-12);
}

/* Vertical timeline for mobile */
.framework__line-vertical {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--tsg-gray-200);
}

.framework__line-vertical-fill {
  width: 100%;
  height: 0;
  background: var(--gradient-teal);
  border-radius: var(--radius-full);
  transition: height 2s var(--ease-out-expo);
}

.framework--visible .framework__line-vertical-fill {
  height: 100%;
}

/* Horizontal line - hidden on mobile */
.framework__line-horizontal {
  display: none;
}

.framework__stages {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.framework__stage {
  position: relative;
}

.framework__node {
  position: absolute;
  left: calc(-1 * var(--space-12) + 8px);
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tsg-white);
  border: 3px solid var(--tsg-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--tsg-teal);
  z-index: var(--z-base);
}

.framework__stage-number {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--tsg-teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.framework__stage-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.framework__stage-text {
  font-size: var(--text-base);
  color: var(--tsg-gray-600);
  line-height: var(--leading-relaxed);
}

/* ---------- Social Proof / Testimonials ---------- */

.logo-carousel {
  overflow: hidden;
  position: relative;
  padding: var(--space-10) 0;
  margin-bottom: var(--space-12);
}

.logo-carousel::before,
.logo-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.logo-carousel::before {
  left: 0;
  background: linear-gradient(to right, var(--tsg-white), transparent);
}

.logo-carousel::after {
  right: 0;
  background: linear-gradient(to left, var(--tsg-white), transparent);
}

.logo-carousel__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  opacity: 0.5;
  filter: grayscale(100%);
  transition: opacity var(--duration-normal) ease, filter var(--duration-normal) ease;
}

.logo-carousel__item:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.logo-carousel__item svg {
  height: 100%;
  width: auto;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* ---------- Contact Section ---------- */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}

.contact__heading {
  font-size: var(--text-3xl);
  color: var(--tsg-white);
  margin-bottom: var(--space-4);
}

.contact__text {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.contact__note {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.contact__form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.contact__form .form-group label {
  color: var(--tsg-white);
}

.contact__form .form-group input,
.contact__form .form-group select {
  background: rgba(255, 255, 255, 0.95);
  border-color: transparent;
}

.contact__success {
  text-align: center;
  padding: var(--space-10);
  display: none;
}

.contact__success.active {
  display: block;
}

.contact__success h3 {
  color: var(--tsg-white);
  margin-bottom: var(--space-3);
}

.contact__success p {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Footer ---------- */

.footer {
  background: var(--tsg-gray-900);
  color: var(--tsg-white);
  padding-top: var(--space-16);
  padding-bottom: var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer__logo {
  width: 150px;
  margin-bottom: var(--space-4);
}

.footer__tagline {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-light);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-4);
}

.footer__brand p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: var(--leading-relaxed);
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__nav-heading {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tsg-teal);
  margin-bottom: var(--space-2);
}

.footer__nav a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--duration-fast) ease;
}

.footer__nav a:hover {
  color: var(--tsg-white);
}

.footer__contact p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}

.footer__contact a {
  color: rgba(255, 255, 255, 0.7);
}

.footer__contact a:hover {
  color: var(--tsg-teal);
}

.footer__social {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--tsg-white);
  transition: background var(--duration-fast) ease;
}

.footer__social a:hover {
  background: var(--tsg-teal);
}

.footer__social svg {
  width: 18px;
  height: 18px;
}

.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
}

.footer__legal p {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}

.footer__legal a {
  color: rgba(255, 255, 255, 0.5);
}

.footer__legal a:hover {
  color: var(--tsg-teal);
}

/* ---------- Discovery Page ---------- */

.discovery {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: var(--space-16);
}

.discovery__container {
  max-width: 640px;
  margin: 0 auto;
}

.discovery__header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.discovery__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.discovery__subtitle {
  font-size: var(--text-lg);
  color: var(--tsg-gray-600);
}

/* Progress Steps */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-10);
  gap: 0;
}

.progress-steps__step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.progress-steps__circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--tsg-gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--tsg-gray-400);
  transition: all var(--duration-normal) var(--ease-out-expo);
  flex-shrink: 0;
}

.progress-steps__step--active .progress-steps__circle {
  background: var(--tsg-teal);
  border-color: var(--tsg-teal);
  color: var(--tsg-white);
}

.progress-steps__step--completed .progress-steps__circle {
  background: var(--tsg-teal);
  border-color: var(--tsg-teal);
  color: var(--tsg-white);
}

.progress-steps__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--tsg-gray-400);
  display: none;
}

.progress-steps__step--active .progress-steps__label {
  color: var(--tsg-teal);
}

.progress-steps__step--completed .progress-steps__label {
  color: var(--tsg-teal);
}

.progress-steps__connector {
  width: 60px;
  height: 2px;
  background: var(--tsg-gray-200);
  margin: 0 var(--space-2);
  flex-shrink: 0;
}

.progress-steps__step--completed + .progress-steps__connector,
.progress-steps__connector--filled {
  background: var(--tsg-teal);
}

/* Form Card */
.discovery__form-card {
  background: var(--tsg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  box-shadow: var(--shadow-lg);
}

.form-step__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-6);
}

.form-step__actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* Discovery success */
.discovery__success {
  text-align: center;
  padding: var(--space-10);
  display: none;
}

.discovery__success.active {
  display: block;
}

.discovery__success h2 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
}

.discovery__success p {
  color: var(--tsg-gray-600);
  margin-bottom: var(--space-6);
}
