/* Happy Day website, Marquee look. Rules in ../DESIGN.md. */
@font-face {
  font-family: 'League Gothic';
  src: url('/fonts/league-gothic.woff2') format('woff2');
  font-display: swap;
}

:root {
  --screen: #f2f2f5;
  --panel: #ffffff;
  --text: #111114;
  --muted: #6b6b73;
  --rail: #e4e4ea;
  --red: #d62718;
  --red-deep: #b81f12;
  --amber: #ffb300;
  --time: #a15f00; /* amber darkened so time text reads on white */
  --sign: 'League Gothic', 'Arial Narrow', sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--screen); color: var(--text); font: 17px/1.55 var(--ui); }
::selection { background: var(--red); color: #fff; }
a { color: var(--red); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Red sign cabinet: the top of every page */
.cabinet { background: var(--red); color: #fff; }
.topnav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.mark { font-family: var(--sign); font-size: 34px; line-height: 1; letter-spacing: 0.02em; color: #fff; text-decoration: none; text-transform: uppercase; }
.topnav nav { display: flex; gap: 18px; font-size: 15px; font-weight: 600; }
.topnav nav a { color: #fff; text-decoration: none; opacity: 0.9; }
.topnav nav a:hover, .topnav nav a[aria-current] { opacity: 1; text-decoration: underline; }

/* The sign: a lit white panel inside a frame of bulbs */
.frame {
  padding: 16px;
  border-radius: 14px;
  background-color: var(--red-deep);
  background-image: radial-gradient(circle, #fff1b8 0 2px, var(--amber) 3.5px, rgba(255, 179, 0, 0) 5.5px);
  background-size: 22px 22px;
  background-position: 0 0;
  animation: chase 1.2s steps(1) infinite;
}
@keyframes chase { 50% { background-position: 11px 11px; } }
@media (prefers-reduced-motion: reduce) { .frame { animation: none; } }

.sign { background: var(--panel); border-radius: 6px; padding: 10px 22px 14px; }
.sign p {
  margin: 0;
  font-family: var(--sign);
  font-size: clamp(40px, 10vw, 92px);
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  color: var(--text);
  border-bottom: 3px solid var(--rail);
  padding: 6px 0 4px;
}
.sign p:last-child { border-bottom: 0; }
.sign .red { color: var(--red); }

.lede { font-size: 20px; line-height: 1.45; margin: 26px 0 8px; max-width: 34ch; }
.get { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.get a {
  display: inline-block;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}
.get a.primary { background: #fff; color: var(--red); border-color: #fff; }
.get a:hover { background: #fff1b8; color: var(--red); border-color: #fff1b8; }
.get-note { margin: 12px 0 40px; font-size: 15px; line-height: 1.45; max-width: 46ch; opacity: 0.92; }
.more { margin: 6px 0 0; font-weight: 600; }

/* Sections */
h1, h2 { line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 30px; margin: 48px 0 4px; }
.muted { color: var(--muted); }
.sub { margin: 0 0 18px; }

/* Deal cards, same as the app */
.deals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deal { background: var(--panel); border: 1px solid var(--rail); border-radius: 14px; padding: 12px 16px 14px; }
/* Red is money (the price on the sign, the Steal stamp), amber is time (bulbs, "Starts at"). */
.when { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 14px; font-weight: 600; line-height: 1.2; }
.when.soon { gap: 6px; color: var(--time); }
.nw { white-space: nowrap; }
.clock { width: 15px; height: 15px; flex: none; }
.clock circle { fill: var(--amber); }
.clock path { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bulbs { display: flex; gap: 6px; height: 10px; flex: none; }
.bulbs i { width: 10px; height: 10px; border-radius: 50%; background: #d2cec3; }
.bulbs i.on { background: radial-gradient(circle at 35% 35%, #fff3c4, var(--amber) 60%, #e08e00); box-shadow: 0 1px 3px rgba(224, 142, 0, 0.45); }
.line { font-family: var(--sign); font-size: 31px; line-height: 1.04; text-transform: uppercase; letter-spacing: 0.01em; padding: 4px 0 5px; border-top: 2px solid var(--rail); border-bottom: 2px solid var(--rail); }
.line b { font-weight: normal; color: var(--red); }
.signrow { display: flex; align-items: center; gap: 12px; }
.signrow .line { flex: 1; min-width: 0; }
.stamp { flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--red);
  border: 2px solid var(--red); border-radius: 5px; padding: 3px 7px; margin-right: 2px; transform: rotate(-6deg); }
.stamp b { font-family: var(--sign); font-weight: normal; font-size: 24px; text-transform: uppercase; letter-spacing: 0.04em; }
.stamp small { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; margin-top: 1px; }
.who { margin-top: 9px; font-size: 15px; line-height: 1.35; }
.who strong { font-weight: 650; }
.who span { color: var(--muted); }
.note { margin-top: 14px; font-size: 15px; }

.also { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rail); }
.also li { padding: 14px 0; border-bottom: 1px solid var(--rail); }
.also strong { display: block; font-size: 17px; }
.also span { color: var(--muted); }

/* Reading pages */
.page-title { font-family: var(--sign); font-weight: normal; text-transform: uppercase; letter-spacing: 0.015em; font-size: clamp(52px, 12vw, 84px); line-height: 1; margin: 6px 0 22px; }
.reading { background: var(--panel); border-radius: 16px; padding: 4px 26px 26px; margin: -6px 0 0; border: 1px solid var(--rail); }
.reading h2 { font-size: 22px; margin: 30px 0 6px; letter-spacing: -0.01em; }
.reading h3 { font-size: 17px; margin: 24px 0 4px; }
.reading p, .reading li { max-width: 68ch; }
.reading ul { padding-left: 22px; }
.reading li { margin: 6px 0; }
.updated { color: var(--muted); font-size: 15px; margin-top: 22px; }

footer { padding: 36px 0 48px; font-size: 15px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
footer a { color: var(--text); }
footer .friends { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
footer .friend { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; text-decoration: none;
  background: var(--panel); border: 1px solid var(--rail); border-radius: 999px; padding: 5px 14px 5px 5px; }
footer .friend:hover { text-decoration: underline; }
footer .friend img { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: block; }

/* For bars (/bars) */
.perks { padding-left: 22px; }
.panel { background: var(--panel); border: 1px solid var(--rail); border-radius: 16px; padding: 4px 26px 22px; margin: 22px 0; }
.panel h2 { font-size: 22px; margin: 22px 0 4px; letter-spacing: -0.01em; }
.panel h3 { font-size: 19px; margin: 20px 0 4px; }
.stack { display: grid; gap: 6px; max-width: 460px; }
.stack button, .stack .check { margin-top: 8px; }
label { font-weight: 600; font-size: 15px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid #cfcfd6; border-radius: 10px; padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .button:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 1px;
}
button, .button {
  justify-self: start; display: inline-block; font: inherit; font-weight: 700; font-size: 16px;
  background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: 10px 20px;
  cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: var(--red-deep); }
button.link { background: none; color: var(--red); padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.status { min-height: 1.5em; margin: 10px 0 0; font-size: 15px; }
.bad { color: var(--red-deep); font-weight: 600; }
.small { font-size: 15px; }
.who-bar { margin-top: 30px; }
.who-bar h2 { margin: 0 0 2px; }
.matches { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.match { width: 100%; text-align: left; background: var(--screen); color: var(--text); font-weight: 400; border-radius: 10px; padding: 10px 12px; }
.match:hover { background: #fff1b8; }
.picked { font-weight: 700; margin: 12px 0 4px; }
.bar-card { background: var(--panel); border: 1px solid var(--rail); border-radius: 16px; padding: 18px 26px 22px; margin: 16px 0; }
.bar-card > header { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; }
.bar-card h3 { font-family: var(--sign); font-weight: normal; text-transform: uppercase; font-size: 34px; line-height: 1; letter-spacing: 0.015em; margin: 0; }
.bar-where { grid-column: 1; margin: 4px 0 0; font-size: 15px; }
.badge { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin: 0; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff1b8; color: #6b4a00; }
.badge.on { background: #e3f4e6; color: #17602a; }
.badge.off { background: var(--rail); color: var(--muted); }
.block { border-top: 1px solid var(--rail); margin-top: 18px; padding-top: 4px; }
.block h4 { font-size: 17px; margin: 14px 0 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0; }
.stats div { background: var(--screen); border-radius: 12px; padding: 10px 12px; }
.stats dt { font-family: var(--sign); font-size: 34px; line-height: 1; }
.stats dd { margin: 2px 0 0; font-size: 14px; color: var(--muted); line-height: 1.3; }
.reward-state { font-weight: 600; margin: 8px 0; }
.reward-state.on { color: #17602a; }

@media (max-width: 620px) {
  .deals { grid-template-columns: 1fr; }
  .topnav nav { gap: 14px; font-size: 14px; }
  .frame { padding: 12px; }
  .sign { padding: 6px 14px 10px; }
  .reading { padding: 2px 18px 20px; }
  .panel, .bar-card { padding-left: 18px; padding-right: 18px; }
}
