/* Live Lottos — page layout on top of tokens.css + livelottos.css (the design system).
   Only layout, responsive switches and the motion keyframes live here. */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface-page); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 22px; }
a { color: var(--cta-700); }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); }
h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
h3 { font-size: 18px; line-height: 24px; font-weight: 600; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--space-4); }
.narrow { max-width: 640px; }
.stack { display: grid; gap: var(--space-4); }
.stack-lg { display: grid; gap: var(--space-6); }
.section { padding: var(--space-8) 0; }
@media (min-width: 900px) { .section { padding: var(--space-10) 0; } }
.muted { color: var(--ink-muted); }
.subtle { color: var(--ink-subtle); }
.sm { font-size: 13px; line-height: 19px; }
.xs { font-size: 12px; line-height: 16px; }
.legal { font-size: 11px; line-height: 16px; }
.center { text-align: center; }
.row { display: flex; gap: var(--space-3); align-items: center; }
.row-between { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; }
.tabular { font-variant-numeric: tabular-nums; }
.pad-for-bar { padding-bottom: var(--space-16); }
.card-pad { padding: var(--space-4); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- header: phone default, desktop from 900px ---- */
.site-header { position: relative; z-index: 20; }
.site-header .ll-header { justify-content: space-between; }
.site-header .ll-header__nav, .site-header .hdr-desktop { display: none; }
.site-header .ll-header__logo { height: 56px; width: auto; }
@media (min-width: 900px) {
  .site-header .ll-header { justify-content: flex-start; padding: var(--space-3) var(--space-6); }
  .site-header .ll-iconbtn, .site-header .ll-tabs { display: none; }
  .site-header .ll-header__nav, .site-header .hdr-desktop { display: flex; }
  .site-header .hdr-desktop { gap: var(--space-4); align-items: center; margin-left: var(--space-4); }
  .site-header .ll-header__logo { height: 68px; }
}
.drawer { display: none; background: var(--surface-brand-raised); padding: var(--space-2) var(--space-4) var(--space-4); }
.drawer.open { display: grid; }
.drawer a { color: var(--ink-on-brand); text-decoration: none; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); font: 600 15px/22px var(--font-display); }
@media (min-width: 900px) { .drawer { display: none !important; } }

/* ---- preview strip (deleted at go-live) ---- */
.preview-strip { background: var(--surface-tag); color: var(--placeholder-500); text-align: center; font-size: 12px; line-height: 16px; padding: 6px var(--space-4); }
.preview-strip a { color: var(--placeholder-500); }
.ll-placeholder__text a { color: var(--placeholder-700); }
.ll-placeholder ul { margin: 4px 0 0 18px; padding: 0; }
.ph-tag { display: inline-block; vertical-align: middle; background: var(--placeholder-200); color: var(--placeholder-700); font: 800 10px/12px var(--font-display); letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: var(--radius-sm); text-decoration: none; }

