/* AmIaHippie.com — styles
   Palette: poster cream, brown ink, and the six Woodstock-poster stripe colors. */
:root {
  --cream: #F7E6C4;
  --paper: #FBF0DA;
  --ink: #3B2314;
  --ink-soft: #6A4A33;
  --orange: #E0661C;
  --mustard: #E8A92B;
  --avocado: #7A8B2E;
  --purple: #6B3FA0;
  --pink: #EE6B8B;
  --teal: #2E8B84;
  --display: "Shrikhand", "TeX Gyre Bonum", "Bookman Old Style", Georgia, serif;
  --body: "Nunito", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --stripes: linear-gradient(90deg, var(--purple) 0 16.6%, var(--pink) 0 33.3%, var(--orange) 0 50%, var(--mustard) 0 66.6%, var(--avocado) 0 83.3%, var(--teal) 0);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }
:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; border-radius: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── Header & footer ─────────────────────────── */
.stripe-band { height: 14px; background: var(--stripes); }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1040px; width: 100%; margin: 0 auto; padding: 14px 20px;
}
.logo {
  font-family: var(--display); font-size: 1.35rem; color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.logo img { width: 34px; height: 34px; }
.logo .tld { color: var(--orange); }
.header-note { font-size: .9rem; color: var(--ink-soft); }
main { flex: 1; width: 100%; }
.site-footer {
  margin-top: 64px; background: var(--ink); color: var(--paper); font-size: .95rem;
}
.site-footer .inner { max-width: 1040px; margin: 0 auto; padding: 28px 20px 36px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer a { color: var(--mustard); }
.site-footer p { margin: 0; }

/* ── Buttons ─────────────────────────────────── */
.btn {
  --bg: var(--orange); --fg: var(--paper);
  appearance: none; border: 4px solid var(--ink); background: var(--bg); color: var(--fg);
  font: 800 1.1rem/1.2 var(--body); padding: 14px 26px; border-radius: var(--radius-pill);
  cursor: pointer; box-shadow: 5px 5px 0 var(--ink); transition: transform .12s, box-shadow .12s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); color: var(--fg); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn-big { font-size: 1.3rem; padding: 18px 36px; }
.btn-quiet { --bg: var(--paper); --fg: var(--ink); }
.btn-purple { --bg: var(--purple); }
.btn-small { font-size: .95rem; padding: 9px 18px; box-shadow: 3px 3px 0 var(--ink); border-width: 3px; }

/* ── Intro / hero ────────────────────────────── */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 56px 20px 72px; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 58%;
  width: 1800px; height: 1800px; margin: -900px 0 0 -900px;
  background: repeating-conic-gradient(from 0deg, #F3D49A 0 7.5deg, var(--cream) 7.5deg 15deg);
  animation: spin 160s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-kicker { font-weight: 800; color: var(--purple); font-size: 1.05rem; margin: 0 0 10px; }
.groovy-title {
  font-family: var(--display); font-weight: 400; color: var(--paper);
  font-size: clamp(3.2rem, 11vw, 7.4rem); line-height: .95; margin: 0 auto 24px;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--mustard), 8px 8px 0 var(--orange), 12px 12px 0 var(--pink), 16px 16px 0 var(--purple);
  letter-spacing: .01em;
}
.groovy-title span { display: block; }
.hero-lede { max-width: 34em; margin: 0 auto 30px; font-size: 1.2rem; }
.hero-meta { margin: 18px 0 0; color: var(--ink-soft); font-size: .98rem; }
.privacy-pill {
  display: inline-flex; gap: 8px; align-items: center; margin-top: 18px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--radius-pill);
  padding: 6px 16px; font-size: .92rem; font-weight: 600;
}

.section { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.section h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.1; margin: 56px 0 18px; }
.get-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.get-list li { background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.get-list .ico { font-size: 1.8rem; line-height: 1; }
.get-list strong { display: block; }
.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.dim-card { border: 4px solid var(--ink); border-radius: var(--radius-lg); padding: 20px 22px; background: var(--paper); }
.dim-card h3 { margin: 0 0 6px; font-size: 1.3rem; }
.dim-card .weight { font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.dim-card.lifestyle .weight { color: var(--orange); }
.dim-card.soul .weight { color: var(--purple); }
.faq details { border-bottom: 3px dashed var(--ink-soft); padding: 14px 0; }
.faq summary { font-weight: 800; cursor: pointer; font-size: 1.1rem; }
.faq p { margin: 10px 0 0; max-width: 62ch; }

/* ── Quiz ────────────────────────────────────── */
.quiz-wrap { max-width: 760px; margin: 0 auto; padding: 18px 20px 0; }
.journey { margin: 4px 0 22px; }
.journey-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 800; font-size: .95rem; }
.journey-top .count { color: var(--ink-soft); font-weight: 600; }
.track { position: relative; height: 22px; border: 3px solid var(--ink); border-radius: var(--radius-pill); background: var(--paper); margin-top: 8px; overflow: hidden; }
.track-fill { height: 100%; width: 0; background: var(--stripes); background-size: 760px 100%; transition: width .45s cubic-bezier(.3,1.4,.5,1); }
.milestones { display: flex; justify-content: space-between; margin-top: 6px; font-size: 1.35rem; }
.milestones span { opacity: .3; transition: opacity .3s, transform .3s; }
.milestones span.on { opacity: 1; transform: scale(1.15); }

.q-card { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius-lg); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.q-art { aspect-ratio: 16 / 10; background: var(--cream); border-bottom: 4px solid var(--ink); }
.q-art img { width: 100%; height: 100%; object-fit: cover; }
.q-body { padding: 22px 24px 26px; }
.q-cat { display: inline-block; font-weight: 800; font-size: .9rem; color: var(--paper); background: var(--purple); border-radius: var(--radius-pill); padding: 3px 14px; margin-bottom: 10px; }
.q-cat[data-cat="1"] { background: var(--orange); }
.q-cat[data-cat="2"] { background: var(--pink); }
.q-cat[data-cat="3"] { background: var(--purple); }
.q-cat[data-cat="4"] { background: var(--avocado); }
.q-cat[data-cat="5"] { background: var(--teal); }
.q-text { font-size: clamp(1.35rem, 3.6vw, 1.75rem); line-height: 1.25; font-weight: 800; margin: 0 0 18px; }
.q-text:focus { outline: none; }
.answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.answer {
  width: 100%; text-align: left; display: flex; gap: 14px; align-items: center;
  font: 600 1.05rem/1.35 var(--body); color: var(--ink);
  background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; padding: 12px 16px;
  cursor: pointer; transition: transform .1s, background .15s, box-shadow .1s;
}
.answer:hover { background: #F9DDB0; transform: translateX(4px); }
.answer .letter {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink);
  display: grid; place-items: center; font: 400 1.1rem var(--display); background: var(--paper);
}
.answer:nth-child(1) .letter, .answers li:nth-child(1) .letter { background: var(--mustard); }
.answers li:nth-child(2) .letter { background: var(--pink); }
.answers li:nth-child(3) .letter { background: var(--avocado); color: var(--paper); }
.answers li:nth-child(4) .letter { background: var(--purple); color: var(--paper); }
.answer.picked { background: var(--mustard); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.answer:disabled { cursor: default; }
.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; min-height: 44px; }
.link-btn { background: none; border: 0; font: 700 1rem var(--body); color: var(--ink-soft); cursor: pointer; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--orange); }

.quip {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 140%);
  width: min(560px, calc(100% - 32px)); z-index: 30;
  background: var(--ink); color: var(--paper); border-radius: 20px; padding: 14px 20px;
  font-weight: 700; font-size: 1.05rem; display: flex; gap: 12px; align-items: center;
  box-shadow: 6px 6px 0 var(--orange); transition: transform .35s cubic-bezier(.3,1.4,.5,1);
}
.quip.show { transform: translate(-50%, 0); }
.quip .q-emoji { font-size: 1.6rem; }

