/* ==========================================================================
   ORYGIN AI — reusable components
   --------------------------------------------------------------------------
   Buttons, pills, eyebrows, cards, the countdown, the FAQ disclosure and the
   scroll-reveal transition. Anything that appears in more than one section
   lives here; one-off section furniture lives in sections.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Eyebrow — the only text on the page allowed to be uppercase.
   -------------------------------------------------------------------------- */

.eyebrow {
  display: block;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--brand-400);
}

/* Left-aligned variant, for use inside a card. */
.eyebrow--inline {
  text-align: left;
  letter-spacing: var(--tracking-wide);
}

/* --------------------------------------------------------------------------
   Pill — the hero's audience tag
   -------------------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--surface-300);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
}

.pill__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-400);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform var(--duration-fast) var(--ease-out),
    filter var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.btn--primary {
  background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  color: var(--text-on-brand);
  box-shadow: var(--shadow-brand), var(--brand-rim);
}

.btn--primary:hover {
  color: var(--text-on-brand);
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand), var(--brand-rim-hover);
}

.btn--primary:active {
  transform: translateY(0);
  filter: brightness(0.96);
  box-shadow: var(--brand-rim-active);
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: var(--surface-400);
}

/* The large CTA. Full width on a phone — a centred pill that a thumb can
   miss is the single most expensive layout mistake on this page. */
.btn--lg {
  width: 100%;
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-md);
}

@media (min-width: 30rem) {
  .btn--lg {
    width: auto;
    padding-inline: var(--space-10);
  }
}

/* --------------------------------------------------------------------------
   CTA block — button plus its reassurance line
   -------------------------------------------------------------------------- */

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.cta__note {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Card — the one surface treatment used across the page
   -------------------------------------------------------------------------- */

.card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-300);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  transition:
    border-color var(--duration-normal) var(--ease-out),
    background-color var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-400);
}

.card__title {
  font-size: var(--text-lg);
  color: var(--text-primary);
}

.card__body {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

/* Numbered badge, shared by the "what you get" and bundle cards. */
.card__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: var(--space-4);
  border: 1px solid var(--border-brand);
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--brand-400);
}

/* --------------------------------------------------------------------------
   Checklist — a tick and a line of text. Used in the fit columns and in the
   bundle cards.
   -------------------------------------------------------------------------- */

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.checklist__item:first-child {
  border-top: 0;
  padding-top: 0;
}

.checklist__icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 0.28em;
  color: var(--positive-500);
}

.checklist__icon--muted {
  color: var(--negative-500);
}

/* --------------------------------------------------------------------------
   Countdown
   --------------------------------------------------------------------------
   Markup contract, read by src/scripts/ui/countdown.js:
     <div data-countdown><span data-countdown-minutes>…</span>…</div>
   -------------------------------------------------------------------------- */

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.countdown__unit {
  min-width: 58px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-400);
  text-align: center;
}

.countdown__digits {
  display: block;
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  /* Tabular figures — otherwise the box jitters once a second. */
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-faint);
}

.countdown__lead {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Sticky-bar variant: one line, no boxes. */
.countdown--compact .countdown__unit {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
}

.countdown--compact .countdown__digits {
  display: inline;
  font-size: var(--text-base);
}

.countdown--compact .countdown__label {
  display: inline;
  margin: 0 0 0 2px;
  font-size: var(--text-xs);
  text-transform: none;
  letter-spacing: 0;
}

.countdown--compact .countdown__unit + .countdown__unit::before {
  content: ":";
  margin-inline: 2px;
  color: var(--text-faint);
}

[data-countdown][data-expired="true"] .countdown__digits {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   FAQ — native <details>, no JS, keyboard accessible for free
   -------------------------------------------------------------------------- */

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-size: var(--text-md);
  font-weight: 650;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.faq-item__q::-webkit-details-marker { display: none; }

.faq-item__q::after {
  content: "+";
  flex: none;
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1;
  color: var(--text-muted);
  transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item[open] .faq-item__q::after {
  transform: rotate(45deg);
}

.faq-item__a {
  padding-bottom: var(--space-5);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Scroll reveal
   --------------------------------------------------------------------------
   Elements start visible. src/scripts/ui/reveal.js adds .has-reveal to <html>
   only once it has confirmed it can reveal again, so a blocked script can
   never leave the page blank.
   -------------------------------------------------------------------------- */

.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.has-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
