/* ---------------------------------------------------------------------------
   Layali — marketing site stylesheet.

   Every colour, shadow and radius below is transcribed from the app's design
   tokens (lib/design/tokens.dart) so the site and the product read as one
   brand. When a token changes in Dart, change it here too — there is no build
   step that shares them.
   --------------------------------------------------------------------------- */

/* ---- fonts ------------------------------------------------------------- */
/* Self-hosted, same three weights the app bundles (assets/fonts/). No CDN:
   the audience is in markets where Google Fonts is unreliable, and the site
   must render correctly offline from a file:// open. */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/Roboto-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* ---- tokens ------------------------------------------------------------ */
:root {
  /* Straight from `abstract final class C`. */
  --canvas: #fff9f2;
  --wine: #5b0b25;
  --divider: #e9ded6;
  --white: #ffffff;

  --ink: #171315;
  --muted: #6f686a;
  --muted-soft: #716a6c;

  --live-red: #e7444e;
  --party: #6a367f;
  --room-teal: #109a98;
  --gold: #e8be62;
  --coins: #d79221;
  --diamonds: #35b7c6;

  /* C.brandGradient */
  --brand-gradient: linear-gradient(90deg, #3a0718 0%, #7a1733 100%);

  /* Shadows — Shadows.moment / .wallet / .quickAction */
  --shadow-card: 0 4px 14px rgba(67, 17, 37, 0.08);
  --shadow-raised: 0 5px 14px rgba(67, 17, 37, 0.08);
  --shadow-soft: 0 3px 10px rgba(67, 17, 37, 0.06);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --maxw: 1120px;
  --gutter: 24px;
}

/* ---- reset ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Anchor targets must clear the sticky header. */
  scroll-padding-top: 88px;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--wine);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

/* Keyboard users must be able to see where they are. */
:focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--wine);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---- layout ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 9vw, 104px);
}

.section--tint {
  background: var(--white);
  border-block: 1px solid var(--divider);
}

.section__head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section__head p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 12px;
}

/* ---- header ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 249, 242, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  flex: none;
}

.nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: none;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---- buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: var(--shadow-raised);
}

.btn--ghost {
  background: var(--white);
  color: var(--wine);
  border-color: var(--divider);
  box-shadow: var(--shadow-soft);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* ---- hero -------------------------------------------------------------- */
.hero {
  padding-block: clamp(48px, 8vw, 92px) clamp(56px, 9vw, 96px);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero__copy p.hero__lede {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 30em;
  margin-block: 20px 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.hero__note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ---- phone frame ------------------------------------------------------- */
/* The device shell is drawn in CSS; the screen inside is a placeholder until
   real captures land. See website/README.md for how to swap them in. */
.phone {
  --phone-w: 300px;
  width: var(--phone-w);
  aspect-ratio: 300 / 620;
  margin-inline: auto;
  padding: 12px;
  border-radius: 46px;
  background: #1a1113;
  box-shadow: 0 24px 60px rgba(67, 17, 37, 0.22), 0 4px 14px rgba(67, 17, 37, 0.12);
  position: relative;
}

.phone::after {
  /* Speaker / notch bar. */
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.phone__screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--canvas);
  display: grid;
  place-items: center;
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder shown while no screenshot is supplied. Delete the element (not
   this rule) when dropping in a real <img>. */
.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  background: repeating-linear-gradient(
    45deg,
    rgba(91, 11, 37, 0.035) 0 12px,
    transparent 12px 24px
  );
  border: 2px dashed var(--divider);
  border-radius: inherit;
}

.placeholder__label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--wine);
  letter-spacing: 0.02em;
}

.placeholder__hint {
  font-size: 0.8rem;
  line-height: 1.45;
}

.phone-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 3vw, 36px);
  align-items: start;
}

.phone-row .phone {
  --phone-w: 100%;
}

.phone-row figcaption {
  margin-top: 18px;
  text-align: center;
}

