/* ==========================================================================
   Send a Chicken — design system
   Warm, chunky, mobile-first. Deliberately not a SaaS dashboard.
   ========================================================================== */

:root {
  --cream: #fff6e2;
  --cream-deep: #ffeac2;
  --ink: #1c1206;
  --ink-soft: #6a5233;
  --paper: #fffdf7;

  --red: #ff4a2b;
  --red-deep: #d92c10;
  --yolk: #ffc93c;
  --sky: #8ed4ff;
  --grass: #77d67a;
  --violet: #9b7bff;

  --line: 3px solid var(--ink);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 6px 0 var(--ink);
  --shadow-lg: 0 10px 0 var(--ink);
  --shadow-soft: 0 18px 40px -18px rgba(28, 18, 6, 0.55);

  --max: 640px;
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui,
    -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 201, 60, 0.35), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(142, 212, 255, 0.35), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 74, 43, 0.16), transparent 55%);
  background-attachment: fixed;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3 {
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  font-weight: 900;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

.center { text-align: center; }
.muted { color: var(--ink-soft); }
.tiny { font-size: 0.8125rem; }
.stack > * + * { margin-top: 14px; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- site chrome ---------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  max-width: var(--max);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand .egg { font-size: 1.25rem; }

footer.site {
  padding: 48px 20px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

footer.site a { text-decoration: underline; text-underline-offset: 3px; }

/* --- buttons -------------------------------------------------------------- */

.btn {
  --btn-bg: var(--yolk);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 22px;
  border: var(--line);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.12s cubic-bezier(0.2, 0.9, 0.3, 1.4), box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn:focus-visible { outline: 4px solid var(--violet); outline-offset: 3px; }

.btn-primary { --btn-bg: var(--red); color: var(--paper); }
.btn-lg { padding: 20px 22px; font-size: 1.125rem; }
.btn-ghost { --btn-bg: var(--paper); }
.btn-sm { padding: 12px 16px; font-size: 0.9375rem; box-shadow: 0 4px 0 var(--ink); }

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow);
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* --- cards ---------------------------------------------------------------- */

.card {
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* --- hero ----------------------------------------------------------------- */

.hero {
  padding: 8px 20px 40px;
  text-align: center;
  max-width: var(--max);
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(2.9rem, 13vw, 4.4rem);
  margin: 14px 0 0;
  text-transform: uppercase;
}

.hero .sub {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 16px auto 26px;
  max-width: 22ch;
  text-wrap: balance;
}

.hero-chicken {
  width: min(210px, 52vw);
  margin-inline: auto;
  filter: drop-shadow(0 16px 18px rgba(28, 18, 6, 0.18));
}

.hero .btn { max-width: 420px; margin-inline: auto; }
.ticker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  padding: 8px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}
.ticker b { font-variant-numeric: tabular-nums; }

/* A live pulse, because the number is meant to be moving. */
.ticker .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 74, 43, 0.6);
  animation: ticker-pulse 2.2s ease-out infinite;
}
@keyframes ticker-pulse {
  70%  { box-shadow: 0 0 0 9px rgba(255, 74, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 74, 43, 0); }
}

.free-note { margin-top: 14px; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); }

/* --- sections ------------------------------------------------------------- */

section.block { padding: 40px 0; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-deep);
  margin-bottom: 12px;
  text-align: center;
}

h2.section-title {
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  text-align: center;
  margin-bottom: 22px;
  text-transform: uppercase;
}

/* how it works */
.steps { display: grid; gap: 12px; }

.step {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 var(--ink);
  padding: 14px 16px;
}

.step b { display: block; font-size: 1.02rem; }
.step .n {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: var(--line);
  border-radius: 50%;
  background: var(--yolk);
  font-weight: 900;
  font-size: 1.15rem;
}
.step p { margin: 2px 0 0; font-size: 0.875rem; color: var(--ink-soft); }

/* --- chicken grid --------------------------------------------------------- */

.chicken-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chicken-card {
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 12px 14px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 5px 0 var(--ink);
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.14s cubic-bezier(0.2, 0.9, 0.3, 1.4), box-shadow 0.14s, background 0.14s;
  -webkit-tap-highlight-color: transparent;
}

.chicken-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--ink); }
.chicken-card:focus-visible { outline: 4px solid var(--violet); outline-offset: 3px; }

.chicken-card[aria-pressed="true"] {
  background: var(--yolk);
  transform: translateY(-3px);
  box-shadow: 0 8px 0 var(--ink);
}

