/*
Theme Name: Kink Dispenser
Theme URI: https://kinkdispenser.org
Author: Kink Dispenser
Description: Custom theme for kinkdispenser.org.
Version: 1.1
Text Domain: kinkdispenser
*/

:root {
  /* leather pride flag colors */
  --pink: #e70039;        /* heart red */
  --pink-dark: #a80030;
  --pink-bright: #ff6178; /* text red, passes AA on --surface */
  --purple: #18186b;      /* navy blue stripe */
  --purple-dark: #0d0d3f;
  --yellow: #d9d7ce;      /* silver */
  --teal: #6b7a9e;       
  --navy: #0d1230;        /* page bg */
  --navy-light: #171d3f;  /* alt sections */
  --surface: #1f2851;     /* cards */
  --cream: #f7f5ef;       /* body text */
  --ink: #131316;         /* footer, shadows */
  --radius: 22px;
  --shadow: 0 10px 0 rgba(6,8,20,0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 999px;
}
.skip-link:focus { top: 12px; }

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: var(--navy);
  color: var(--cream);
  overflow-x: hidden;
}

h1, h2, h3, .logo, .wp-block-button__link, nav a {
  font-family: 'Baloo 2', sans-serif;
}

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

a { color: var(--pink-bright); }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* header */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-light);
  border-bottom: 4px solid var(--yellow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .logo { font-size: 1.2rem; gap: 8px; }
  .logo .orb { width: 24px; height: 24px; }
  .header-inner { padding-left: 16px; padding-right: 16px; }
  .header-cta { margin-right: 8px; padding: 8px 14px; }
}

@media (max-width: 360px) {
  .logo { font-size: 1rem; gap: 6px; }
  .header-cta { margin-right: 0; padding: 8px 10px; }
}

.logo .orb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--pink) 45%, var(--purple) 100%);
  box-shadow: inset -3px -4px 0 rgba(0,0,0,0.15);
  flex-shrink: 0;
}

nav.main-nav ul {
  display: flex;
  gap: 6px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav li { display: flex; }

nav.main-nav a {
  display: block;
  text-decoration: none;
  color: var(--cream);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  transition: transform .15s ease, background .15s ease;
}

nav.main-nav a:hover { background: rgba(200,16,46,0.22); transform: translateY(-1px); }

/* current page stays subtle so Donate is the only red one */
nav.main-nav .current-menu-item > a { background: rgba(255,255,255,0.12); }

nav.main-nav .menu-cta > a,
.header-cta {
  background: var(--pink);
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--yellow);
}
nav.main-nav .menu-cta > a:hover { background: var(--pink-dark); }

.header-cta {
  display: none;
  margin-left: auto;
  margin-right: 12px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 3px solid var(--yellow);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--cream);
  margin: 6px auto;
  width: 22px;
  border-radius: 2px;
}

/* 7 nav items wrap below ~900px */
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .header-cta { display: block; }
  nav.main-nav .menu-cta { display: none; }
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-light);
    border-bottom: 4px solid var(--yellow);
    padding: 10px 24px 18px;
    display: none;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; align-items: stretch; }
  nav.main-nav a { flex: 1; text-align: center; padding: 12px 14px; }
}

/* buttons */

.wp-block-button .wp-block-button__link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  border: 3px solid var(--yellow);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
}

.wp-block-button .wp-block-button__link:active { transform: translateY(6px); box-shadow: none; }