/* entering question */
.q-card.enter { animation: pop .38s cubic-bezier(.3,1.4,.5,1); }
@keyframes pop { from { transform: scale(.96) rotate(-1deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Loading / rainbow sweep ─────────────────── */
.loading { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; position: relative; overflow: hidden; }
.loading h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 14px; }
.loading .line { font-size: 1.25rem; font-weight: 700; min-height: 2em; }
.spinner-peace { font-size: 4rem; animation: spin 2.4s linear infinite; display: inline-block; }
.rainbow-sweep {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  background: linear-gradient(100deg, transparent 0 20%, var(--purple) 20% 30%, var(--pink) 30% 40%, var(--orange) 40% 50%, var(--mustard) 50% 60%, var(--avocado) 60% 70%, var(--teal) 70% 80%, transparent 80%);
  transform: translateX(-110%);
}
.rainbow-sweep.go { animation: sweep 1.1s cubic-bezier(.7,0,.3,1) forwards; }
@keyframes sweep { to { transform: translateX(110%); } }

/* ── Results ─────────────────────────────────── */
.results { max-width: 900px; margin: 0 auto; padding: 24px 20px 0; }
.result-hero { text-align: center; position: relative; padding: 30px 0 10px; isolation: isolate; }
.result-hero::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 150px; width: 1100px; height: 1100px; margin: -550px 0 0 -550px;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tier, var(--orange)) 22%, var(--cream)) 0 7.5deg, var(--cream) 7.5deg 15deg);
  border-radius: 50%;
  mask-image: radial-gradient(circle, #000 35%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 70%);
}
.result-label { font-weight: 800; font-size: 1.05rem; margin: 0; color: var(--ink-soft); }
.result-pct {
  font-family: var(--display); font-size: clamp(5rem, 22vw, 10rem); line-height: 1; margin: 6px 0 2px;
  color: var(--paper); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--mustard), 10px 10px 0 var(--orange), 15px 15px 0 var(--pink), 20px 20px 0 var(--purple);
}
.result-pct small { font-size: .5em; }
.result-word { font-family: var(--display); font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0; }
.tier-name { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 7vw, 3.6rem); line-height: 1.05; margin: 20px auto 6px; max-width: 16ch; color: var(--tier, var(--orange)); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.tier-status { font-weight: 800; margin: 0; }
.tier-status b { background: var(--ink); color: var(--paper); border-radius: var(--radius-pill); padding: 2px 12px; }
.tier-quote { font-size: clamp(1.25rem, 3.4vw, 1.6rem); font-style: italic; font-weight: 600; max-width: 30em; margin: 22px auto 0; }

