/* aleckx.com — production styles (tokens inlined from the Aleckx Design System) */

:root {
  --red: #E1352B;
  --red-deep: #B4271F;
  --red-soft: #FBE3E1;
  --ink: #1C1B19;
  --ink-soft: #45423D;
  --paper: #FAF7F0;
  --white: #FFFFFF;
  --rule: #B9CFE0;

  --blue: #1E6FB8;
  --green: #2F9457;
  --yellow: #F4C531;
  --orange: #EE7A32;
  --purple: #7A4F9E;

  --gray-200: #E9E4DA;
  --gray-300: #D8D2C7;
  --gray-400: #BEB8AD;
  --gray-600: #7C776E;

  --surface-page: var(--paper);
  --surface-card: var(--white);
  --text-strong: var(--ink);
  --text-body: var(--ink-soft);
  --text-muted: var(--gray-600);
  --border-default: var(--gray-300);
  --border-subtle: var(--gray-200);
  --accent: var(--red);

  --badge-red-bg: var(--red-soft);   --badge-red-fg: var(--red-deep);
  --badge-green-bg: #E1F1E8;         --badge-green-fg: var(--green);
  --badge-blue-bg: #E1ECF6;          --badge-blue-fg: var(--blue);
  --badge-yellow-bg: #FCF3D4;        --badge-yellow-fg: #8A6D00;
  --badge-purple-bg: #EEE6F3;        --badge-purple-fg: var(--purple);

  --font-label: 'Archivo', system-ui, sans-serif;
  --font-marker: 'Permanent Marker', 'Comic Sans MS', cursive;

  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-badge: 10px;

  --shadow-md: 0 4px 12px rgba(28,27,25,.08), 0 2px 4px rgba(28,27,25,.05);
  --shadow-sticker: 0 10px 24px rgba(28,27,25,.16), 0 2px 3px rgba(28,27,25,.10);
}

[data-theme="dark"] {
  --surface-page: #16150F;
  --surface-card: #211F1C;
  --text-strong: #FAF7F0;
  --text-body: #D8D2C7;
  --text-muted: #9C968C;
  --border-default: #3C3833;
  --border-subtle: #2B2926;
  --rule: #B9CFE0; /* the sticker stays a paper object */

  --badge-red-bg: rgba(225,53,43,.22);   --badge-red-fg: #F3A9A2;
  --badge-green-bg: rgba(47,148,87,.24); --badge-green-fg: #86D3A5;
  --badge-blue-bg: rgba(30,111,184,.24); --badge-blue-fg: #8FBEE9;
  --badge-yellow-bg: rgba(244,197,49,.2);--badge-yellow-fg: #F0D479;
  --badge-purple-bg: rgba(122,79,158,.28);--badge-purple-fg: #C4A9DC;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--surface-page);
  color: var(--text-strong);
  font-family: var(--font-label);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background 200ms ease;
}

