/*
 * Wicked Peps — supporting website tokens and scoped components
 * WordPress + WooCommerce handoff, 24 October 2026
 *
 * Apply .wickedpeps-brand to the theme/page wrapper. All component selectors
 * are scoped to that wrapper. Add .wp-theme--dark to the wrapper or a nested
 * section for dark surfaces; .wp-theme--light restores light surfaces.
 *
 * The requested --wp-* token names are distinct from WordPress's
 * --wp--preset--* token names. Do not replace WordPress core presets globally.
 * Load Barlow Condensed 600/700 and Inter 400/500/600 separately.
 * These fonts are for supporting text only; keep the supplied logo artwork.
 */

.wickedpeps-brand {
  /* Existing proposed palette, carried forward as website values. */
  --wp-primary: #1464ff;
  --wp-primary-dark: #1743a6;
  --wp-primary-light: #effbff;
  --wp-secondary: #123578;
  --wp-accent: #00ccff;
  --wp-background-light: #ffffff;
  --wp-background-dark: #07101a;
  --wp-text-on-light: #07101a;
  --wp-text-on-dark: #effbff;

  /* Minimal semantic additions for interface states. */
  --wp-success: #15803d;
  --wp-warning: #b45309;
  --wp-error: #b91c1c;

  --wp-font-heading: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --wp-font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wp-text-h1: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  --wp-text-h2: clamp(2rem, 1.5rem + 2vw, 2.5rem);
  --wp-text-h3: clamp(1.75rem, 1.5rem + 1vw, 2rem);
  --wp-text-h4: clamp(1.375rem, 1.25rem + 0.5vw, 1.5rem);
  --wp-text-body: 1rem;
  --wp-text-small: 0.875rem;
  --wp-text-button: 1rem;

  --wp-radius-button: 4px;
  --wp-radius-card: 8px;
  --wp-radius-input: 4px;
  --wp-shadow-card: 0 12px 32px rgba(7, 16, 26, 0.12);
  --wp-control-height: 48px;
  --wp-transition: 150ms ease;

  --wp-space-1: 4px;
  --wp-space-2: 8px;
  --wp-space-3: 12px;
  --wp-space-4: 16px;
  --wp-space-6: 24px;
  --wp-space-8: 32px;
  --wp-space-12: 48px;
  --wp-space-16: 64px;
  --wp-space-24: 96px;

  /* Light surface defaults; override per section with the theme classes. */
  --wp-surface: var(--wp-background-light);
  --wp-text: var(--wp-text-on-light);
  --wp-link: var(--wp-primary-dark);
  --wp-link-hover: var(--wp-secondary);
  --wp-border: rgba(7, 16, 26, 0.18);
  --wp-outline-color: var(--wp-primary-dark);
  --wp-outline-hover-bg: var(--wp-primary-light);
  --wp-outline-hover-text: var(--wp-primary-dark);

  color: var(--wp-text);
  background-color: var(--wp-surface);
  font-family: var(--wp-font-body);
  font-size: var(--wp-text-body);
  font-weight: 400;
  line-height: 1.6;
}

.wickedpeps-brand.wp-theme--dark,
.wickedpeps-brand .wp-theme--dark {
  --wp-surface: var(--wp-background-dark);
  --wp-text: var(--wp-text-on-dark);
  --wp-link: var(--wp-accent);
  --wp-link-hover: var(--wp-text-on-dark);
  --wp-border: rgba(239, 251, 255, 0.22);
  --wp-outline-color: var(--wp-accent);
  --wp-outline-hover-bg: var(--wp-accent);
  --wp-outline-hover-text: var(--wp-background-dark);

  color: var(--wp-text);
  background-color: var(--wp-surface);
}

.wickedpeps-brand.wp-theme--light,
.wickedpeps-brand .wp-theme--light {
  --wp-surface: var(--wp-background-light);
  --wp-text: var(--wp-text-on-light);
  --wp-link: var(--wp-primary-dark);
  --wp-link-hover: var(--wp-secondary);
  --wp-border: rgba(7, 16, 26, 0.18);
  --wp-outline-color: var(--wp-primary-dark);
  --wp-outline-hover-bg: var(--wp-primary-light);
  --wp-outline-hover-text: var(--wp-primary-dark);

  color: var(--wp-text);
  background-color: var(--wp-surface);
}

