/*
Theme Name: Which Member
Theme URI: https://whichmember.com
Author: Which Member
Author URI: https://whichmember.com
Description: K-pop personality quiz theme. Find out which member of ENHYPEN, BTS, Stray Kids, KATSEYE, ILLIT and more you're most like. Bulk-import quizzes from JSON, attach images, and match with real members. Rank Math SEO friendly (does not output JSON-LD schema).
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: which-member
Tags: entertainment, custom-post-type, rtl-language-support, custom-colors, custom-logo, featured-images, full-width-template, translation-ready, block-styles, wide-blocks
*/

/* ============================================================
   Design tokens — light theme (default)
   ============================================================ */
:root {
  /* Brand palette — rose / pink / purple family */
  --hu-primary: #e11d48;       /* rose-600 */
  --hu-primary-dark: #be123c;  /* rose-700 */
  --hu-primary-soft: #fff1f4;  /* rose-50 (hover bg) */
  --hu-pink: #ec4899;          /* pink-500 */
  --hu-purple: #a855f7;        /* purple-500 */
  --hu-orange: #fb923c;        /* orange-400 */

  /* Brand gradient — orange → rose → purple */
  --hu-gradient-brand: linear-gradient(135deg, #fb923c 0%, #ec4899 50%, #a855f7 100%);
  --hu-gradient-brand-soft: linear-gradient(135deg, #fff7ed 0%, #fff1f2 50%, #faf5ff 100%);

  /* Neutral surfaces */
  --hu-secondary: #0f172a;     /* slate-900 — headings */
  --hu-bg: #ffffff;
  --hu-bg-soft: #fef2f2;       /* rose-50 */
  --hu-bg-elevated: #ffffff;
  --hu-text: #1e293b;          /* slate-800 */
  --hu-text-muted: #64748b;    /* slate-500 */
  --hu-border: #e2e8f0;        /* slate-200 */
  --hu-border-strong: #cbd5e1; /* slate-300 */

  /* Typography */
  --font-display: "Poppins", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Radii */
  --hu-radius-sm: 10px;
  --hu-radius: 16px;
  --hu-radius-lg: 24px;
  --hu-radius-full: 999px;

  /* Shadows — layered for a premium feel */
  --hu-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --hu-shadow-sm: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
  --hu-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
  --hu-shadow-soft: 0 8px 24px -8px rgba(225, 29, 72, 0.18);
  --hu-shadow-hover: 0 24px 48px -16px rgba(225, 29, 72, 0.28);
  --hu-shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, 0.25);

  /* Layout */
  --hu-container: 1180px;
  --hu-header-height: 68px;

  /* Motion */
  --hu-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hu-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --hu-fast: 0.18s;
  --hu-med: 0.28s;
}

/* ============================================================
   Dark theme — auto via prefers-color-scheme
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --hu-primary: #fb7185;       /* rose-400 — brighter for dark bg contrast */
    --hu-primary-dark: #f43f5e;  /* rose-500 */
    --hu-primary-soft: #4c0519;  /* rose-950 */

    --hu-secondary: #f8fafc;
    --hu-bg: #0b1220;
    --hu-bg-soft: #131c2e;
    --hu-bg-elevated: #16213a;
    --hu-text: #e2e8f0;
    --hu-text-muted: #94a3b8;
    --hu-border: #243049;
    --hu-border-strong: #334155;

    --hu-gradient-brand-soft: linear-gradient(135deg, #2a0e0e 0%, #2a0a1f 50%, #1a0b2e 100%);

    --hu-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --hu-shadow-sm: 0 4px 12px -4px rgba(0, 0, 0, 0.4);
    --hu-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
    --hu-shadow-soft: 0 8px 24px -8px rgba(251, 113, 133, 0.22);
    --hu-shadow-hover: 0 24px 48px -16px rgba(251, 113, 133, 0.32);
    --hu-shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  }
}

/* ============================================================
   Base resets
   ============================================================ */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hu-header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--hu-bg);
  color: var(--hu-text);
  line-height: 1.65;
  font-size: 16px;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--hu-med) var(--hu-ease), color var(--hu-med) var(--hu-ease);
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--hu-primary);
  text-decoration: none;
  transition: color var(--hu-fast) var(--hu-ease);
}
a:hover { color: var(--hu-primary-dark); }

/* Headings — Poppins display font */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--hu-secondary);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }

strong { font-weight: 700; }

/* Layout container */
.container {
  max-width: var(--hu-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--hu-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--hu-radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* Selection */
::selection {
  background: var(--hu-primary);
  color: #fff;
}

/* Focus ring — refined, accessible */
:focus-visible {
  outline: 2px solid var(--hu-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
