/* ============================================================
   PICHI AI — Components
   Buttons · Cards · Nav · Badges · Inputs · Tags
   ============================================================ */

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-label-lg);
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--radius-button);
  padding: 14px 28px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    transform var(--dur-normal) var(--ease-settle),
    box-shadow var(--dur-normal) var(--ease-settle),
    color var(--dur-normal) var(--ease-default);
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Primary button — fill slide from right on hover */
.btn--primary {
  color: var(--text-inverse);
  background: var(--color-primary-500);
  background-image: linear-gradient(
    to right,
    var(--color-primary-600) 50%,
    var(--color-primary-500) 50%
  );
  background-size: 200% 100%;
  background-position: 100% 0;
  transition:
    background-position var(--dur-deliberate) var(--ease-expressive),
    transform var(--dur-normal) var(--ease-settle),
    box-shadow var(--dur-normal) var(--ease-settle);
}

.btn--primary:hover {
  background-position: 0 0;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(22, 84, 240, 0.28);
  color: var(--text-inverse);
}

.btn--primary:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: none;
  transition-duration: var(--dur-immediate);
  transition-timing-function: var(--ease-sharp);
}

/* Secondary / Outlined */
.btn--secondary {
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-strong);
  transition:
    transform var(--dur-normal) var(--ease-settle),
    box-shadow var(--dur-normal) var(--ease-settle),
    border-color var(--dur-normal) var(--ease-default),
    background var(--dur-normal) var(--ease-default);
}

.btn--secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
  background: var(--color-primary-50);
}

.btn--secondary:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: none;
  transition-duration: var(--dur-immediate);
}

/* Ghost */
.btn--ghost {
  color: var(--text-primary);
  background: transparent;
  padding: 14px 20px;
}

.btn--ghost:hover {
  color: var(--color-primary-500);
  background: var(--color-primary-50);
}

/* Sizes */
.btn--lg {
  font-size: 15px;
  padding: 18px 36px;
}

.btn--sm {
  font-size: 12px;
  padding: 10px 20px;
}

/* Icon-only */
.btn--icon {
  padding: 12px;
  width: 44px;
  height: 44px;
}

/* ================================================================
   NAV
   ================================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: 64px;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--dur-normal) var(--ease-default),
              border-color var(--dur-normal) var(--ease-default),
              box-shadow var(--dur-normal) var(--ease-default);
}

.nav.is-scrolled {
  background: var(--nav-blur-bg);
  backdrop-filter: var(--nav-blur-filter);
  -webkit-backdrop-filter: var(--nav-blur-filter);
  border-bottom: 1px solid var(--nav-blur-border);
  box-shadow: var(--shadow-xs);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo img,
.nav__logo svg {
  height: 28px;
  width: auto;
}

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

.nav__link {
  position: relative;
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  padding: 6px 12px;
  text-decoration: none;
  transition: color var(--dur-normal) var(--ease-default);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--color-primary-500);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-deliberate) var(--ease-expressive);
}

.nav__link:hover {
  color: var(--text-primary);
}

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

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

@media (max-width: 768px) {
  .nav__links { display: none; }
}

/* ================================================================
   CARDS
   ================================================================ */