.wickedpeps-brand :where(h1, h2, h3, h4, .wp-h1, .wp-h2, .wp-h3, .wp-h4) {
  margin-block: 0 var(--wp-space-4);
  color: var(--wp-text);
  font-family: var(--wp-font-heading);
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

.wickedpeps-brand :where(h1, .wp-h1) {
  font-size: var(--wp-text-h1);
  line-height: 1.05;
}

.wickedpeps-brand :where(h2, .wp-h2) {
  font-size: var(--wp-text-h2);
  line-height: 1.1;
}

.wickedpeps-brand :where(h3, .wp-h3) {
  font-size: var(--wp-text-h3);
  line-height: 1.15;
}

.wickedpeps-brand :where(h4, .wp-h4) {
  font-size: var(--wp-text-h4);
  font-weight: 600;
  line-height: 1.2;
}

.wickedpeps-brand :where(p, .wp-body) {
  margin-block: 0 var(--wp-space-4);
  font-size: var(--wp-text-body);
  line-height: 1.6;
}

.wickedpeps-brand :where(small, .wp-small) {
  font-size: var(--wp-text-small);
  line-height: 1.5;
}

.wickedpeps-brand :where(.wp-label, .wp-nav) {
  font-weight: 500;
}

.wickedpeps-brand :where(strong, b) {
  font-weight: 600;
}

.wickedpeps-brand a:not(.wp-button) {
  color: var(--wp-link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.wickedpeps-brand a:not(.wp-button):hover {
  color: var(--wp-link-hover);
  text-decoration-thickness: 2px;
}

.wickedpeps-brand .wp-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wp-space-2);
  min-height: var(--wp-control-height);
  padding: var(--wp-space-3) var(--wp-space-6);
  border: 2px solid transparent;
  border-radius: var(--wp-radius-button);
  font-family: var(--wp-font-body);
  font-size: var(--wp-text-button);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--wp-transition), border-color var(--wp-transition), color var(--wp-transition);
}

.wickedpeps-brand .wp-button--primary {
  color: #ffffff;
  background-color: var(--wp-primary);
  border-color: var(--wp-primary);
}

.wickedpeps-brand .wp-button--primary:not(:disabled):not([aria-disabled="true"]):hover {
  color: #ffffff;
  background-color: var(--wp-primary-dark);
  border-color: var(--wp-primary-dark);
}

.wickedpeps-brand .wp-button--secondary {
  color: #ffffff;
  background-color: var(--wp-secondary);
  border-color: var(--wp-secondary);
}

.wickedpeps-brand .wp-button--secondary:not(:disabled):not([aria-disabled="true"]):hover {
  color: #ffffff;
  background-color: var(--wp-primary-dark);
  border-color: var(--wp-primary-dark);
}

.wickedpeps-brand .wp-button--outline {
  color: var(--wp-outline-color);
  background-color: transparent;
  border-color: var(--wp-outline-color);
}

.wickedpeps-brand .wp-button--outline:not(:disabled):not([aria-disabled="true"]):hover {
  color: var(--wp-outline-hover-text);
  background-color: var(--wp-outline-hover-bg);
  border-color: var(--wp-outline-color);
}

.wickedpeps-brand .wp-button:disabled,
.wickedpeps-brand .wp-button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.wickedpeps-brand :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--wp-primary);
  outline-offset: 3px;
}

.wickedpeps-brand .wp-input {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--wp-control-height);
  padding: var(--wp-space-3) var(--wp-space-4);
  border: 1px solid var(--wp-border);
  border-radius: var(--wp-radius-input);
  color: var(--wp-text);
  background-color: var(--wp-surface);
  font-family: var(--wp-font-body);
  font-size: var(--wp-text-body);
  line-height: 1.5;
}

.wickedpeps-brand .wp-input[aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--wp-error);
}

.wickedpeps-brand .wp-card {
  padding: var(--wp-space-6);
  border: 1px solid var(--wp-border);
  border-radius: var(--wp-radius-card);
  color: var(--wp-text);
  background-color: var(--wp-surface);
  box-shadow: var(--wp-shadow-card);
}

/* Pair status color with an explicit text label; do not rely on color alone. */
.wickedpeps-brand .wp-status {
  display: inline-flex;
  align-items: center;
  gap: var(--wp-space-2);
  padding: var(--wp-space-1) var(--wp-space-2);
  border-radius: var(--wp-radius-input);
  color: #ffffff;
  font-size: var(--wp-text-small);
  font-weight: 500;
  line-height: 1.5;
}

.wickedpeps-brand .wp-status--success { background-color: var(--wp-success); }
.wickedpeps-brand .wp-status--warning { background-color: var(--wp-warning); }
.wickedpeps-brand .wp-status--error { background-color: var(--wp-error); }

@media (max-width: 47.999rem) {
  .wickedpeps-brand .wp-card { padding: var(--wp-space-4); }
}

@media (prefers-reduced-motion: reduce) {
  .wickedpeps-brand .wp-button { transition: none; }
}
