/* TOGOPEPTIDE — Page-scoped styles
   Layer 5 of 5 · populated per-page in Phase 4.
   Depends on: tokens.css + base.css + shell.css + components.css */

/* ─── Home · hero ─────────────────────────────────────── */
.hero {
  padding: var(--space-7) 0 var(--space-6);
  background:
    radial-gradient(circle at 50% -10%, var(--color-accent-soft), transparent 55%),
    linear-gradient(180deg, var(--color-bg-elevated) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .hero {
    padding: var(--space-9) 0 var(--space-8);
  }
}

.hero__inner {
  max-width: 780px;
}

.hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--letter-tighter);
  margin: 0 0 var(--space-5);
}

.hero__lead {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-soft);
  margin: 0 0 var(--space-6);
  max-width: 60ch;
}

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

/* ─── Home · surface section (slightly lifted background) ── */
.section--surface {
  background: var(--color-bg-elevated);
  border-block: 1px solid var(--color-border);
}

/* ─── Home · stack CTA panel ──────────────────────────── */
.stack-cta {
  background:
    radial-gradient(circle at 85% 0%, var(--color-accent-soft), transparent 60%),
    var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .stack-cta {
    padding: var(--space-7);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-6);
    align-items: center;
  }
}

.stack-cta__copy {
  max-width: 60ch;
}

.stack-cta__eyebrow {
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
}

.stack-cta__title {
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-3);
}

.stack-cta__lead {
  color: var(--color-text-soft);
  margin: 0 0 var(--space-5);
}

@media (min-width: 768px) {
  .stack-cta__lead {
    margin-bottom: 0;
  }
}

.stack-cta__action {
  display: flex;
  justify-content: flex-start;
}

/* ─── Entry grid (curated 6-item, caps at 3 cols) ─────── */
/* Used for category entry cards on home + shop. */
.entry-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  max-width: 980px;
  margin-inline: auto;
}

/* ─── Compound · hero (image + decision form) ─────────── */
.compound-hero {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .compound-hero {
    grid-template-columns: 1fr 1.25fr;
    gap: var(--space-7);
    align-items: start;
  }
}

.compound-hero__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compound-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-5);
}

.compound-hero__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}

@media (min-width: 768px) {
  .compound-hero__copy {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
  }
}

/* ─── Compound · variant picker (radio pills) ─────────── */
.variant-picker {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-5);
}

.variant-picker__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.variant-chip {
  cursor: pointer;
  position: relative;
}

.variant-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.variant-chip__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 44px;
  padding: 0 var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-soft);
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.variant-chip:hover .variant-chip__label {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.variant-chip input:checked + .variant-chip__label {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  color: var(--color-text);
}

.variant-chip input:focus-visible + .variant-chip__label {
  outline: 2px solid var(--color-accent-hover);
  outline-offset: 2px;
}

/* ─── Compound · quantity stepper ─────────────────────── */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}

.qty-stepper__btn {
  min-width: 44px;
  min-height: 44px;
  color: var(--color-text-soft);
  font-size: var(--text-xl);
  line-height: 1;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.qty-stepper__btn:hover:not(:disabled) {
  background: var(--color-surface-raised);
  color: var(--color-text);
}

.qty-stepper__btn:disabled {
  color: var(--color-text-faint);
  cursor: not-allowed;
}

.qty-stepper__input {
  width: 56px;
  min-height: 44px;
  text-align: center;
  background: transparent;
  border: 0;
  border-inline: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  -moz-appearance: textfield;
}

.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ─── Compound · price block ──────────────────────────── */
.price-block {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
}

.price-block__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.price-block__row + .price-block__row {
  border-top: 1px solid var(--color-border);
}

.price-block__value {
  color: var(--color-text-soft);
  font-weight: var(--weight-medium);
}

.price-block__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-4) 0;
  margin-top: var(--space-2);
  border-top: 1px solid var(--color-border-strong);
}

.price-block__value--total {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  letter-spacing: var(--letter-tight);
}

.price-block__stock {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-3) 0;
  font-size: var(--text-xs);
  color: var(--color-success);
}

.price-block__stock::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-success);
}

.price-block__cta {
  margin-top: var(--space-4);
}

.price-block__note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
}

.price-block__field {
  margin-top: var(--space-4);
}

/* ─── Compound · consent checkbox (research-use gate) ─── */
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  line-height: var(--leading-normal);
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

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

.consent-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.consent-check:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

/* ─── FAQ · accordion (native details/summary) ────────── */
.faq-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.faq-item[open] {
  border-color: var(--color-border-strong);
  background: var(--color-surface-raised);
}

.faq-item__summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  transition: background var(--dur-fast) var(--ease-out);
}

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

.faq-item__summary:hover {
  background: var(--color-bg-elevated);
}

.faq-item__caret {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform var(--dur-base) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.faq-item[open] .faq-item__caret {
  transform: rotate(180deg);
  color: var(--color-accent);
}

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

.faq-item__body > *:first-child { margin-top: 0; }
.faq-item__body > *:last-child  { margin-bottom: 0; }

/* ─── Fat loss stack · hero urgency line ──────────────── */
.hero__urgency {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
}

/* ─── Fat loss stack · checkout form card ─────────────── */
.checkout-form {
  max-width: 560px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.checkout-form .section__eyebrow {
  margin: 0;
}

.checkout-form > h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
}

.checkout-form > p {
  margin: 0 0 var(--space-2);
  color: var(--color-text-muted);
}

.checkout-form__note {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
}

.checkout-form__legal {
  margin: var(--space-2) 0 0;
  font-size: var(--text-2xs);
  color: var(--color-text-faint);
  line-height: var(--leading-normal);
}

/* ─── 404 · not-found block ───────────────────────────── */
.notfound {
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  padding: var(--space-7) 0;
}

.notfound .section__lead {
  margin-inline: auto;
  max-width: 52ch;
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
}

/* ─── Home · trust tile ───────────────────────────────── */
.trust-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.trust-tile__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin: 0;
}

.trust-tile__body {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  margin: 0;
}