/* ---- hero art + fireworks ---- */
.ll-hero { border-radius: 0; }
@media (min-width: 900px) { .ll-hero { border-radius: var(--radius-xl); } }
.hero-art { position: absolute; inset: 0; opacity: var(--opacity-hero-art); pointer-events: none; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-page { background: var(--surface-brand); }
.hero-page .ll-hero { max-width: 1160px; margin: 0 auto; }
.fw { position: absolute; width: 8px; height: 8px; border-radius: 50%; opacity: 0; pointer-events: none; }
.fw::before, .fw::after { content: ""; position: absolute; inset: -60px; border-radius: 50%; border: 2px dotted rgba(255,255,255,.55); }
.fw::after { inset: -32px; border-style: solid; border-width: 1px; }
@keyframes ll-burst { 0% { transform: scale(.2); opacity: 0; } 12% { opacity: .28; } 40% { transform: scale(1); opacity: .16; } 60%, 100% { transform: scale(1.15); opacity: 0; } }
.fw { animation: ll-burst 6s ease-out infinite; }
.fw:nth-child(2) { animation-delay: 2s; } .fw:nth-child(3) { animation-delay: 4s; }
@keyframes ll-settle { from { transform: translateX(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.ll-pill--rollover { animation: ll-settle 200ms cubic-bezier(.2,.8,.2,1) both; }

/* ---- catalogue grid ---- */
.grid { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, 1fr); } }
/* Every card in the grid has the same shape: ribbon space, a fixed-height header,
   a fixed tag slot, the jackpot, a foot row, and the button pinned to the bottom. */
.grid { align-items: stretch; }
.grid .ll-card { display: flex; flex-direction: column; }
.grid .ll-lottery-card { flex: 1; display: grid; grid-template-rows: auto 30px 1fr auto auto; gap: var(--space-3); padding-top: 44px; }
.ll-lottery-card__top { align-items: flex-start; }
.ll-lottery-card__name { min-height: 48px; }
.ll-lottery-card__meta { min-height: 38px; }
.tag-slot { height: 30px; }
.ll-lottery-card__jackpot { align-self: end; text-align: center; }
.ll-lottery-card__foot { flex-wrap: nowrap; }
.ll-lottery-card__foot .ll-tag--price { white-space: nowrap; font-size: 11px; padding: 6px 8px; }
/* One column on phones: nothing to align against, so the reserved heights go. */
@media (max-width: 599px) {
  .grid .ll-lottery-card { grid-template-rows: auto auto auto auto auto; padding-top: 44px; }
  .ll-lottery-card__name, .ll-lottery-card__meta { min-height: 0; }
  .tag-slot { height: auto; }
  .tag-slot:empty { display: none; }
}
.ll-card > a.cover { position: absolute; inset: 0; z-index: 1; }
.ll-lottery-card .ll-btn { position: relative; z-index: 2; }
.sortbar { display: flex; align-items: center; gap: var(--space-3); }
.sortbar select { font: 500 14px/20px var(--font-body); padding: 8px 10px; border: 1px solid var(--border-control); border-radius: var(--radius-md); background: var(--surface-card); }

/* ---- line reveal ---- */
@keyframes ll-reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.reveal .ll-lines__row { animation: ll-reveal 180ms ease-out both; }
.reveal .ll-lines__row:nth-child(1) { animation-delay: 0ms; } .reveal .ll-lines__row:nth-child(2) { animation-delay: 40ms; }
.reveal .ll-lines__row:nth-child(3) { animation-delay: 80ms; } .reveal .ll-lines__row:nth-child(4) { animation-delay: 120ms; }
.reveal .ll-lines__row:nth-child(5) { animation-delay: 160ms; } .reveal .ll-lines__row:nth-child(6) { animation-delay: 200ms; }
.reveal .ll-lines__row:nth-child(7) { animation-delay: 240ms; } .reveal .ll-lines__row:nth-child(8) { animation-delay: 280ms; }
.reveal .ll-lines__row:nth-child(9) { animation-delay: 320ms; } .reveal .ll-lines__row:nth-child(10) { animation-delay: 360ms; }

/* ---- sticky buy bar ---- */
.buybar-sticky { position: sticky; bottom: 0; z-index: 15; }
@media (min-width: 900px) {
  .product-grid { display: grid; grid-template-columns: 1fr 360px; gap: var(--space-6); align-items: start; }
  .buybar-sticky { position: sticky; top: var(--space-4); bottom: auto; }
  .buybar-sticky .ll-buybar { border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
}
.ll-seg a { text-align: center; text-decoration: none; }
.buybar-inline { border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.buybar-controls { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2); align-items: center; }
.buybar-controls .ll-seg__opt { padding: 8px 6px; white-space: nowrap; font-size: 13px; }
.stepper { display: inline-flex; align-items: center; background: var(--surface-sunken); border-radius: var(--radius-md); padding: 3px; }
.stepper__btn { width: 38px; height: 38px; border: 0; border-radius: 8px; background: var(--surface-card); color: var(--ink); font: 700 18px/1 var(--font-display); cursor: pointer; box-shadow: 0 1px 2px rgba(27,16,36,.12); }
.stepper__btn[disabled] { opacity: var(--opacity-disabled); cursor: default; }
.stepper__val { min-width: 62px; text-align: center; font: 700 15px/20px var(--font-body); }

/* ---- results balls ---- */
.ball { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 15px/15px var(--font-body); background: var(--surface-card); border: 2px solid var(--surface-brand); font-variant-numeric: tabular-nums; }
.ball--bonus { border-color: #c9a800; background: var(--bonus-300); }

/* ---- reviews carousel ---- */
.carousel { display: flex; gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.carousel::-webkit-scrollbar { display: none; }
.carousel .ll-review { scroll-snap-align: start; flex: 0 0 232px; }

/* ---- footer ---- */
.ll-footer__cols details summary { list-style: none; cursor: pointer; }
.ll-footer__cols details summary::-webkit-details-marker { display: none; }
.ll-footer__cols ul { margin-top: var(--space-3); }
@media (min-width: 900px) {
  .ll-footer { padding: var(--space-8) var(--space-6); }
  .ll-footer__cols { grid-template-columns: repeat(3, 1fr); }
  .ll-footer__cols details > *:not(summary) { display: block; }
  .ll-footer__cols summary { pointer-events: none; }
  .ll-footer__legal { padding: var(--space-5) var(--space-6); }
}
.footer-brand { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.footer-brand img { height: 60px; }

/* ---- chat bubble ---- */
.chat-fab { position: fixed; right: var(--space-4); bottom: 88px; z-index: 14; text-decoration: none; }
@media (min-width: 900px) { .chat-fab { bottom: var(--space-6); } }

/* ---- forms ---- */
.form-grid { display: grid; gap: var(--space-3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.flash { background: var(--live-100); color: var(--ink); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: 13px; line-height: 19px; }
.flash strong { color: var(--live-600); }
.flash--ok { background: var(--cta-100); }

/* ---- modals (cancel ladder) ---- */
dialog.ll-modal { border: 0; padding: var(--space-5); margin: auto; }
dialog.ll-modal::backdrop { background: rgba(40,7,56,.62); }

/* ---- confetti + typing (order placed) ---- */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: ll-fall 1.5s ease-in forwards; }
@keyframes ll-fall { to { transform: translateY(105vh) rotate(540deg); opacity: 0; } }

/* ---- steps ---- */
.steps { display: grid; gap: var(--space-3); }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-500); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font: 800 15px/1 var(--font-display); }

/* ---- readiness table ---- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 19px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border-hairline); vertical-align: top; }
.tbl th { font: 800 11px/14px var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.st { display: inline-block; border-radius: var(--radius-sm); padding: 2px 8px; font: 800 11px/16px var(--font-display); letter-spacing: .06em; text-transform: uppercase; }
.st-missing { background: var(--live-100); color: var(--live-600); } .st-received { background: var(--placeholder-200); color: var(--placeholder-700); } .st-live { background: var(--cta-100); color: #05502e; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .fw { display: none; }
}
