/* ============================================================
   COMPONENTS.CSS — TrueTap
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    transform var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

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

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background-color: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}

.btn--primary:hover {
  background-color: var(--text-main);
  border-color: var(--accent-green);
  box-shadow: 0 0 0 1px var(--accent-green);
  color: var(--bg-main);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--line-medium);
}

.btn--secondary:hover {
  border-color: var(--accent-green);
  color: var(--text-main);
  background-color: rgba(22, 22, 22, 0.02);
}

.btn--ghost {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--line-medium);
}

.btn--ghost:hover {
  border-color: var(--accent-green);
}

.btn--accent {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--line-medium);
}

.btn--accent:hover {
  border-color: var(--accent-green);
  color: var(--text-main);
}

.btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 1.0625rem 2.125rem;
  font-size: var(--text-sm);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  background-color: var(--bg-elevated);
}

.badge--green {
  background-color: var(--accent-green-soft);
  border-color: var(--accent-green-mid);
  color: #0d4d32;
}

.card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  box-shadow: var(--shadow-whisper);
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.card:hover {
  border-color: var(--line-medium);
  background-color: var(--bg-white);
}

.card--flat {
  box-shadow: none;
  background-color: rgba(250, 248, 245, 0.5);
}

.card--flat:hover {
  background-color: var(--bg-white);
}

.card--editorial {
  padding: var(--space-12);
}

.card__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-green-soft);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
}

.card__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-green);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
  color: var(--text-main);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-snug);
}

.card__body {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: var(--leading-loose);
  max-width: 100%;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--text-main);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.card__link:hover {
  gap: var(--space-3);
  color: var(--accent-green);
}

.card__link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.step__number {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--line-soft);
  line-height: 1;
  margin-bottom: var(--space-5);
  letter-spacing: var(--tracking-tight);
}

.step__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
  color: var(--text-main);
  margin-bottom: var(--space-4);
}

.step__body {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: var(--leading-loose);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
}

.feature-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.feature-item__icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-item__text {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: var(--leading-normal);
}

.feature-item__text strong {
  display: block;
  font-weight: var(--weight-semi);
  color: var(--text-main);
  margin-bottom: var(--space-1);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-10);
}

.stat {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--line-medium);
}

.stat__value {
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: var(--text-main);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  margin-bottom: var(--space-3);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-soft);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(243, 239, 232, 0.92);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
  background-color: rgba(243, 239, 232, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav__logo img {
  height: 32px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav__link {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--text-main);
  background-color: rgba(22, 22, 22, 0.04);
}

.nav__link.is-active {
  color: var(--text-main);
  font-weight: var(--weight-semi);
}

.nav__cta {
  flex-shrink: 0;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--text-main);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-main);
  padding: var(--space-8) var(--space-8) var(--space-12);
  overflow-y: auto;
  z-index: 99;
  flex-direction: column;
  gap: var(--space-2);
  border-top: 1px solid var(--line-soft);
}

.nav__mobile.is-open {
  display: flex;
}

.nav__mobile-link {
  padding: var(--space-5) var(--space-2);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--text-soft);
  border-bottom: 1px solid var(--line-soft);
  transition: color var(--transition-fast);
}

.nav__mobile-link:hover {
  color: var(--text-main);
}

.nav__mobile-cta {
  margin-top: var(--space-8);
}

@media (max-width: 1024px) {
  .nav__links {
    display: none;
  }
  .nav__cta {
    display: none;
  }
  .nav__toggle {
    display: flex;
  }
}

.site-footer {
  background-color: var(--bg-section-alt);
  border-top: 1px solid var(--line-soft);
  padding: var(--space-20) 0 var(--space-10);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid var(--line-soft);
}

.footer__brand p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-5);
  max-width: 32ch;
  line-height: var(--leading-loose);
}

.footer__logo {
  height: 28px;
  width: auto;
}

.footer__col-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: var(--space-6);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-main);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-10);
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__legal a:hover {
  color: var(--text-main);
}

@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.problem-editorial {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 880px;
}

.problem-editorial__item {
  padding: var(--space-10) 0;
  border-bottom: 1px solid var(--line-soft);
}

.problem-editorial__item:first-child {
  padding-top: 0;
}

.problem-editorial__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.problem-editorial__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.problem-editorial__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
  color: var(--text-main);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.problem-editorial__body {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: var(--leading-loose);
  max-width: 62ch;
}

.wizard {
  background-color: var(--bg-elevated);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 4vw, var(--space-16));
  box-shadow: var(--shadow-whisper);
  max-width: 840px;
  margin: 0 auto;
}

.wizard__progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-12);
}

.wizard__step-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
}

.wizard__step-indicator:last-child {
  flex: 0;
}

.wizard__dot {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  background-color: var(--bg-main);
  color: var(--text-muted);
  border: 1.5px solid var(--line-medium);
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
  flex-shrink: 0;
}

.wizard__dot.is-active {
  background-color: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}

.wizard__dot.is-done {
  background-color: var(--bg-section-alt);
  color: var(--text-main);
  border-color: var(--text-main);
}

.wizard__step-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  display: none;
}

@media (min-width: 480px) {
  .wizard__step-label {
    display: block;
  }
}

.wizard__line {
  flex: 1;
  height: 1px;
  background-color: var(--line-soft);
  margin: 0 var(--space-3);
}

.wizard__pane {
  display: none;
}

.wizard__pane.is-active {
  display: block;
}

.wizard__question {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: var(--weight-semi);
  color: var(--text-main);
  margin-bottom: var(--space-10);
  letter-spacing: var(--tracking-snug);
  line-height: var(--leading-snug);
}

.wizard__options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

.wizard__option {
  padding: var(--space-6) var(--space-5);
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius-md);
  background-color: var(--bg-main);
  cursor: pointer;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base);
  text-align: left;
  min-height: 5.5rem;
}

.wizard__option:hover {
  border-color: var(--line-medium);
  background-color: var(--bg-white);
}

.wizard__option.is-selected {
  border-color: var(--accent-green);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 1px var(--accent-green);
}

.wizard__option-label {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--text-main);
  display: block;
}

.wizard__option-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
  display: block;
  line-height: var(--leading-snug);
}

.wizard__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.wizard__nav .btn {
  min-height: 3.25rem;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

.wizard__result {
  padding: var(--space-10);
  background-color: var(--bg-main);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
}

.wizard__result-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.wizard__result-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semi);
  color: var(--text-main);
  margin-bottom: var(--space-4);
}

.wizard__result-body {
  font-size: var(--text-base);
  color: var(--text-soft);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-8);
  max-width: 100%;
}

.nfc-visual {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.nfc-visual__bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background-color: var(--bg-deep);
  border: 1px solid var(--line-soft);
}

.nfc-visual__pulse {
  position: absolute;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--accent-green-mid);
  animation: nfc-pulse 2.5s var(--ease-out-expo) infinite;
  pointer-events: none;
}

.nfc-visual__pulse:nth-child(2) { animation-delay: 0.8s; }
.nfc-visual__pulse:nth-child(3) { animation-delay: 1.6s; }

.nfc-chip {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.nfc-chip__body {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
  background-color: #2a2a2a;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.nfc-chip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 14px;
  width: 100%;
  height: 100%;
}

.nfc-chip__cell {
  border-radius: 2px;
  background-color: rgba(0, 210, 133, 0.14);
  border: 0.5px solid rgba(0, 210, 133, 0.2);
}

.nfc-chip__cell--bright {
  background-color: rgba(0, 210, 133, 0.32);
  animation: chip-flicker 3s ease-in-out infinite;
}

.nfc-phone {
  width: 128px;
  height: 212px;
  border-radius: 22px;
  background-color: #252526;
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
  animation: phone-tap 3s var(--ease-out-expo) infinite;
}

.nfc-phone__screen {
  width: 92px;
  height: 158px;
  border-radius: 14px;
  background-color: #121212;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  overflow: hidden;
  position: relative;
}

.nfc-phone__status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 239, 232, 0.38);
  font-family: var(--font-sans);
}

.nfc-phone__verified {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-green);
  font-family: var(--font-sans);
  opacity: 0;
  animation: show-verified 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nfc-phone__checkmark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--accent-green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: show-verified 3s ease-in-out infinite;
}

.nfc-phone__checkmark svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-green);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nfc-tap-indicator {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-sans);
  white-space: nowrap;
}

.nfc-waves {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-bottom: var(--space-2);
}

.nfc-wave {
  width: 2px;
  border-radius: var(--radius-full);
  background-color: var(--accent-green);
  animation: wave-grow 1.8s var(--ease-out-expo) infinite;
}

.nfc-wave:nth-child(1) { height: 8px; animation-delay: 0s; }
.nfc-wave:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.nfc-wave:nth-child(3) { height: 20px; animation-delay: 0.30s; }
.nfc-wave:nth-child(4) { height: 14px; animation-delay: 0.45s; }
.nfc-wave:nth-child(5) { height: 8px; animation-delay: 0.60s; }

.nfc-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--bg-main);
  border: 1px solid var(--line-medium);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  color: var(--text-soft);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-top: var(--space-4);
}

.nfc-verified-badge svg {
  width: 12px;
  height: 12px;
  stroke: var(--accent-green);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-hero {
  padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-section-y);
  border-bottom: none;
  position: relative;
}

.page-hero::after {
  content: "";
  display: block;
  height: 1px;
  background-color: var(--line-soft);
  margin-top: var(--space-16);
}

.page-hero__eyebrow {
  margin-bottom: var(--space-4);
}

.page-hero__title {
  margin-bottom: var(--space-8);
  max-width: 18ch;
}

.page-hero__body {
  font-size: var(--text-md);
  max-width: 52ch;
  line-height: var(--leading-loose);
}

.page-hero--wide .page-hero__title {
  max-width: 22ch;
}

.placeholder-section {
  padding: var(--space-section-y) 0;
}

.placeholder-block {
  padding: var(--space-16);
  background-color: var(--bg-elevated);
  border: 1px dashed var(--line-medium);
  border-radius: var(--radius-lg);
  text-align: center;
}

.placeholder-block p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0 auto;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-full);
  background-color: var(--bg-main);
  letter-spacing: var(--tracking-wide);
}