.phone-row figcaption strong {
  display: block;
  font-size: 1.02rem;
}

.phone-row figcaption span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- feature cards ----------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 0;
}

.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  font-size: 1.25rem;
  color: var(--white);
  background: var(--wine);
}

/* Per-feature accents, reusing the app's own semantic colours. */
.card__icon--live {
  background: var(--live-red);
}
.card__icon--party {
  background: var(--party);
}
.card__icon--room {
  background: var(--room-teal);
}
.card__icon--coins {
  background: var(--coins);
}
.card__icon--diamonds {
  background: var(--diamonds);
}
.card__icon--gold {
  background: var(--gold);
  color: #3a0718;
}

/* ---- stats ------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: var(--shadow-raised);
}

.stat strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
}

.stat span {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ---- CTA band ---------------------------------------------------------- */
.cta {
  text-align: center;
  padding: clamp(44px, 7vw, 76px) 32px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-card);
}

.cta p {
  color: var(--muted);
  max-width: 34em;
  margin-inline: auto;
  margin-bottom: 28px;
}

.cta__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- FAQ / disclosure -------------------------------------------------- */
.faq {
  display: grid;
  gap: 12px;
}

details.qa {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-soft);
}

details.qa summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

details.qa summary::-webkit-details-marker {
  display: none;
}

details.qa summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--wine);
  line-height: 1;
  flex: none;
}

details.qa[open] summary::after {
  content: '\2013';
}

details.qa p {
  color: var(--muted);
  font-size: 0.97rem;
  margin: 12px 0 0;
}

/* ---- legal / long-form pages ------------------------------------------- */
.page-head {
  padding-block: clamp(44px, 7vw, 76px) 32px;
  border-bottom: 1px solid var(--divider);
}

.page-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.updated {
  font-size: 0.88rem;
  color: var(--muted);
}

.prose {
  max-width: 74ch;
  padding-block: clamp(40px, 6vw, 64px);
}

.prose h2 {
  font-size: 1.5rem;
  margin-top: 2.2em;
  margin-bottom: 0.5em;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.08rem;
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}

.prose ul,
.prose ol {
  padding-inline-start: 1.3em;
  margin-block: 0 1em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose li::marker {
  color: var(--wine);
}

.callout {
  background: var(--white);
  border: 1px solid var(--divider);
  border-inline-start: 4px solid var(--wine);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-block: 24px;
  box-shadow: var(--shadow-soft);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* Table of contents on legal pages. */
.toc {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-soft);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.toc ol {
  margin: 0;
  padding-inline-start: 1.2em;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}

/* ---- contact grid (support page) --------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.contact-card h3 {
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-card a {
  font-weight: 700;
  word-break: break-word;
}

/* Steps list, used for "before you contact us". */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 46px;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--wine);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ---- footer ------------------------------------------------------------ */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--divider);
  padding-block: 52px 36px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 36px;
  margin-bottom: 36px;
}

.site-footer p {
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer h4 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 9px;
}

.site-footer ul a {
  color: var(--ink);
  font-size: 0.95rem;
}

.site-footer__bottom {
  border-top: 1px solid var(--divider);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.langs li {
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  color: var(--muted);
  background: var(--canvas);
}

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__visual {
    order: -1;
  }

  .phone {
    --phone-w: 260px;
  }

  .phone-row {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--divider);
    padding: 8px var(--gutter) 20px;
  }

  .nav[data-open='true'] {
    display: flex;
  }

  .nav a {
    padding-block: 12px;
    border-bottom: 1px solid var(--divider);
    font-size: 1rem;
  }

  .nav .btn {
    margin-top: 14px;
    border-bottom: 0;
  }

  .toc ol {
    columns: 1;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---- print (legal pages get printed / filed) --------------------------- */
@media print {
  .site-header,
  .site-footer,
  .cta,
  .toc {
    display: none;
  }

  body {
    background: #fff;
    font-size: 12pt;
  }
}