/* button block classes: kd-pink, kd-yellow, kd-outline */
.kd-pink .wp-block-button__link { background: var(--pink); color: #fff; }
.kd-yellow .wp-block-button__link { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.kd-outline .wp-block-button__link { background: transparent; color: var(--cream); }

/* hero */

.hero {
  position: relative;
  background: var(--navy);
  color: var(--cream);
  padding: 90px 0 130px;
  overflow: hidden;
}

.hero .wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 18px;
}

.hero h1 span { color: var(--yellow); }

/* italic = silver accent */
.hero h1 em { font-style: normal; color: var(--yellow); }

.hero p.lede {
  font-size: 1.15rem;
  max-width: 46ch;
  color: #e8e2f7;
}

.hero .kd-outline .wp-block-button__link { color: var(--cream); border-color: var(--cream); }

.hero .wp-block-buttons { gap: 14px; margin-top: 28px; }

/* block hero */
.hero .wp-block-columns {
  position: relative;
  z-index: 2;
  gap: 40px;
  margin: 0;
}

.machine {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.machine svg { width: 100%; height: auto; }

.hero figure.machine { margin: 0 auto; }
.hero .machine img { width: 100%; height: auto; border-radius: 0; }

.hero-orbs {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-orbs .o {
  position: absolute;
  border-radius: 50%;
  opacity: 0.85;
}

.wave {
  display: block;
  width: 100%;
  height: 60px;
  margin-top: -2px;
}

/* sections */

section { padding: 76px 0; }

section.alt { background: var(--navy-light); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

.section-head .eyebrow,
.hero .eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-head h2,
:where(.home .entry-content > section) h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin: 0 0 10px;
}

.home .entry-content > section h2 { line-height: 1.2; }

/* home section headings */
:where(.home .entry-content > section) h2 { margin: 48px 0 14px; }
:where(.home .entry-content > section) h2:first-child { margin-top: 0; }

.card {
  background: var(--surface);
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.card .num {
  position: absolute;
  top: -18px;
  left: 22px;
  background: var(--pink);
  color: #fff;
  border: 3px solid var(--yellow);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.card h3 { margin-top: 14px; }

/* events */

.empty-note {
  text-align: center;
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 40px 24px;
  color: #a9a9b8;
  font-weight: 600;
}

/* footer */

footer {
  background: var(--ink);
  color: #c7cad9;
  padding: 50px 0 30px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

footer a { color: #fff; }

footer .foot-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.age-badge {
  display: inline-block;
  border: 2px solid var(--yellow);
  color: var(--yellow);
  border-radius: 8px;
  padding: 2px 8px;
  font-weight: 800;
  font-size: 0.75rem;
  margin-right: 8px;
}

.page-hero {
  background: var(--navy-light);
  color: var(--cream);
  padding: 60px 0 90px;
  text-align: center;
}

.page-hero h1 { color: #fff; }
.page-hero h1 span { color: var(--yellow); }

/* page content. plain blocks get a 760px column, <section>s go full width */

.entry-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 76px 24px;
}

.entry-content:has(> section) {
  max-width: none;
  padding: 0;
}

.entry-content:has(> section) > :not(section) {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* sections without .wrap */
.entry-content > section:not(:has(> .wrap)) {
  padding-left: max(24px, calc((100% - 760px) / 2));
  padding-right: max(24px, calc((100% - 760px) / 2));
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2:not(section *) {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 48px 0 14px;
}

.entry-content h3:not(section *) {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  margin: 32px 0 10px;
}

.entry-content p:not(section *),
:where(.entry-content > section:not(:has(> .wrap)):not(.hero)) p {
  line-height: 1.65;
}

.entry-content p:not(section *) { margin: 0 0 20px; }

.entry-content ul:not(section *),
.entry-content ol:not(section *) {
  margin: 0 0 20px 1.3em;
  padding: 0;
  line-height: 1.6;
}

.entry-content li:not(section *) { margin-bottom: 6px; }

.entry-content blockquote,
.entry-content .wp-block-quote {
  border-left: 6px solid var(--pink-bright);
  padding: 4px 0 4px 22px;
  font-style: italic;
  font-size: 1.15rem;
  color: #d7d5e0;
  margin: 32px 0;
}

.entry-content hr {
  border: none;
  border-top: 2px solid rgba(255,255,255,0.15);
  margin: 48px 0;
}

.entry-content figure { margin: 0 0 24px; }
.entry-content img { border-radius: var(--radius); }

/* card bands */
.entry-content > section.kd-band,
.entry-content > section.hero {
  padding-left: max(24px, calc((100% - 1072px) / 2));
  padding-right: max(24px, calc((100% - 1072px) / 2));
}

.wp-block-columns.kd-cards {
  gap: 26px;
  margin: 0;
}

.kd-cards > .wp-block-column.card { margin: 0; }
.kd-cards .card p { margin-bottom: 0; }

/* badge widens for $13 */
.kd-cards .card .num {
  margin: 0;
  width: auto;
  min-width: 42px;
  padding: 0 9px;
  border-radius: 999px;
}

.kd-band .kd-cards + p {
  max-width: 640px;
  margin: 34px auto 0;
}

/* two-card rows */
.wp-block-columns.kd-pair {
  gap: 26px;
  margin: 0;
}

.kd-pair > .wp-block-column.card { margin: 0; }
.kd-pair .card h3 { font-size: 1.5rem; margin: 10px 0; }
.kd-pair .card p { line-height: 1.6; }

.kd-tag {
  display: inline-block;
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* sign-off, italic = red */
.kd-sign {
  text-align: center;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 34px 0 0;
}
.kd-sign em { font-style: normal; color: var(--pink-bright); }

/* about page blocks */

.kd-story h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.2; margin: 0 0 20px; }
:where(.kd-story) p { font-size: 1.075rem; }

/* pull quote */
.entry-content .kd-pull {
  border-left: 6px solid var(--pink);
  padding: 4px 0 4px 22px;
  margin: 30px 0;
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
}

/* big centered line, italic = silver */
.entry-content .kd-big {
  text-align: center;
  margin: 36px 0;
  font-family: 'Baloo 2', sans-serif;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  line-height: 1.3;
}
.entry-content .kd-big:last-child { margin-bottom: 0; }
.kd-big em { font-style: normal; color: var(--yellow); }

/* orb bullets */
ul.kd-orbs { list-style: none; padding: 0; margin: 24px 0; }
ul.kd-orbs li { position: relative; padding-left: 36px; margin-bottom: 14px; font-size: 1.075rem; line-height: 1.55; }
ul.kd-orbs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  background: radial-gradient(circle at 35% 30%, #fff, var(--pink) 45%, var(--purple) 100%);
}

.kd-cta { text-align: center; }
.kd-cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.2; margin: 0 0 14px; }
.kd-cta .wp-block-buttons { justify-content: center; margin-top: 24px; }

/* speech bubbles */
.wp-block-columns.kd-ask { gap: 26px; margin: 34px 0 10px; }
.kd-ask > .wp-block-column {
  position: relative;
  background: var(--surface);
  border: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.kd-ask > .wp-block-column::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 34px;
  width: 24px;
  height: 24px;
  background: var(--surface);
  border-right: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
  transform: rotate(45deg);
}
.entry-content .kd-ask p { margin: 0; }
.entry-content .kd-ask p.kd-tag { margin-bottom: 10px; text-transform: none; letter-spacing: 0; font-size: .85rem; }
.entry-content .kd-ask p:not(.kd-tag) {
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

/* keep prose narrow in wide bands */
.kd-story.kd-band p { max-width: 760px; margin-left: auto; margin-right: auto; }
.kd-story.kd-band .card p,
.kd-story.kd-band .kd-ask p { max-width: none; }

/* belief cards */
.kd-beliefs > .wp-block-column.card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 34px 20px 26px;
}
.kd-beliefs > .wp-block-column.card::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  border-radius: 50%;
  border: 3px solid var(--yellow);
  background: radial-gradient(circle at 35% 30%, #fff, var(--pink) 45%, var(--purple) 100%);
}
.entry-content .kd-beliefs .card p {
  margin: 0;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
@media (min-width: 782px) and (max-width: 1100px) {
  .wp-block-columns.kd-beliefs { flex-wrap: wrap !important; row-gap: 34px; }
  .wp-block-columns.kd-beliefs > .wp-block-column { flex-basis: calc(33.33% - 18px) !important; flex-grow: 1; }
}
@media (max-width: 781px) {
  .wp-block-columns.kd-beliefs { row-gap: 34px; }
}

/* molotov stays lowercase */
.kd-story .kd-tag { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.entry-content .kd-story .kd-pair + p { margin-top: 34px; }

/* profile cards */
.kd-pair .kd-orbs { margin: 4px 0 18px; }
.kd-pair .kd-orbs li { margin-bottom: 8px; font-size: 1rem; }
.entry-content .kd-pair p.kd-lead { margin: 14px 0 6px; font-weight: 800; }
.kd-story .kd-pair > .card { display: flex; flex-direction: column; }
.kd-story .kd-pair > .card > * { margin-top: 0; margin-left: 0; margin-right: 0; }
.kd-story .kd-pair > .card > p.kd-tag { align-self: flex-start; }

/* no orphan words in headings */
.kd-story .section-head h2,
.kd-cta h2 { text-wrap: balance; }
.kd-story:not(.kd-band) .section-head { margin-bottom: 20px; }

/* how it works blocks */

/* price cards */
.kd-prices > .wp-block-column.card { text-align: center; padding: 34px 16px 20px; }
.kd-prices .card .num { left: 50%; transform: translateX(-50%); }
.entry-content .kd-prices .card h3 { margin: 4px 0 0; font-size: 1.35rem; }

/* 4 cards go 2+2 on tablets */
@media (min-width: 782px) and (max-width: 1100px) {
  .wp-block-columns.kd-beliefs:has(> :nth-child(4):last-child) > .wp-block-column { flex-basis: calc(50% - 13px) !important; }
}

/* callout card */
.entry-content .kd-story .wp-block-group.card { margin: 36px 0 0; padding: 30px 30px 14px; }
.kd-story .wp-block-group.card h3 { font-size: 1.5rem; margin: 10px 0 12px; }
.entry-content .kd-story .kd-prices + .kd-pair { margin-top: 34px; }
.entry-content .kd-story .kd-pair > .card > p.kd-tag + p:not(.kd-lead) { margin-top: 12px; }
.entry-content .kd-story p + .kd-beliefs { margin-top: 36px; }

/* shared blocks for the content pages */

.wp-block-buttons.kd-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 28px 0 0; }

/* faq */
.entry-content details.wp-block-details {
  background: var(--surface);
  border: 3px solid var(--yellow);
  border-radius: 18px;
  margin: 0 0 14px;
  padding: 0;
}
.entry-content details.wp-block-details summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 56px 16px 22px;
  font-family: 'Baloo 2', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.entry-content details.wp-block-details summary::-webkit-details-marker { display: none; }
.entry-content details.wp-block-details summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--pink-bright);
}
.entry-content details.wp-block-details[open] summary::after { content: "\2013"; }
.entry-content details.wp-block-details > p { margin: 0 22px 14px; }
.entry-content details.wp-block-details > p:last-child { margin-bottom: 20px; }

footer .foot-links { display: flex; gap: 48px; flex-wrap: wrap; line-height: 1.9; }
.entry-content .kd-cards + .kd-cards { margin-top: 26px; }
.entry-content .kd-story p + .kd-pair,
.entry-content .kd-story p + .kd-cards { margin-top: 30px; }

/* clear the sticky header on #anchors */
.entry-content section[id] { scroll-margin-top: 90px; }

/* fee table */
.entry-content .wp-block-table.kd-fees { margin: 28px auto; max-width: 760px; }
.kd-fees table { width: 100%; border-collapse: separate; border-spacing: 0; border: 3px solid var(--yellow); border-radius: 18px; overflow: hidden; background: var(--surface); }
.entry-content .kd-fees th, .entry-content .kd-fees td {
  padding: 12px 16px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  word-break: normal;
  overflow-wrap: normal;
}
@media (max-width: 600px) {
  .entry-content .kd-fees th, .entry-content .kd-fees td { padding: 10px 10px; font-size: .9rem; }
}
.kd-fees th { background: var(--yellow); color: var(--ink); font-family: 'Baloo 2', sans-serif; font-weight: 800; }
.kd-fees tr:last-child td { border-bottom: none; }
.kd-fees td:last-child { font-weight: 800; }
.kd-fees figcaption { margin-top: 10px; font-size: .9rem; color: #c7cad9; text-align: center; }

/* centered hero, no image */
.hero.hero-center { text-align: center; padding-bottom: 96px; }
.hero.hero-center h1 { margin-left: auto; margin-right: auto; max-width: 18ch; text-wrap: balance; }
.hero.hero-center p.lede { margin: 0 auto; }

/* left-align prose headings */
.kd-story:not(.kd-band) .section-head { max-width: 760px; text-align: left; }
.kd-story:not(.kd-band) .section-head h2 { text-wrap: pretty; }
.entry-content .kd-event + p { margin-top: 28px; }

/* temporary event banner in the home hero */
.hero .kd-banner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: -40px auto 48px;
  padding: 14px 22px;
  text-align: center;
  background: var(--surface);
  border: 2px solid var(--yellow);
  border-radius: 20px;
  line-height: 1.5;
}
.hero .kd-banner strong { color: var(--pink-bright); }
.hero .kd-banner { text-wrap: balance; }
.kd-nowrap { white-space: nowrap; }
