/* Drag Queen Name Generator. Palette: aubergine, powder, orchid, magenta, marquee gold. */
:root {
  --ink: #24102e;
  --ink-2: #36193f;
  --paper: #fbf7fa;
  --surface: #f3e9f2;
  --line: #e2d2e1;
  --field: #86708f;
  --muted: #5c4766;
  --accent: #b3124f;
  --accent-dark: #8e0d3e;
  --gold: #f2b84b;
  --bulb: #ffe7a3;
  --cream: #fff5dc;
  --focus: #1b5fd6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 1.0625rem/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: .75rem; color: var(--paper); }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.brand:hover { color: var(--accent-dark); }
.brand svg { flex: none; }
.nav ul { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .55rem .85rem; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--accent-dark); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; border: 1.5px solid var(--field); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; }
.menu-toggle:hover { background: var(--surface); }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; content: ""; position: relative; transition: transform .2s, top .2s, opacity .2s; }
.menu-toggle .bars::before { position: absolute; top: -6px; }
.menu-toggle .bars::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .js .menu-toggle { display: inline-flex; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem 1rem 1rem; }
  .js .nav.open { display: block; }
  .js .nav ul { flex-direction: column; gap: 0; }
  .js .nav a { padding: .9rem .25rem; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
  .js .nav a[aria-current="page"] { border-left-color: var(--accent); border-bottom-color: var(--line); padding-left: .75rem; }
  .brand { font-size: 1rem; }
}

