/* ============================================
   Aurora — License / Pricing Page
   Self-contained styles (production)
   ============================================ */

/* --- Hero --- */
.license-hero {
  position: relative;
  text-align: center;
  overflow: hidden;
}

.license-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.license-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.license-hero__glow--1 {
  width: 800px;
  height: 500px;
  top: -20%;
  right: -10%;
  background: radial-gradient(ellipse, rgba(26,108,162,0.14) 0%, transparent 70%);
  animation: aurora-drift 22s ease-in-out infinite;
}

.license-hero__glow--2 {
  width: 600px;
  height: 400px;
  bottom: -15%;
  left: -8%;
  background: radial-gradient(ellipse, rgba(27,200,156,0.09) 0%, transparent 70%);
  animation: aurora-drift 28s ease-in-out infinite reverse;
}

.license-hero__title {
  font-size: var(--text-hero-desktop);
  font-weight: 700;
  line-height: 1.04;
  margin-bottom: var(--space-6);
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

.license-hero__subtitle {
  font-size: var(--text-hero-body-desktop);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 580px;
  margin: 0 auto;
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

/* --- Plans Grid ---
   The base `.plans-grid` rule lives in home.css (which is also
   loaded by license.html and pricing.html). Don't redeclare it
   here — doing so wins source-order over the mobile carousel
   media query in home.css and breaks the horizontal carousel
   on /pricing. License-specific layout uses `.plans-grid--duo`. */

/* --- Plan Card --- */
.plan-card {
  background: var(--surface-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--dur-med) var(--ease);
  position: relative;
}

.plan-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.plan-card.is-selected {
  border-color: rgba(27,200,156,0.4);
  box-shadow: var(--glow-green);
}

/* Radio-style selector dot */
.plan-card__selector {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  transition: all var(--dur-med) var(--ease);
}

.plan-card.is-selected .plan-card__selector {
  border-color: var(--accent-green);
  background: var(--accent-green);
}

.plan-card.is-selected .plan-card__selector::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #020610;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Badge — perfectly centered ON the card's top border:
   top: 0 + translate(-50%, -50%) puts the badge's vertical midline
   on the edge regardless of its height, so the border line runs
   exactly through the middle of the pill. */
.plan-card__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.plan-card__badge--popular {
  background: rgb(52, 211, 153);
  color: #0A0E14;
  border: 1px solid rgba(52,211,153,0.25);
}

[data-theme="light"] .plan-card__badge--popular {
    background: rgba(52, 211, 153, 0.793);
    color: #000;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

/* Card content */
.plan-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.plan-card__price {
  font-family: var(--font-rounded), var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-card__price-suffix {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--text-muted);
}

.plan-card__desc {
  font-size: var(--text-small);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.5;
}

.plan-card__features {
  flex: 1;
  margin-bottom: var(--space-5);
}

.plan-card__feature {
  font-size: var(--text-small);
  color: var(--text-secondary);
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-card__check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(27,200,156,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plan-card__check svg {
  width: 10px;
  height: 10px;
  stroke: var(--accent-green);
  stroke-width: 2.5;
  fill: none;
}

.plan-card .button {
  width: 100%;
}

/* --- Activation Steps (How It Works) --- */
.activation-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.activation-step {
  text-align: center;
  position: relative;
}

.activation-step__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(27,200,156,0.08);
  border: 1px solid rgba(27,200,156,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-body);
  color: var(--accent-green);
  position: relative;
  z-index: 1;
}

/* Connector line between steps */
.activation-step__connector {
  position: absolute;
  top: 24px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 1px;
  background: var(--border-soft);
  z-index: 0;
}

.activation-step__title {
  font-family: var(--font-heading);
  font-size: var(--text-card-title);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.activation-step__desc {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 200px;
  margin: 0 auto;
}

/* --- Trust Badges --- */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

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

.trust-badge__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-button-sm);
  background: rgba(27,200,156,0.07);
  border: 1px solid rgba(27,200,156,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  flex-shrink: 0;
}

.trust-badge__text {
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--text-secondary);
}

/* --- Final CTA --- */
.final-cta {
  text-align: center;
  position: relative;
  overflow: hidden;
  overflow: clip;
}

.final-cta__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.final-cta__glow {
  position: absolute;
  width: min(800px, 96vw);
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(27,200,156,0.08) 0%, transparent 70%);
  filter: blur(60px);
  animation: aurora-pulse 4s ease-in-out infinite;
}

.final-cta__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .license-hero__title {
    font-size: var(--text-hero-tablet);
  }

  .license-hero__subtitle {
    font-size: var(--text-hero-body-tablet);
  }

  /* Keep 3-col pricing on tablet — users expect to compare all plans
     side-by-side. Tighten gap + card padding so they fit down to 768px.
     .container already supplies horizontal padding, so no extra here. */
  .plans-grid {
    gap: var(--space-3);
    max-width: 100%;
  }
  .plan-card {
    padding: var(--space-5);
  }

  .activation-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .activation-step__connector {
    display: none;
  }

  .trust-badges {
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  .license-hero__title {
    font-size: var(--text-hero-mobile);
  }

  .license-hero__subtitle {
    font-size: var(--text-hero-body-mobile);
  }

  /* Below tablet: stack plan cards in a single column.
     Scoped to `.plans-grid--duo` so it ONLY hits the
     two-card variant on /license. The 3-card grid on
     /pricing uses the horizontal carousel from home.css. */
  .plans-grid--duo {
    grid-template-columns: 1fr;
    max-width: 380px;
  }

  .activation-steps {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
  }
}

/* --- License Center --------------------------------------------------- */
.license-center-hero {
  padding-bottom: var(--space-12);
}

.license-center {
  width: min(100%, 720px);
  margin: 0 auto;
  display: grid;
  gap: var(--space-6);
}

.license-center__intro {
  display: grid;
  gap: var(--space-2);
}

.license-card,
.license-result,
.license-help-card,
.license-buy-card {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 4vw, 34px);
}

.license-card__title,
.license-result__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 24px);
  line-height: 1.2;
  letter-spacing: 0;
}

