@font-face {
  font-family: 'Maple Mono';
  src: url('/static/fonts/MapleMono.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Maple Mono';
  src: url('/static/fonts/MapleMono-Italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --cycle: 7s; /* one full lap through the tiers */
}

.tier-cycle::before {
  content: "👏";
  animation: tierCycle var(--cycle) steps(1, end) forwards;
}
@keyframes tierCycle {
  0%     { content: "👏"; }
  60.00% { content: "🙌"; }
  65.00% { content: "🫶"; }
  70.00% { content: "🎉"; }
  75.00% { content: "👍"; }
  100%   { content: "👏"; }
}

.wordmark {
  background: linear-gradient(
    90deg,

    #d3869b 0%,   /* purple */
    #d8a657 10%,    /* idle: warm anchor */
    #e9b872 30%,   /* idle window ends here — this is what shows at rest */
    #fb4934 35%,   /* into the bright band: red */
    #fe8019 42%,   /* orange */
    #fabd2f 50%,   /* yellow */
    #b8bb26 58%,   /* green */
    #83a598 66%,   /* blue */
    #d3869b 80%,   /* purple */
    #d8a657 90%,   /* back down to the warm anchor */
    #e9b872 100%   /* idle window again — mirrors the start exactly */
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: wordmarkSweep var(--cycle) ease-in-out 1 forwards;
}

@keyframes wordmarkSweep {
  0%, 75% { background-position: 0% 50%; }   /* idle, holding the warm window */
  100%    { background-position: 100% 50%; } /* lands on the mirrored warm window, same instant 👏 returns */
}


:root {
  --bg:           #f4ecd8;  /* warm cream paper */
  --bg-raised:    #ebe1c8;  /* slightly deeper, for cards/sections */
  --border:       #cdbf9e;  /* soft tan border */

  --text:         #3c3530;  /* warm near-black, not pure black */
  --text-muted:   #6e6253;

  --accent-red:    #af3a3a;
  --accent-green:  #4f7942;
  --accent-amber:  #b8860b;
  --accent-blue:   #3d6b8c;
  --accent-purple: #7d5a6b;

  --font-mono: 'Maple Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  --p-size: 20px;
  --caption-size: 12px;
  --heading-size: 25px;
  --subtitle-size: 35px;
  --title-size:   64px;

  --space-xs:  0.4rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;

  --radius: 3px;
}

/* ---------- reset / base ---------- */

* {
  box-sizing: border-box;
}

html {
  font-size: var(--p-size);
  scroll-behavior: smooth;
}

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

header {
  box-sizing: border-box;
  min-height: 100dvh;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  justify-content: center;
  align-self: center;
  gap: 1rem;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
}

.applause-area {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  min-width: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

li {
  padding-bottom: var(--space-xs);
  border-bottom: 0.5px solid var(--border);
}

li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-sm);
}

.subtier {
  width: 2.5em;
}

.hidden-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  anchor-name: --sender-anchor;
  vertical-align: middle;
}

.info {
  position: absolute;
  position-anchor: --sender-anchor;
  position-area: inline-end;
  position-try-fallbacks: flip-inline;
  z-index: 10;
  background: var(--bg-raised);
  color: var(--accent-red);
  left: 100%;
  transform: translateY(-0%);
  margin-left: 0.3em;
  padding-left: 0.3em;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.hidden-info:hover .info,
.hidden-info:focus-visible .info {
  opacity: 1
}

.nowrap {
  white-space: nowrap;
}

article, section {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  gap: var(--space-sm);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  margin: 0;
  line-height: 1.3;
}


h1 {
  font-size: var(--title-size);
  font-weight: 900;
}

.gradient {
  background: linear-gradient(
    90deg,
    #d3869b 0%,
    #d8a657 40%,
    #e9b872 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

}

h1.nowrap {
  font-size: clamp(1.75rem, 9vw, var(--title-size));
}

h2 {
  font-size: var(--subtitle-size);
  font-weight: 500;
  color: var(--accent-blue);
}

h3 {
  font-size: var(--heading-size);
  font-style: italic;
  color: var(--accent-red);
}


h4, h5, h6 {
  font-size: var(--p-size);
  font-weight: 800;
  color: var(--accent-red);
}

p {
  margin: 0;
  font-size: var(--text-size);
  font-weight: 400;
}

small {
  font-size: var(--caption-size);
  font-weight: 200;
  font-style: italic;
  color: var(--text-muted);
}

strong, b {
  font-weight: 800;
}

em, i {
  font-style: italic;
}

code {
  font-family: var(--font-mono);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.1em 0.35em;
  font-size: 0.95em;
}

/* ---------- links ----------
   Links are navigation. They look like text with intent, not buttons.
*/

a {
  color: var(--accent-blue);
  font-weight: 900;
  text-decoration:none;
  text-decoration-color: var(--border);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.truncate-url {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

a:hover {
  text-decoration-color: var(--accent-blue);
}

.linklike {
  color: var(--accent-blue);
}

/* ---------- buttons ----------
   Flat. No 3D. Bracket affordance instead of a filled shape.
   [ 👋 display-name ]
*/
.applause-button-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
}

.applause-icon {
  display: inline-block;
  width: 1.2em;
  text-align: center;
}

.applause-counter {
  font-size: .6rem;
  font-weight: 200;
  white-space: nowrap;
  font-style: italic;
  text-align: left;
  color: var(--text-muted);
  margin-left: var(--space-sm)
}

.applause-btn {
  font-size: var(--title-size);
}

.applause-options {
  min-width: 9em;
  text-align: left;
}

.transparency-override {
  color: var(--text)
}

.icon {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  vertical-align: middle;
}

button,
input[type="submit"] {
  font-family: var(--font-mono);
  font-size: var(--text-size);
  font-weight: 900;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: var(--radius);
  padding: 0;
  margin: 0;
  cursor: pointer;
}

button:hover {
  color: var(--accent-blue);
}

button:active {
  color: var(--accent-red);
}

button:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* state buttons for the applaud confirm/fail flash */
button.applause-btn--success {
  color: var(--accent-green);
}

button.applause-btn--failed {
  color: var(--accent-red);
}

/* ---------- forms ---------- */

form {
  display: inline;
}

form.block {
  display: block;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  font-family: var(--font-mono);
  font-size: var(--text-size);
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-xs) var(--space-sm);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-blue);
}

label {
  font-size: var(--text-size-sm);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

/* checkbox-as-toggle pattern used for privacy/anon settings */
input[type="checkbox"] {
  accent-color: var(--accent-blue);
}

/* radio tier-select options */
input[type="radio"] {
  accent-color: var(--accent-blue);
}

/* ---------- details/summary (inline expandable applause sender) ---------- */

details {
  display: inline;
}

details > summary {
  list-style: none;
  cursor: pointer;
  display: inline;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* ---------- misc ---------- */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-sm) 0;
}

.muted {
  color: var(--text-muted);
}

.error {
  color: var(--accent-red);
}

.success {
  color: var(--accent-green);
}

.inline-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em;
  min-width: 0;
}

/* hide and show toggle */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  cursor: pointer;
}