.result-grid { display: grid; gap: 20px; margin-top: 36px; grid-template-columns: 1.4fr 1fr; }
@media (max-width: 760px) { .result-grid { grid-template-columns: 1fr; } }
.panel { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius-lg); padding: 22px 24px; }
.panel h3 { font-family: var(--display); font-weight: 400; font-size: 1.55rem; margin: 0 0 10px; line-height: 1.15; }
.panel p { margin: 0 0 10px; }
.treatment { margin-top: 14px; border-top: 3px dashed var(--ink-soft); padding-top: 12px; }
.treatment b { color: var(--purple); }
.musician-name { font-family: var(--display); font-size: 1.7rem; line-height: 1.15; color: var(--orange); }
.meter { margin: 12px 0 16px; }
.meter-top { display: flex; justify-content: space-between; font-weight: 800; }
.meter-bar { height: 20px; border: 3px solid var(--ink); border-radius: var(--radius-pill); background: var(--cream); overflow: hidden; margin-top: 4px; }
.meter-bar i { display: block; height: 100%; width: 0; transition: width 1.2s cubic-bezier(.3,1,.4,1) .3s; }
.meter.l i { background: var(--orange); }
.meter.s i { background: var(--purple); }
.meter-note { font-size: .92rem; color: var(--ink-soft); margin: 0; }