.chicken-card .ico { font-size: 2.1rem; line-height: 1; }
.chicken-card .nm {
  font-weight: 900;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.chicken-card .pr { font-size: 0.78rem; font-weight: 800; color: var(--ink-soft); }
.chicken-card .pr.free { color: var(--red-deep); }

.chicken-card .badge {
  position: absolute;
  top: -9px;
  right: 8px;
  padding: 3px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 0 var(--ink);
}

.chicken-card.locked .ico { filter: saturate(0.75); }
.chicken-card .tag {
  font-size: 0.72rem;
  color: var(--ink-soft);
  line-height: 1.25;
  margin-top: 2px;
  text-wrap: balance;
}

/* --- form ----------------------------------------------------------------- */

.field { display: block; }

.field > .label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 900;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.field .opt { font-weight: 700; font-size: 0.78rem; color: var(--ink-soft); }

input[type="text"], textarea {
  width: 100%;
  padding: 15px 16px;
  border: var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  resize: none;
}

input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 4px 0 var(--red);
}

textarea { min-height: 116px; line-height: 1.45; }

::placeholder { color: #bda98a; }

.counter { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 0.8rem; color: var(--ink-soft); }
.counter.warn { color: var(--red-deep); }

.error-box {
  border: var(--line);
  border-radius: var(--radius-sm);
  background: #ffe3dc;
  box-shadow: 0 4px 0 var(--ink);
  padding: 13px 15px;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* --- create flow ---------------------------------------------------------- */

.flow { padding-bottom: 40px; }
.flow .chicken-grid { margin-bottom: 6px; }

.flow-head { text-align: center; margin-bottom: 20px; }
.flow-head h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); text-transform: uppercase; }
.flow-head p { margin: 8px 0 0; color: var(--ink-soft); font-weight: 700; font-size: 0.95rem; }

.progress {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 0 0 18px;
}
.progress i {
  width: 34px; height: 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}
.progress i.on { background: var(--red); }

.sticky-cta .btn-row { grid-template-columns: 0.72fr 1.28fr; }
.sticky-cta .btn-row .btn { padding-inline: 12px; }

.sticky-cta {
  position: sticky;
  bottom: 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  margin-top: 22px;
  background: linear-gradient(to top, var(--cream) 62%, rgba(255, 246, 226, 0));
}

/* preview card */
.preview-card { text-align: center; padding: 26px 20px; }
.preview-card .ico { font-size: 3rem; line-height: 1; }
.preview-card h2 { font-size: 1.5rem; margin: 8px 0 4px; text-transform: uppercase; }

.bubble {
  position: relative;
  margin: 18px 0 0;
  padding: 18px 18px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--cream-deep);
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 30px; bottom: -13px;
  width: 20px; height: 20px;
  background: var(--cream-deep);
  border-right: var(--line);
  border-bottom: var(--line);
  transform: rotate(45deg) skew(-6deg, -6deg);
}

/* --- share page ----------------------------------------------------------- */

.share-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 800;
  font-size: 0.92rem;
  overflow: hidden;
}

.share-link span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-row.social .btn { font-size: 0.92rem; padding-inline: 10px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, calc(100% + 40px));
  padding: 13px 20px;
  border: var(--line);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  font-size: 0.9rem;
  z-index: 90;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.4), opacity 0.2s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* --- FAQ ------------------------------------------------------------------ */

details.faq {
  border: var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
  padding: 14px 16px;
}
details.faq + details.faq { margin-top: 10px; }
details.faq summary {
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.96rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 10px 0 0; color: var(--ink-soft); font-size: 0.9rem; }

/* --- desktop -------------------------------------------------------------- */

@media (min-width: 720px) {
  .chicken-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  section.block { padding: 54px 0; }
  .hero { padding-top: 20px; }
  .sticky-cta { position: static; background: none; padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- private stats dashboard ---------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 14px;
  border: var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: 0 4px 0 var(--ink);
}
.stat b {
  font-size: 1.9rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.76rem; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.stat.big { grid-column: 1 / -1; background: var(--yolk); }
.stat.big b { font-size: 3rem; }
.stat.accent { background: var(--sky); }

.table-scroll { overflow-x: auto; }

table.stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  table-layout: auto;
}
table.stats th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  padding: 0 10px 8px 0;
  white-space: nowrap;
}
table.stats td { padding: 9px 8px 9px 0; border-top: 2px solid rgba(28, 18, 6, 0.12); white-space: nowrap; }
table.stats td:first-child { font-weight: 800; white-space: normal; }
table.stats td.num { font-variant-numeric: tabular-nums; text-align: right; }
table.stats td.barcell { width: 22%; min-width: 44px; padding-right: 0; }

/* An inline bar makes a column of numbers readable at a glance. */
.bar {
  display: block;
  height: 9px;
  min-width: 3px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--red);
}

@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat.big { grid-column: span 3; }
}