.toggle input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

/* emoji: 🥸 checked, 🙂 unchecked */
.toggle-emoji::before {
  content: "🙂";
}
.toggle input:checked ~ .toggle-emoji::before {
  content: "🥸";
}

/* label: hidden by default */
.toggle-label {
  display: inline-block;
  position: relative;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
  transition: opacity 0.15s ease, max-width 0.15s ease;
}

/* unchecked: swap the literal "hide my name" for "show my name" */
.toggle input:not(:checked) ~ .toggle-label {
  visibility: hidden;
}
.toggle input:not(:checked) ~ .toggle-label::before {
  visibility: visible;
  position: absolute;
  left: 0;
  top: 0;
  content: "show my name";
}

/* hover: visible as long as you're hovering */
.toggle:hover .toggle-label {
  opacity: 1;
  max-width: 10em;
}

.toggle input:focus-visible ~ .toggle-label {
  opacity: 1;
  max-width: 10em;
}

.toggle:has(input:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}


/* sub processing specific stuff */
.processing-msg {
  font-size: 0;
}
.processing-msg::before {
  font-size: 1rem;
  content: "Processing your subscription...";
}

[data-status="not_started"]::before {
  content: "Processing your subscription...";
  animation: pendingCycle 0.8s steps(1, end) infinite;
}
@keyframes pendingCycle {
  0%  { content: "Processing your subscription..." }
  25%  { content: "Talking to Stripe..." }
  85% { content: "Reticulating Splines..." }
}

[data-status="stripe_payment_approved"]::before {
  content: "Processing...";
  animation: approveCycle 0.8s steps(1, end) infinite;
}
@keyframes approveCycle {
  0%  { content: "☕️ taking a coffee break..." }
  25% { content: "Just kidding." }
  35% { content: "Processing..." }
  95% { content: "Still Processing..." }
}