.license-form,
.license-field,
.license-result,
.license-section,
.license-help-card {
  display: grid;
}

.license-form {
  gap: var(--space-4);
}

.license-field {
  gap: 8px;
}

.license-field label {
  color: var(--text-secondary);
  font-size: var(--text-small);
  font-weight: 600;
}

.license-field__hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.license-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  padding: 0 14px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.license-field input:focus-visible {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.license-form__button {
  width: 100%;
  min-height: 48px;
}

.license-form__button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.license-form__error {
  margin: 0;
  color: #ffb4b4;
  font-size: var(--text-small);
  line-height: 1.5;
}

.license-result {
  gap: var(--space-5);
}

.license-result[hidden],
.license-form__error[hidden] {
  display: none;
}

.license-result__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.license-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--accent-green);
  background: rgba(52, 211, 153, 0.1);
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.license-status--error {
  border-color: rgba(248, 113, 113, 0.35);
  color: #ffb4b4;
  background: rgba(248, 113, 113, 0.1);
}

.license-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.license-detail,
.license-device {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.license-detail span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.license-detail strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.license-section {
  gap: 12px;
}

.license-section__title {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 17px;
  letter-spacing: 0;
}

.license-section__copy,
.license-help-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.6;
}

.license-device-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.license-device {
  display: grid;
  gap: 8px;
}

.license-device__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.license-device__name {
  color: var(--text-primary);
  font-weight: 700;
}

.license-device__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.license-actions,
.license-help-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.license-actions .button {
  min-height: 44px;
}

.license-buy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(56, 189, 248, 0.08)),
    var(--surface-card);
}

.license-buy-card__eyebrow {
  margin: 0 0 6px;
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.license-buy-card__title {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 24px);
  line-height: 1.2;
  letter-spacing: 0;
}

.license-buy-card__copy {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: var(--text-small);
  line-height: 1.6;
}

.license-buy-card__button {
  flex: 0 0 auto;
  min-height: 44px;
}

.license-help-card {
  gap: var(--space-3);
}

[data-theme="light"] .license-field input,
[data-theme="light"] .license-detail,
[data-theme="light"] .license-device {
  background: rgba(5, 12, 18, 0.03);
}

@media (max-width: 640px) {
  .license-center-hero {
    padding-top: calc(var(--space-12) + 48px);
  }

  .license-card,
  .license-result,
  .license-help-card,
  .license-buy-card {
    padding: 20px;
  }

  .license-result__header,
  .license-device__top {
    display: grid;
    justify-content: stretch;
  }

  .license-detail-grid {
    grid-template-columns: 1fr;
  }

  .license-actions .button,
  .license-help-card__actions .button,
  .license-buy-card__button {
    width: 100%;
  }

  .license-buy-card {
    display: grid;
  }
}
