/*
Theme Name: Quiz App
Theme URI: https://quizapp.co.nz
Author: Quiz App
Description: Game-show night theme for quizapp.co.nz — navy, hot pink and sunshine yellow, with a playable test-drive quiz.
Version: 1.0.5
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: quizapp
Fonts: Bowlby One and Bricolage Grotesque, SIL Open Font License 1.1.
*/

/* ---------- basics ---------- */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
.qa-sec { padding-top: 110px !important; padding-bottom: 110px !important; position: relative; }
.qa-sec-tight { padding-top: 72px !important; padding-bottom: 72px !important; position: relative; }
.qa-sec > *, .qa-sec-tight > * { position: relative; z-index: 1; }
.qa-eyebrow { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: 14px !important; margin-bottom: 0 !important; }
.qa-lead { font-size: 21px !important; line-height: 1.5; max-width: 640px; }
.qa-note { font-size: 14px !important; opacity: .8; }
.has-text-align-center.qa-lead { margin-left: auto; margin-right: auto; }
:where(.wp-block-heading) { text-wrap: balance; }
h3.wp-block-heading { margin-top: 0; }

/* stickers */
.qa-sticker { display: inline-block; background: #ffd23f; color: #100c24; font-weight: 800; font-size: 14px !important; letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px; border-radius: 8px; transform: rotate(-2deg); width: fit-content; }
.qa-sticker.is-pink { background: #ff4f7b; }

/* underline squiggle on <mark class="qa-squiggle"> or span */
.qa-hl { color: #ff4f7b; background: none; position: relative; white-space: nowrap; }
.qa-hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: .16em; border-radius: 99px; background: #ffd23f; transform: rotate(-1.5deg); }

/* ---------- buttons (block styles) ---------- */
.wp-block-button .wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease; text-decoration: none; }
.wp-block-button .wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.is-style-pink .wp-block-button__link { background: #ff4f7b; color: #100c24; box-shadow: 0 5px 0 #b3214a; }
.wp-block-button.is-style-navy .wp-block-button__link { background: #100c24; color: #fff; box-shadow: 0 5px 0 #000; }
.wp-block-button.is-style-navy .wp-block-button__link:hover { color: #ffd23f; }
.wp-block-button.is-style-yellow .wp-block-button__link { background: #ffd23f; color: #100c24; box-shadow: 0 5px 0 #b38f10; }
.wp-block-button.is-style-ghost-light .wp-block-button__link { background: transparent; color: #fff; border: 2px solid #fff; padding: 12px 26px; }
.wp-block-button.is-style-ghost-light .wp-block-button__link:hover { color: #ffd23f; border-color: #ffd23f; }
.wp-block-button.is-style-ghost-dark .wp-block-button__link { background: transparent; color: #100c24; border: 3px solid #100c24; padding: 11px 25px; }

/* ---------- header ---------- */
.qa-header { padding-top: 18px !important; padding-bottom: 18px !important; }
.qa-logo { margin: 0 !important; }
.qa-logo a { display: inline-flex; align-items: baseline; gap: 6px; background: #ff4f7b; padding: 8px 20px 10px; border-radius: 999px; transform: rotate(-3deg); text-decoration: none !important; color: #fff !important; font-family: 'Bowlby One', Impact, sans-serif; text-transform: uppercase; line-height: 1; }
.qa-logo .q { font-size: 26px; }
.qa-logo .a { font-size: 15px; }
.qa-header .wp-block-navigation a { color: #fff; font-weight: 600; text-decoration: none; }
.qa-header .wp-block-navigation a:hover { color: #ffd23f; }
.qa-header .wp-block-navigation__responsive-container.is-menu-open { background: #100c24 !important; color: #fff !important; }
.qa-header .wp-block-navigation__responsive-container.is-menu-open a { font-family: 'Bowlby One', sans-serif; text-transform: uppercase; font-size: 28px; }
.qa-header .wp-block-button__link { padding: 10px 20px !important; font-size: 15px !important; }
.qa-login a { color: #fff !important; font-weight: 700; text-decoration: none; }
.qa-login a:hover { color: #ffd23f !important; }

/* ---------- confetti ---------- */
.qa-confetti::before, .qa-confetti::after { content: ""; position: absolute; pointer-events: none; z-index: 0; }
.qa-confetti::before { left: 6%; top: 44px; width: 18px; height: 18px; border-radius: 50%; background: #ffd23f; box-shadow: 38vw 50px 0 -3px #ff4f7b, 86vw -14px 0 0 #3ddbd9, 24vw 520px 0 -4px #a78bfa, 70vw 560px 0 -2px #ffd23f; }
.qa-confetti::after { right: 6%; top: 120px; width: 26px; height: 8px; border-radius: 4px; background: #ff4f7b; transform: rotate(-30deg); box-shadow: -50vw 300px 0 0 #ffd23f; }

/* ---------- hero ---------- */
.qa-hero { padding-top: 56px !important; padding-bottom: 130px !important; }
.qa-hero h1 { margin-top: 10px; }
.qa-mock { position: relative; min-height: 520px; }
.qa-screen { position: absolute; left: 0; right: 40px; top: 20px; background: #2a2152; border-radius: 22px; padding: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.45); transform: rotate(2deg); }
.qa-screen-in { background: #fff; border-radius: 12px; padding: 24px; color: #100c24; display: flex; flex-direction: column; gap: 16px; }
.qa-screen-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #5d5873; }
.qa-timer { font-family: 'Bowlby One', sans-serif; background: #100c24; color: #ffd23f; border-radius: 999px; padding: 6px 14px; font-size: 18px; letter-spacing: 0; }
.qa-screen-q { font-family: 'Bowlby One', sans-serif; text-transform: uppercase; font-size: 30px; line-height: 1.05; }
.qa-clip { display: flex; align-items: center; gap: 12px; background: #f4f0ff; border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 13px; color: #5d5873; }
.qa-clip .play { width: 40px; height: 40px; border-radius: 50%; background: #ff4f7b; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.qa-clip .bar { flex: 1; height: 8px; border-radius: 4px; background: #ddd5f5; overflow: hidden; }
.qa-clip .bar i { display: block; width: 45%; height: 100%; background: #ff4f7b; }
.qa-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qa-opts div { border-radius: 12px; padding: 14px; font-weight: 800; font-size: 17px; color: #100c24; }
.qa-opts b, .qa-phone b { font-family: 'Bowlby One', sans-serif; font-weight: 400; margin-right: 6px; }
.qa-a { background: #ff4f7b; } .qa-b { background: #ffd23f; } .qa-c { background: #3ddbd9; } .qa-d { background: #a78bfa; }
.qa-screen-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #5d5873; font-weight: 700; }
.qa-phone { position: absolute; right: 0; bottom: 0; width: 200px; background: #000; border-radius: 34px; padding: 10px; box-shadow: 0 24px 50px rgba(0,0,0,.5); transform: rotate(-6deg); }
.qa-phone-in { background: #100c24; border-radius: 26px; padding: 22px 14px; display: flex; flex-direction: column; gap: 10px; color: #fff; text-align: center; }
.qa-phone-in small { font-size: 11px; font-weight: 700; color: #b9b3d1; }
.qa-phone-in strong { font-family: 'Bowlby One', sans-serif; font-weight: 400; text-transform: uppercase; font-size: 16px; line-height: 1.1; }
.qa-phone-in div { border-radius: 10px; padding: 10px; font-weight: 800; font-size: 14px; color: #100c24; text-align: left; }
.qa-phone-in .on { outline: 3px solid #fff; outline-offset: 2px; }
.qa-points { position: absolute; left: -24px; bottom: 40px; background: #ffd23f; color: #100c24; font-family: 'Bowlby One', sans-serif; text-transform: uppercase; font-size: 26px; padding: 14px 20px; border-radius: 16px; transform: rotate(-8deg); box-shadow: 0 8px 0 #b38f10; }

/* join box (shortcode) */
.qa-join { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #1d1640; border: 2px dashed #3a3166; border-radius: 18px; padding: 14px 14px 14px 20px; max-width: 520px; box-sizing: border-box; color: #fff; }
.qa-join label { font-weight: 800; font-size: 15px; flex: 1 1 140px; line-height: 1.35; }
.qa-join label span { display: block; font-weight: 400; color: #b9b3d1; }
.qa-join input { width: 150px; min-height: 48px; border-radius: 12px; border: 2px solid #4a4180; background: #100c24; color: #fff; font-family: 'Bowlby One', sans-serif; font-size: 22px; letter-spacing: .15em; text-align: center; text-transform: uppercase; box-sizing: border-box; }
.qa-join input:focus { outline: none; border-color: #ffd23f; }
.qa-join button { min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: #ffd23f; color: #100c24; font-family: inherit; font-weight: 800; font-size: 17px; cursor: pointer; }
.qa-join.is-light { background: #fff; border-color: #100c24; color: #100c24; }
.qa-join.is-light label span { color: #5d5873; }

/* ---------- ticker ---------- */
.qa-ticker { transform: rotate(-2deg); margin-top: -44px !important; margin-left: -20px !important; margin-right: -20px !important; padding: 18px 0 !important; position: relative; z-index: 3; box-shadow: 0 10px 0 #100c24; overflow: hidden; }
.qa-ticker p { font-family: 'Bowlby One', sans-serif; text-transform: uppercase; font-size: 30px !important; white-space: nowrap; margin: 0 !important; text-align: center; color: #100c24; }
.qa-ticker p .s { margin: 0 18px; }

/* ---------- cards ---------- */
.qa-card { border: 3px solid #100c24; border-radius: 24px; padding: 32px !important; box-shadow: 8px 8px 0 #100c24; height: 100%; box-sizing: border-box; }
.qa-card > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.qa-card { display: flex; flex-direction: column; gap: 12px; }
.qa-tilt-l { transform: rotate(-1.5deg); }
.qa-tilt-r { transform: rotate(1deg) translateY(16px); }
.qa-num { font-family: 'Bowlby One', sans-serif; font-size: 72px !important; line-height: 1 !important; }
.qa-tile { background: #1d1640; border-radius: 22px; padding: 28px !important; border-top: 8px solid #ff4f7b; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; }
.qa-tile > * { margin: 0 !important; }
.qa-tile p { color: #d9d5e6; }
.qa-tile.is-yellow { border-top-color: #ffd23f; } .qa-tile.is-cyan { border-top-color: #3ddbd9; } .qa-tile.is-lilac { border-top-color: #a78bfa; }
.qa-tile h3 { font-size: 22px; }
.qa-dark-card { background: #100c24; color: #fff; border-radius: 24px; padding: 32px !important; height: 100%; box-sizing: border-box; }
.qa-dark-card > * { margin: 0 0 10px !important; }
.qa-dark-card h3 { color: #ffd23f; font-size: 26px; }
.qa-dark-card p { color: #d9d5e6; }
.wp-block-columns.qa-cols { gap: 24px; }
.wp-block-columns.qa-cols > .wp-block-column { display: flex; flex-direction: column; }

/* ---------- ticks list ---------- */
.qa-ticks { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.qa-ticks li { padding-left: 38px; position: relative; }
.qa-ticks li::before { content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #ff4f7b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23100c24' stroke-width='3'%3E%3Cpath d='M3 8l3 3 7-7'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* ---------- leaderboard mock ---------- */
.qa-board { background: #100c24; border-radius: 28px; padding: 32px; color: #fff; box-shadow: 14px 14px 0 #ff4f7b; transform: rotate(1.5deg); display: flex; flex-direction: column; gap: 12px; }
.qa-board-top { display: flex; justify-content: space-between; align-items: center; font-family: 'Bowlby One', sans-serif; text-transform: uppercase; font-size: 28px; }
.qa-board-top span { font-family: 'Bricolage Grotesque', sans-serif; background: #ffd23f; color: #100c24; font-weight: 800; border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.qa-row { display: flex; align-items: center; gap: 14px; background: #2a2152; border-radius: 14px; padding: 14px 18px; font-weight: 800; font-size: 19px; }
.qa-row b { font-family: 'Bowlby One', sans-serif; font-weight: 400; font-size: 24px; min-width: 30px; color: #ff4f7b; }
.qa-row span { flex: 1; }
.qa-row em { font-style: normal; font-family: 'Bowlby One', sans-serif; font-size: 22px; }
.qa-row.is-top { background: #ffd23f; color: #100c24; }
.qa-row.is-top b { color: #100c24; }
.qa-board small { font-size: 13px; color: #b9b3d1; }

/* ---------- pricing ---------- */
.qa-plan { background: #fff; border: 3px solid #100c24; border-radius: 24px; padding: 28px !important; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; position: relative; }
.qa-plan > * { margin: 0 !important; }
.qa-plan h3 { font-size: 22px; }
.qa-plan .qa-price { font-family: 'Bowlby One', sans-serif; font-size: 48px !important; line-height: 1; }
.qa-plan .qa-price small { font-size: 18px; }
.qa-plan ul { padding-left: 20px; line-height: 1.4; display: flex; flex-direction: column; gap: 6px; }
.qa-plan .wp-block-buttons { margin-top: auto !important; padding-top: 8px; }
.qa-plan.is-featured { background: #ffd23f; box-shadow: 10px 10px 0 #100c24; transform: rotate(-1.5deg); }
.qa-plan.is-featured::before { content: "Venue fave"; position: absolute; top: -18px; right: 18px; background: #ff4f7b; color: #100c24; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px; border-radius: 10px; border: 3px solid #100c24; transform: rotate(4deg); }
.qa-muted { color: #5d5873; }
.is-featured .qa-muted { color: #3b3554; }

/* ---------- FAQ ---------- */
.wp-block-details { border-bottom: 2px solid #100c24; padding: 18px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 800; font-size: 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; font-family: 'Bowlby One', sans-serif; color: #ff4f7b; font-size: 26px; line-height: 1; }
.wp-block-details[open] summary::after { content: "–"; }

/* ---------- big CTA ---------- */
.qa-cta h2 { font-size: clamp(56px, 9vw, 110px) !important; line-height: .9 !important; }

/* ---------- footer ---------- */
.qa-footer a { color: #d9d5e6; text-decoration: none; }
.qa-footer a:hover { color: #ffd23f; }
.qa-footer .qa-logo a { color: #fff; }

/* ---------- test drive (shortcode) ---------- */
.qa-td { max-width: 1100px; margin: 0 auto; background: #2a2152; border-radius: 28px; padding: 14px; box-shadow: 14px 14px 0 #ff4f7b; color: #fff; box-sizing: border-box; }
.qa-td-in { background: #100c24; border-radius: 18px; padding: 32px; display: flex; flex-direction: column; gap: 22px; min-height: 560px; box-sizing: border-box; }
.qa-td-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.qa-td-label { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: #ffd23f; }
.qa-td-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #ff4f7b; }
.qa-td-score { font-family: 'Bowlby One', sans-serif; background: #ffd23f; color: #100c24; border-radius: 999px; padding: 6px 16px; font-size: 18px; }
.qa-td-round { font-weight: 700; color: #b9b3d1; font-size: 15px; }
.qa-td h2, .qa-td h3 { color: #fff; margin: 6px 0 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.02; }
.qa-td-opts { display: flex; flex-wrap: wrap; gap: 14px; }
.qa-td-opt { flex: 1 1 220px; min-height: 76px; display: flex; align-items: center; gap: 14px; text-align: left; border: 0; border-radius: 16px; padding: 16px 20px; font-family: inherit; font-size: 20px; font-weight: 800; color: #100c24; cursor: pointer; transition: transform .12s ease, opacity .2s ease; }
.qa-td-opt:hover:not(:disabled) { transform: translateY(-3px); }
.qa-td-opt:disabled { cursor: default; }
.qa-td-opt b { font-family: 'Bowlby One', sans-serif; font-weight: 400; font-size: 26px; width: 30px; }
.qa-td-opt span { flex: 1; }
.qa-td-opt i { font-style: normal; font-family: 'Bowlby One', sans-serif; font-size: 18px; }
.qa-td-opt.is-dim { opacity: .35; }
.qa-td-opt.is-right { outline: 4px solid #fff; outline-offset: 3px; }
.qa-td-opt.is-wrong { outline: 4px solid #ffd23f; outline-offset: 3px; }
.qa-td-hint { color: #b9b3d1; font-size: 15px; margin: 0; }
.qa-td-fb { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: #1d1640; border-radius: 16px; padding: 18px 22px; }
.qa-td-fb strong { display: block; font-family: 'Bowlby One', sans-serif; font-weight: 400; text-transform: uppercase; font-size: 26px; }
.qa-td-fb span { color: #d9d5e6; }
.qa-td-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: #ff4f7b; color: #100c24 !important; font-family: inherit; font-weight: 800; font-size: 17px; cursor: pointer; box-shadow: 0 5px 0 #b3214a; text-decoration: none !important; }
.qa-td-btn.is-ghost { background: transparent; color: #fff !important; border: 2px solid #fff; box-shadow: none; }
.qa-td-end { display: flex; flex-wrap: wrap; gap: 32px; }
.qa-td-end > div { flex: 1 1 320px; display: flex; flex-direction: column; gap: 12px; }
.qa-td-end p { color: #d9d5e6; margin: 0; }
.qa-td-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* ---------- quiz sets (shortcode) ---------- */
.qa-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.qa-set { border: 3px solid #100c24; border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 8px; background: #ff4f7b; color: #100c24; box-shadow: 6px 6px 0 #100c24; }
.qa-set:nth-child(3n+2) { background: #ffd23f; } .qa-set:nth-child(3n+3) { background: #3ddbd9; }
.qa-set h3 { margin: 4px 0 0; font-size: 26px; }
.qa-set p { margin: 0; }
.qa-set .qa-cat { align-self: flex-start; background: #100c24; color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 6px; }
.qa-set .qa-buy { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.qa-set .qa-buy strong { font-family: 'Bowlby One', sans-serif; font-weight: 400; font-size: 26px; }
.qa-set .qa-buy a { background: #100c24; color: #fff; text-decoration: none; font-weight: 800; padding: 10px 20px; border-radius: 999px; }
.qa-sets-empty { font-size: 20px; font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .qa-sec { padding-top: 80px !important; padding-bottom: 80px !important; }
  .qa-mock { min-height: 0; margin-top: 20px; }
  .qa-screen { position: relative; left: auto; right: auto; top: auto; transform: none; }
  .qa-phone, .qa-points, .qa-login { display: none; }
  .qa-tilt-l, .qa-tilt-r, .qa-board, .qa-plan.is-featured { transform: none; }
  .qa-ticker p { font-size: 22px !important; }
  .qa-header-nav-hide { display: none; }
}
@media (max-width: 600px) {
  .qa-td-in { padding: 22px; }
  .qa-opts { grid-template-columns: 1fr; }
  .qa-screen-q { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .wp-block-button .wp-block-button__link, .qa-td-opt { transition: none; } }

/* ---------- 1.0.1 fixes ---------- */
.qa-confetti { overflow: hidden; }
.qa-hero h1 { margin-bottom: .4em !important; }
.qa-hl::after { bottom: -.04em; height: .12em; }
h1.wp-block-heading, h2.wp-block-heading, h3.wp-block-heading { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.qa-cols h2.wp-block-heading { font-size: clamp(34px, 4.2vw, 54px); }
.wp-block-details + .wp-block-heading { margin-top: 64px !important; }
.qa-td-in { min-height: 0; }

/* ---------- 1.0.2 ---------- */
.wp-block-post-content > .alignfull, .wp-site-blocks > * + *, main.wp-block-group { margin-block-start: 0 !important; }
.wp-block-post-content > .alignfull + .alignfull { margin-top: 0 !important; }

/* ---------- 1.0.4: alignment ---------- */
/* Intro text, stickers and the join box line up with the headings at any screen width */
.is-layout-constrained > .qa-lead:not(.has-text-align-center),
.is-layout-constrained > .qa-join,
.is-layout-constrained > .qa-sticker { margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important; margin-right: auto !important; }
/* Ticker overshoots both edges so the tilt never shows gaps */
.qa-ticker { width: calc(100vw + 160px) !important; max-width: none !important; margin-left: calc(50% - 50vw - 80px) !important; margin-right: 0 !important; }
html, body { overflow-x: clip; }

/* ---------- 1.0.5: moving ticker ---------- */
.qa-ticker.is-moving p { display: flex !important; width: max-content; text-align: left !important; animation: qa-marquee var(--qa-dur, 36s) linear infinite; will-change: transform; }
.qa-ticker .qa-run { display: inline-flex; align-items: center; flex: none; }
.qa-ticker:hover p { animation-play-state: paused; }
@keyframes qa-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-1 * var(--qa-run, 50%))); } }
@media (prefers-reduced-motion: reduce) { .qa-ticker.is-moving p { animation: none; } }