.badges { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.badges li { display: flex; gap: 12px; align-items: center; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 14px; }
.badges .b-emoji { font-size: 2rem; line-height: 1; }
.badges strong { display: block; line-height: 1.2; }
.badges span.desc { font-size: .92rem; color: var(--ink-soft); }
.badges li.locked { opacity: .45; border-style: dashed; }

/* certificate */
.cert-panel { margin-top: 20px; }
.cert-row { display: grid; gap: 22px; grid-template-columns: 1fr 1.25fr; align-items: start; }
@media (max-width: 760px) { .cert-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 800; margin-bottom: 6px; }
.field input {
  width: 100%; font: 700 1.15rem var(--body); color: var(--ink); background: var(--cream);
  border: 3px solid var(--ink); border-radius: 14px; padding: 12px 14px;
}
.field input:focus-visible { outline-offset: 2px; }
.privacy-note { display: flex; gap: 10px; background: #E9F0D2; border: 3px solid var(--avocado); border-radius: 14px; padding: 10px 14px; font-size: .95rem; margin: 14px 0 16px; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cert-preview { border: 4px solid var(--ink); border-radius: 14px; background: var(--cream); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.cert-preview canvas { width: 100%; height: auto; display: block; }

/* sharing */
.share-panel { margin-top: 20px; text-align: center; }
.share-panel h3 { font-size: 1.9rem; }
.share-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0 6px; }
.share-btn {
  border: 3px solid var(--ink); border-radius: var(--radius-pill); padding: 9px 16px;
  font: 800 .98rem var(--body); color: #fff; background: var(--c, var(--ink)); cursor: pointer; text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .1s, box-shadow .1s;
  display: inline-flex; align-items: center; gap: 8px;
}
.share-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); color: #fff; }
.share-btn.light { color: var(--ink); }
.share-btn.light:hover { color: var(--ink); }
.share-hint { font-size: .95rem; color: var(--ink-soft); min-height: 1.6em; margin: 8px 0 0; }
.challenge { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2rem); margin: 34px 0 6px; text-align: center; }
.warning { text-align: center; font-style: italic; color: var(--ink-soft); margin: 0 0 18px; }
.again { text-align: center; margin-top: 18px; }

/* friend banner on /r/ pages */
.friend-banner { max-width: 640px; margin: 0 auto 18px; background: var(--ink); color: var(--paper); border-radius: 18px; padding: 12px 18px; font-weight: 700; }

/* ── Simple pages ────────────────────────────── */
.prose { max-width: 720px; margin: 0 auto; padding: 30px 20px 0; }
.prose h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.05; margin: 10px 0 18px; }
.prose h2 { margin-top: 32px; }

@media (max-width: 560px) {
  .header-note { display: none; }
  .q-body { padding: 18px 16px 20px; }
  .answer { font-size: 1rem; padding: 10px 12px; }
  .answer .letter { width: 34px; height: 34px; }
  .groovy-title { -webkit-text-stroke-width: 2px; text-shadow: 3px 3px 0 var(--mustard), 6px 6px 0 var(--orange), 9px 9px 0 var(--pink), 12px 12px 0 var(--purple); }
  .result-pct { -webkit-text-stroke-width: 3px; text-shadow: 3px 3px 0 var(--mustard), 6px 6px 0 var(--orange), 9px 9px 0 var(--pink), 12px 12px 0 var(--purple); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rainbow-sweep { display: none; }
}

@media print {
  .site-header, .site-footer, .share-panel, .again, .challenge, .warning, .stripe-band { display: none; }
}

/* phones: a slightly shorter picture so the answers sit closer to the question */
@media (max-width: 560px) { .q-art { aspect-ratio: 16 / 9; } }

/* keep page chrome above the results sunburst */
.stripe-band, .site-header, .friend-banner { position: relative; z-index: 2; }
.tier-status b { display: inline-block; white-space: nowrap; }
.results > *:not(.result-hero) { position: relative; z-index: 2; }
[tabindex="-1"]:focus { outline: none; }