.card {
  background: var(--surface-default);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  padding: var(--card-padding);
  transition:
    transform var(--dur-deliberate) var(--ease-settle),
    box-shadow var(--dur-deliberate) var(--ease-settle);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card:active {
  transform: translateY(-2px);
  transition-duration: var(--dur-fast);
  transition-timing-function: var(--ease-sharp);
}

.card--elevated {
  box-shadow: var(--shadow-card);
  border: none;
}

.card--flat {
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

.card--dark {
  background: var(--surface-dark);
  border-color: var(--border-dark-muted);
  color: var(--text-inverse);
}

/* Feature card */
.feature-card {
  background: var(--surface-default);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  transition:
    transform var(--dur-deliberate) var(--ease-settle),
    box-shadow var(--dur-deliberate) var(--ease-settle);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

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

.feature-card__title {
  font-size: var(--text-h5);
  font-weight: var(--fw-medium);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.feature-card__body {
  font-size: var(--text-body);
  line-height: var(--lh-loose);
  color: var(--text-muted);
}

/* Testimonial card */
.testimonial-card {
  background: var(--surface-default);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  transition:
    transform var(--dur-deliberate) var(--ease-settle),
    box-shadow var(--dur-deliberate) var(--ease-settle);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.testimonial-card__quote {
  font-size: var(--text-body-lg);
  line-height: var(--lh-loose);
  color: var(--text-secondary);
  flex: 1;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-avatar);
  background: var(--color-neutral-100);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
}

.testimonial-card__name {
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  line-height: 1.3;
}

.testimonial-card__role {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Stat card */
.stat-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.stat-card__value {
  font-size: var(--text-metric);
  font-weight: var(--fw-regular);
  line-height: 1.0;
  letter-spacing: var(--ls-tightest);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.stat-card__delta {
  font-size: var(--text-label-lg);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-green-500);
  margin-bottom: var(--space-3);
}

.stat-card__label {
  font-size: var(--text-body);
  color: var(--text-muted);
  line-height: var(--lh-loose);
}

/* ================================================================
   BADGES & TAGS
   ================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  padding: 4px 10px;
  border-radius: var(--radius-badge);
}

.badge--primary {
  background: var(--color-primary-50);
  color: var(--color-primary-600);
}

.badge--amber {
  background: var(--color-amber-50);
  color: var(--color-amber-600);
}

.badge--green {
  background: var(--status-success-subtle);
  color: var(--status-success);
}

.badge--neutral {
  background: var(--color-neutral-100);
  color: var(--text-secondary);
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: var(--fw-regular);
  line-height: 1;
  padding: 6px 14px;
  border-radius: var(--radius-tag);
  background: var(--color-neutral-100);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: background var(--dur-fast) var(--ease-default),
              border-color var(--dur-fast) var(--ease-default);
}

.tag:hover {
  background: var(--color-primary-50);
  border-color: var(--color-primary-200);
  color: var(--color-primary-600);
}

/* ================================================================
   INPUTS
   ================================================================ */

.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.input-label {
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  background: var(--surface-default);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-input);
  padding: 12px 16px;
  line-height: 1.5;
  outline: none;
  transition:
    border-color var(--dur-normal) var(--ease-default),
    box-shadow var(--dur-normal) var(--ease-default);
}

.input::placeholder {
  color: var(--text-muted);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 2px rgba(22, 84, 240, 0.20);
}

/* Inline email subscribe */
.input-inline {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-button);
  overflow: hidden;
  background: var(--surface-default);
  transition: border-color var(--dur-normal) var(--ease-default),
              box-shadow var(--dur-normal) var(--ease-default);
}

.input-inline:focus-within {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 2px rgba(22, 84, 240, 0.20);
}

.input-inline .input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
  box-shadow: none;
}

.input-inline .btn {
  border-radius: 0;
  flex-shrink: 0;
}

/* ================================================================
   LOGO WALL
   ================================================================ */

.logo-wall {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-12);
}

.logo-wall__item {
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity var(--dur-normal) var(--ease-default),
              filter var(--dur-normal) var(--ease-default);
  font-size: 15px;
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.logo-wall__item:hover {
  opacity: 0.7;
  filter: grayscale(0);
}

/* ================================================================
   SECTION HEADER
   ================================================================ */

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--section-gap) auto;
}

.section-header--left {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}

.section-header__overline {
  font-size: var(--text-overline);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-primary-500);
  margin-bottom: var(--space-4);
  display: block;
}

.section-header__title {
  font-size: var(--text-h2);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-5);
}

.section-header__subtitle {
  font-size: var(--text-body-lg);
  line-height: var(--lh-loose);
  color: var(--text-muted);
}

/* ================================================================
   STEP / HOW IT WORKS
   ================================================================ */

.step {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

.step__number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-avatar);
  background: var(--color-neutral-100);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  transition: background var(--dur-normal) var(--ease-default),
              color var(--dur-normal) var(--ease-default);
}

.step:hover .step__number {
  background: var(--color-primary-50);
  color: var(--color-primary-600);
  border-color: var(--color-primary-200);
}

.step__content {
  flex: 1;
  padding-top: 6px;
}

.step__title {
  font-size: var(--text-h5);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.step__body {
  font-size: var(--text-body);
  line-height: var(--lh-loose);
  color: var(--text-muted);
}

/* ================================================================
   PRODUCT DEMO MOCKUP
   ================================================================ */

.demo-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-dark);
  border: 1px solid var(--border-dark-muted);
  box-shadow: var(--shadow-2xl);
}

.demo-wrapper__inner {
  padding: var(--space-6);
}

.demo-card {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.demo-metric {
  font-size: clamp(28px, 3vw, 48px);
  font-weight: var(--fw-regular);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-inverse);
}

.demo-metric__label {
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-2);
}

.demo-metric__delta {
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--color-green-400);
  margin-top: var(--space-2);
}

/* ================================================================
   SKELETON LOADING
   ================================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--color-neutral-100) 25%, var(--color-neutral-50) 50%, var(--color-neutral-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s infinite;
  border-radius: var(--radius-xs);
}

@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ================================================================
   DIVIDER WITH LABEL
   ================================================================ */

.divider-label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