/* ---------- buttons, chips, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.4rem; border: 2px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font: 700 1rem var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(255, 245, 220, .55); }
.btn-ghost:hover { background: rgba(255, 245, 220, .12); border-color: var(--cream); color: var(--cream); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

label, legend { font-weight: 600; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-height: 46px; padding: .6rem .8rem; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--field); border-radius: 8px;
}
textarea { min-height: 150px; resize: vertical; }
[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.error { color: var(--accent-dark); font-size: .95rem; font-weight: 600; min-height: 1.2em; margin: 0; }
.hint { color: var(--muted); font-size: .95rem; margin: 0; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }

fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
legend { padding: 0; margin-bottom: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: .5rem 1rem; min-height: 40px; border: 1.5px solid var(--field); border-radius: 999px; background: #fff; font-weight: 600; font-size: .98rem; transition: background .15s, color .15s; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip:hover input:not(:checked) + span { background: var(--surface); }

/* ---------- hero ---------- */
.hero { padding: 2.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
@media (min-width: 900px) {
  .hero { padding: 4rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 3.5rem; }
}

/* ---------- the dressing-room mirror (results panel) ---------- */
.mirror { scroll-margin-top: 80px; position: relative; background: var(--ink); color: var(--cream); border-radius: 16px; padding: 2.4rem 2.1rem; }
@media (max-width: 480px) { .mirror { padding: 2.2rem 1.7rem; } }
.mirror::before {
  content: ""; position: absolute; inset: 7px; border-radius: 11px; pointer-events: none;
  --b: radial-gradient(circle, var(--bulb) 0 2.6px, rgba(242, 184, 75, .38) 3.4px, transparent 6.5px);
  background:
    var(--b) top left / 22px 16px repeat-x,
    var(--b) bottom left / 22px 16px repeat-x,
    var(--b) top left / 16px 22px repeat-y,
    var(--b) top right / 16px 22px repeat-y;
}
.mirror.flash::before { animation: bulbs .7s ease-out; }
@keyframes bulbs { 0% { filter: brightness(.55); } 40% { filter: brightness(1.7); } 100% { filter: brightness(1); } }
.mirror h2, .mirror h3 { color: var(--cream); }
.mirror .status { min-height: 1.5em; margin: 0 0 .75rem; color: #e9d6ee; font-size: .98rem; }
.names { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.name-row, .fav-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .75rem .6rem 1rem; border-radius: 10px; background: var(--ink-2); }
.name-row { animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.name-text { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.3rem; line-height: 1.2; color: var(--cream); overflow-wrap: anywhere; }
.row-actions { display: inline-flex; gap: .4rem; flex: none; }
.mini-btn { min-height: 38px; min-width: 64px; padding: .3rem .75rem; border: 1.5px solid rgba(255, 245, 220, .55); border-radius: 8px; background: transparent; color: var(--cream); font: 600 .92rem var(--sans); cursor: pointer; }
.mini-btn:hover { background: rgba(255, 245, 220, .14); border-color: var(--cream); }
.mini-btn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.mini-btn:focus-visible { outline-color: var(--bulb); }
.mirror-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.mirror .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.mirror .btn:hover { background: #ffd27c; border-color: #ffd27c; color: var(--ink); }
.mirror .btn-ghost { background: transparent; color: var(--cream); border-color: rgba(255, 245, 220, .55); }
.mirror .btn-ghost:hover { background: rgba(255, 245, 220, .12); border-color: var(--cream); color: var(--cream); }
@media (min-width: 640px) {
  .names.two-col { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .name-row, .mirror.flash::before { animation: none; }
  * { transition: none !important; }
}

/* ---------- mini generator on home ---------- */
.mini-controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1.25rem; position: relative; }
.mini-controls .field { margin: 0; flex: 1 1 11rem; }
.mirror .mini-controls label { color: var(--cream); }

/* ---------- tool page ---------- */
.crumbs { padding: 1rem 0 0; font-size: .95rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--field); }
.crumbs a { color: var(--muted); }
.page-head { padding: 1.25rem 0 1.5rem; }
.page-head p { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }
.tool-grid { display: grid; gap: 1.5rem; padding-bottom: 2.5rem; }
@media (min-width: 960px) { .tool-grid { grid-template-columns: minmax(300px, 380px) 1fr; align-items: start; } .tool-controls { position: sticky; top: 84px; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; }
.tabs { display: flex; gap: .35rem; margin-bottom: 1rem; padding: .3rem; background: var(--surface); border-radius: 10px; }
.tabs [role="tab"] { flex: 1; min-height: 42px; padding: .4rem .5rem; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 600 .95rem var(--sans); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { background: #fff; box-shadow: 0 1px 2px rgba(36, 16, 46, .25); }
.row-2 { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
.row-3 { display: grid; gap: 0 .75rem; grid-template-columns: 1fr 1fr; }
.row-3 > :first-child { grid-column: 1 / -1; }
.saved { margin-top: 1.5rem; }
.saved .fav-row { background: var(--surface); }
.saved .name-text { color: var(--ink); font-size: 1.15rem; }
.mini-btn-light { border-color: var(--field); color: var(--ink); }
.mini-btn-light:hover { background: #fff; border-color: var(--ink); }
.fav-list { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .5rem; }
.fav-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.saved .status { min-height: 1.4em; color: var(--muted); margin: .5rem 0 0; font-size: .95rem; }

/* ---------- content sections ---------- */
.section { padding: 2.75rem 0; }
.section.tint { background: var(--surface); }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45rem; }
.prose .meta { color: var(--muted); font-size: .98rem; }
.split { display: grid; gap: 2rem; }
.split > * { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.4fr; gap: 3.5rem; } }
.style-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.style-list li { display: grid; gap: .25rem .75rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .style-list li { grid-template-columns: 11rem 1fr auto; align-items: baseline; } }
.style-list strong { font-family: var(--serif); font-size: 1.2rem; }
.style-list .samples { color: var(--muted); font-style: italic; font-family: var(--serif); }
.style-list p { margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.steps li { position: relative; padding-left: 3rem; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: .05rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font: 700 1rem var(--serif); }
.steps strong { display: block; font-family: var(--serif); font-size: 1.15rem; }
.dl dt { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin-top: 1.1rem; }
.dl dd { margin: .2rem 0 0; }
.dl .ex { color: var(--muted); font-style: italic; }
.notice { border-left: 4px solid var(--gold); background: #fff; padding: .9rem 1rem; border-radius: 0 10px 10px 0; margin: 0 0 1.25rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .98rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 1rem 2.5rem 1rem 0; font-weight: 700; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .25rem; top: .75rem; font: 400 1.6rem/1 var(--sans); color: var(--accent); }
details[open] summary::after { content: "\2212"; }
details p { margin: 0 0 1rem; max-width: 70ch; }

.cta-band { background: var(--ink); color: var(--cream); padding: 3rem 0; }
.cta-band h2 { color: var(--cream); }
.cta-band p { max-width: 36rem; color: #e9d6ee; }
.cta-band .btn { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.cta-band .btn:hover { background: #ffd27c; border-color: #ffd27c; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 2rem; padding-bottom: 3rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.3fr 1fr; gap: 3rem; } }
#contact-success { border: 2px solid var(--accent); background: #fff; border-radius: 12px; padding: 1rem 1.1rem; margin-top: 1rem; }
#contact-success:focus { outline: 3px solid var(--focus); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #e9d6ee; padding: 3rem 0 2rem; margin-top: 0; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer h2 { font-family: var(--serif); font-size: 1.1rem; color: var(--cream); margin-bottom: .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .brand { color: var(--cream); margin-bottom: .75rem; }
.site-footer p { max-width: 28rem; font-size: .98rem; }
.copyright { border-top: 1px solid rgba(255, 245, 220, .2); margin-top: 2rem; padding-top: 1.25rem; font-size: .92rem; }

.notfound { text-align: center; padding: 4rem 0 5rem; }
.notfound p { color: var(--muted); max-width: 32rem; margin-inline: auto; }
.notfound .hero-actions { justify-content: center; }
