:root {
  color-scheme: light dark;

  --bg: #fdf7f9;
  --bg-alt: #f9edf2;
  --surface: #ffffff;
  --ink: #2b1e29;
  --muted: #86707f;
  --border: rgba(43, 30, 41, 0.10);
  --accent: #d6336c;
  --accent-strong: #b02a5b;
  --accent-soft: rgba(214, 51, 108, 0.10);
  --blush: #ffe3ee;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 8px 24px rgba(176, 42, 91, 0.08);
  --shadow-lg: 0 24px 60px rgba(176, 42, 91, 0.16);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171017;
    --bg-alt: #221722;
    --surface: #251a25;
    --ink: #f6edf2;
    --muted: #bda4b4;
    --border: rgba(246, 237, 242, 0.12);
    --accent: #f2618c;
    --accent-strong: #d6336c;
    --accent-soft: rgba(242, 97, 140, 0.16);
    --blush: rgba(242, 97, 140, 0.12);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1100px, calc(100% - 2.5rem)); margin: 0 auto; }

a { color: inherit; }

/* Eyebrow label - used at most once per page section */
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  margin: 0 0 .9rem;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }

/* ---------- Hero (homepage) ---------- */
.hero {
  position: relative;
  padding: 88px 0 64px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(closest-side, var(--blush), transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -18%;
  width: 46vw;
  height: 46vw;
  max-width: 560px;
  max-height: 560px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
}
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 0 0 1rem; }
.hero-copy h1 .accent-word { color: var(--accent); }
.hero-copy .lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 1.6rem;
}
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transform: rotate(-2deg);
  background: var(--surface);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise-in .7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  }
  .hero-copy > *:nth-child(2) { animation-delay: .08s; }
  .hero-copy > *:nth-child(3) { animation-delay: .16s; }
  .hero-copy > *:nth-child(4) { animation-delay: .24s; }
  .hero-frame { animation: frame-in .8s cubic-bezier(0.16, 1, 0.3, 1) backwards .1s; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes frame-in {
  from { opacity: 0; transform: rotate(-2deg) translateY(24px); }
  to { opacity: 1; transform: rotate(-2deg) translateY(0); }
}

@media (max-width: 768px) {
  .hero { padding: 56px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; text-align: left; }
  .hero-visual { order: -1; }
  .hero-frame { max-width: 260px; transform: none; margin: 0 auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  background: var(--accent-strong);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { filter: brightness(0.92); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }

/* ---------- Section heading ---------- */
.section-heading { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .4rem; }
.section-sub { color: var(--muted); font-size: .98rem; margin: 0 0 1.6rem; max-width: 60ch; }

/* ---------- Quiz card grid ---------- */
.card-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 2.5rem;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.card:hover .card-cover img { transform: scale(1.04); }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.08rem; margin-bottom: .55rem; }
.card-body p { color: var(--muted); font-size: .92rem; line-height: 1.55; margin: 0 0 1rem; flex: 1; }
.card-body .btn { align-self: flex-start; }

.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-strong);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@media (prefers-color-scheme: dark) {
  .tag { background: rgba(23, 16, 23, 0.78); color: var(--accent); }
}

.card-meta {
  color: var(--muted);
  font-size: .8rem;
  margin: 0 0 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .card:hover { transform: none; }
  .card:hover .card-cover img { transform: none; }
}

/* ---------- Ad slot ---------- */
.ad-slot {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}
.footer-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.footer-nav a:hover { color: var(--accent); }
.footer p { text-align: center; color: var(--muted); font-size: .85rem; margin: 0; }

/* ---------- Simple content pages (about / contact / privacy / quiz) ---------- */
.quiz-header { padding: 88px 0 56px; }
.quiz-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}
.quiz-box h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.quiz-box p { color: var(--muted); margin: 0 0 1rem; max-width: 60ch; }
.quiz-box .btn { margin-top: .6rem; }

.quiz-question { font-size: 1.15rem; font-weight: 700; margin-bottom: .9rem; color: var(--ink); }

.options button {
  display: block;
  width: 100%;
  text-align: left;
  margin: .55rem 0;
  padding: .95rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--ink);
  cursor: pointer;
  font-size: .95rem;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.options button:hover { border-color: var(--accent); transform: translateY(-1px); }
.options button.selected {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
  font-weight: 700;
}

.result-box { display: none; }

/* ---------- Quiz progress bar ---------- */
.progress-wrapper { width: 100%; height: 8px; background: var(--bg-alt); border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar { width: 0%; height: 100%; background: var(--accent); transition: width .3s ease; }
.progress-text { font-size: .85rem; color: var(--muted); margin: 6px 0 0; text-align: right; }

/* ---------- Quiz cover image ---------- */
.quiz-cover-frame {
  margin: 1.4rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.quiz-cover-frame img { width: 100%; max-height: 280px; object-fit: cover; display: block; }

/* ---------- Social share buttons ---------- */
.share-buttons { display: flex; gap: .65rem; flex-wrap: wrap; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease;
}
.share-btn:hover { transform: translateY(-2px); opacity: .92; color: #fff; }
.share-fb { background: #1877f2; }
.share-line { background: #06c755; }
.share-x { background: #15101a; border: 1px solid var(--border); }
.share-copy { background: #86707f; }

.share-section {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.share-section .share-label { font-size: .9rem; color: var(--muted); margin-bottom: .8rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