/* --- chrome --- */
header {
  display: flex;
  justify-content: flex-end;
  padding: 20px 28px;
  position: relative;
  z-index: 2;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--surface-card);
  color: var(--text-strong);
  border: 1px solid var(--border-default);
  font-size: 15px;
  line-height: 1;
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}
footer {
  padding: 20px 20px 24px;
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.footer-meta { font-size: 12px; color: var(--text-muted); }
.footer-logo {
  display: inline-flex;
  margin-top: 2px;
  opacity: .8;
}
[data-theme="dark"] .footer-logo {
  background: #fff;
  border-radius: 8px;
  padding: 5px;
  opacity: 1;
}
.footer-logo img { display: block; width: 24px; height: 24px; }

/* --- ghost tags --- */
.ghost {
  position: absolute;
  width: 260px;
  opacity: .05;
  pointer-events: none;
  border-radius: 10px;
  overflow: hidden;
}
.ghost .gh { background: var(--ink); color: #fff; text-align: center; padding: 14px; font-weight: 900; font-size: 40px; text-transform: uppercase; }
[data-theme="dark"] .ghost .gh { background: #FAF7F0; color: #16150F; }
.ghost .gb { height: 70px; background: #fff; }
.ghost-1 { top: -30px; left: -40px; transform: rotate(-18deg); }
.ghost-2 { bottom: -50px; right: -30px; transform: rotate(12deg); }

/* --- content --- */
.screen { display: flex; flex-direction: column; align-items: center; gap: 26px; max-width: 560px; text-align: center; }
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.kicker.red { background: var(--badge-red-bg); color: var(--badge-red-fg); }
.kicker.green { background: var(--badge-green-bg); color: var(--badge-green-fg); }
h1 { font-weight: 800; font-size: 34px; margin: 14px 0 0; line-height: 1.1; letter-spacing: -.02em; }
h1 .accent { color: var(--accent); }
.sub { color: var(--text-muted); font-size: 15px; margin: 10px auto 0; max-width: 440px; }

/* --- nametag --- */
.nametag {
  width: 340px;
  max-width: 86vw;
  background: var(--white);
  border-radius: var(--radius-badge);
  overflow: hidden;
  box-shadow: var(--shadow-sticker);
  transform: rotate(-2deg);
  border: 1px solid rgba(28,27,25,.06);
}
.nametag .head { background: var(--red); color: #fff; padding: 12px 20px; line-height: 1; }
.nametag .hello { font-weight: 900; font-size: 38px; letter-spacing: .02em; text-transform: uppercase; }
.nametag .mni { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; opacity: .95; }
.nametag .face {
  height: 86px;
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% 43px;
  background-position: 0 62px;
}
.nametag .name { font-family: var(--font-marker); font-size: 62px; color: var(--ink); transform: rotate(-2deg); line-height: 1; }
.nametag.lg { width: 440px; }
.nametag.lg .hello { font-size: 50px; }
.nametag.lg .mni { font-size: 16px; }
.nametag.lg .face { height: 112px; background-size: 100% 56px; background-position: 0 81px; }
.nametag.lg .name { font-size: 82px; }

/* --- name choices --- */
.choices { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.choice {
  appearance: none;
  cursor: pointer;
  font-family: var(--font-marker);
  font-size: 48px;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: var(--radius-badge);
  padding: 18px 10px 12px;
  min-width: 128px;
  line-height: 1;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}
[data-theme="dark"] .choice { border-color: var(--white); }
.choice:hover { transform: translateY(-2px); }
.choice.selected {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
  transform: rotate(-2deg) scale(1.02);
  box-shadow: var(--shadow-md);
}

/* --- buttons --- */
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.btn {
  appearance: none;
  cursor: pointer;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 18px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  transition: transform 90ms ease, filter 120ms ease;
  display: inline-flex;
  align-items: center;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--red); color: #fff; border: 2px solid var(--red); }
.btn.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn.primary:disabled { opacity: .45; cursor: default; background: var(--red); border-color: var(--red); }
.btn.outline { background: var(--surface-card); color: var(--text-strong); border: 3px solid var(--text-strong); }

/* --- countdown --- */
.countdown { display: inline-flex; flex-direction: column; gap: 8px; align-items: center; }
.countdown .lab { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.countdown .digits { display: flex; align-items: flex-start; gap: 12px; }
.countdown .cell { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.countdown .num { font-weight: 900; font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1; }
.countdown .unit { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.countdown .sep { font-size: 28px; font-weight: 900; color: var(--gray-400); line-height: 1; }

/* --- history card --- */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  width: 100%;
  max-width: 460px;
  text-align: left;
}
.card .head-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.card .title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.card .tally { font-size: 12px; color: var(--text-muted); }
.card .row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; }
.card .day { font-size: 14px; color: var(--text-body); }
.badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.badge.blue { background: var(--badge-blue-bg); color: var(--badge-blue-fg); }
.badge.yellow { background: var(--badge-yellow-bg); color: var(--badge-yellow-fg); }
.badge.purple { background: var(--badge-purple-bg); color: var(--badge-purple-fg); }

.hint { font-size: 13px; color: var(--text-muted); }

/* --- about dialog --- */
dialog {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  color: var(--text-body);
  box-shadow: var(--shadow-sticker);
  padding: 28px;
  max-width: 420px;
  width: calc(100vw - 48px);
  font-family: var(--font-label);
}
dialog::backdrop { background: rgba(28,27,25,.4); }
dialog h2 { margin: 0 0 10px; font-size: 20px; color: var(--text-strong); }
dialog p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
dialog .close { margin-top: 8px; }

/* --- responsive --- */
@media (max-width: 640px) {
  header { padding: 16px 18px; }
  h1 { font-size: 26px; }
  .nametag.lg { width: 340px; }
  .nametag.lg .hello { font-size: 38px; }
  .nametag.lg .mni { font-size: 13px; }
  .nametag.lg .face { height: 86px; background-size: 100% 43px; background-position: 0 62px; }
  .nametag.lg .name { font-size: 62px; }
  .choice { font-size: 36px; min-width: 96px; padding: 14px 8px 10px; }
  .btn { font-size: 16px; padding: 12px 22px; }
}
