@import url('../fonts/fonts.css');

/* ============================================================
   Salon Privé — design tokens
   ============================================================ */
:root {
  --ink:        #141414;
  --ink-raise:  #1a1a19;
  --ink-sink:   #0d0d0d;
  --felt:       #14402F;
  --felt-deep:  #0e2c20;
  --gold:       #E8B84B;
  --gold-deep:  #B8862A;
  --bone:       #F2EFE6;
  --red:        #B0302E;

  --bone-70: rgba(242, 239, 230, .70);
  --bone-45: rgba(242, 239, 230, .45);
  --gold-40: rgba(232, 184, 75, .40);
  --gold-18: rgba(232, 184, 75, .18);
  --gold-08: rgba(232, 184, 75, .08);

  --serif: 'Cormorant Garamond', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans:  'Jost', 'Futura', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

  --hair: 1px solid var(--gold-18);
  --hair-strong: 1px solid var(--gold-40);

  /* Salon is hairline and sharp. The "furniture" tokens the casino reskin added
     are neutralised here so every component that still references them falls back
     to flat, square, editorial styling without a per-rule edit. */
  --r:      0;
  --r-sm:   0;
  --r-pill: 0;
  --lift:   none;
  --glow:   none;
  --glass:  none;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 68ch;
  --shell: 1180px;

  --step: cubic-bezier(.22, .61, .36, 1);
  --swing: cubic-bezier(.16, 1, .3, 1);
}

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

/* .btn and .acts set display, which outranks the [hidden] UA rule. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection { background: var(--gold); color: #fff; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #fff;
  padding: .75rem 1.25rem;
  z-index: 100;
}
.skip:focus { left: 0; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   Type
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.005em;
  margin: 0;
}

.display {
  font-size: clamp(3.2rem, 1.6rem + 7vw, 7.5rem);
  font-weight: 300;
  line-height: .94;
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
.display em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.h2 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.4rem); }
.h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); }

.label {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.label--mute { color: var(--bone-45); }

.lede {
  font-size: clamp(1.05rem, 1rem + .45vw, 1.3rem);
  line-height: 1.62;
  color: var(--bone-70);
  max-width: 46ch;
  font-weight: 300;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.num {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -.01em;
}

/* Cormorant defaults to old-style figures; every number the player has to read
   fast gets lining figures instead. */
.num, .stake__val, .purse__amt, .chip, .spot, .bin,
.crash__past li, .roul__past li, .readout dd, .ticker .num {
  font-variant-numeric: lining-nums tabular-nums;
}

/* ============================================================
   Layout
   ============================================================ */
.wrap {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
}

section { padding-block: clamp(4.5rem, 9vw, 9rem); }

/* Classical rule: hairline, centre lozenge */
.rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gold);
  margin-block: 2.5rem;
}
.rule::before, .rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-40), transparent);
}
.rule span { font-size: .55rem; opacity: .8; }

.rule--left::before { display: none; }

/* Deco corner brackets */
.bracket { position: relative; }
.bracket::before, .bracket::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--gold-40);
  pointer-events: none;
}
.bracket::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.bracket::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: var(--hair);
}
.nav__in {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--gold);
  margin-right: auto;
}
.brand svg { width: 22px; height: 22px; }
.brand b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--bone);
}
.nav__links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.2rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bone-70);
  padding-block: .4rem;
  border-bottom: 1px solid transparent;
  transition: color .28s var(--step), border-color .28s var(--step);
}
.nav__links a:hover,
.nav__links a[aria-current='page'] {
  color: var(--bone);
  border-bottom-color: var(--gold);
}

.nav__toggle { display: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  --btn-fg: var(--gold);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .95rem 2rem;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: transparent;
  border: 1px solid var(--gold-40);
  border-radius: 0;
  cursor: pointer;
  overflow: hidden;
  transition: color .3s var(--step), border-color .3s var(--step);
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .38s var(--swing);
  z-index: -1;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover:not(:disabled) { color: var(--ink); border-color: var(--gold); }
.btn:hover:not(:disabled)::after { transform: scaleY(1); }
.btn:disabled {
  opacity: 1;
  cursor: not-allowed;
  color: var(--bone-45);
  background: transparent;
  border-color: var(--gold-18);
}
.btn:disabled::after { display: none; }

.btn--solid {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.btn--solid::after { background: var(--bone); }
.btn--solid:hover:not(:disabled) { color: var(--ink); }

.btn--quiet {
  border-color: transparent;
  color: var(--bone-70);
  padding-inline: 0;
}
.btn--quiet::after { display: none; }
.btn--quiet:hover { color: var(--gold); }

.btn--sm { padding: .6rem 1.1rem; font-size: .68rem; letter-spacing: .16em; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding-block: clamp(5rem, 12vw, 11rem) clamp(4rem, 8vw, 7rem);
  isolation: isolate;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(70% 55% at 50% 0%, rgba(20, 64, 47, .55), transparent 70%),
    radial-gradient(40% 40% at 85% 20%, rgba(232, 184, 75, .07), transparent 70%);
}
.hero__rose {
  position: absolute;
  top: 50%; left: 50%;
  width: min(118vw, 900px);
  translate: -50% -50%;
  z-index: -1;
  opacity: .42;
  animation: turn 240s linear infinite;
}
@keyframes turn { to { rotate: 360deg; } }

.hero__in { position: relative; text-align: center; }
.hero .lede { margin-inline: auto; }
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.ticker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: 2.2rem;
  border-top: var(--hair);
}
.ticker div { text-align: center; }
.ticker .num { display: block; font-size: 2rem; color: var(--gold); }
.ticker .label { font-size: .64rem; }

/* ============================================================
   Game grid
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr));
  gap: 1px;
  background: var(--gold-18);
  border: var(--hair);
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: clamp(1.6rem, 3vw, 2.2rem);
  background: var(--ink);
  min-height: 190px;
  isolation: isolate;
  transition: background .4s var(--step);
}
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(120% 100% at 50% 100%, rgba(20, 64, 47, .85), transparent 70%);
  transition: opacity .45s var(--step);
}
.tile:hover::before, .tile:focus-visible::before { opacity: 1; }
.tile__ico {
  display: block;
  width: 34px;
  height: 34px;
  color: var(--gold);
  margin-bottom: .5rem;
  transition: transform .5s var(--swing);
}
.tile__ico svg { width: 100%; height: 100%; }
.tile:hover .tile__ico { transform: translateY(-3px); }
.tile h3 { font-size: 1.5rem; }
.tile p {
  font-size: .88rem;
  color: var(--bone-45);
  line-height: 1.55;
  margin: 0;
}
.tile__edge {
  margin-top: auto;
  padding-top: 1rem;
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone-45);
}
.tile__edge b { color: var(--gold); font-weight: 500; }

/* ============================================================
   Feature rows
   ============================================================ */
.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: center;
}

.notes {
  display: grid;
  gap: 1px;
  background: var(--gold-18);
  border: var(--hair);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.note { background: var(--ink); padding: clamp(1.6rem, 3vw, 2.3rem); }
.note h3 { font-size: 1.35rem; margin-bottom: .6rem; }
.note p { font-size: .9rem; color: var(--bone-45); margin: 0; }
.note .label { display: block; margin-bottom: 1.1rem; }

.panel {
  border: var(--hair);
  background: linear-gradient(180deg, var(--ink-raise), var(--ink));
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

code, .mono {
  font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;
  font-size: .85em;
  color: var(--gold);
  word-break: break-all;
}

/* ============================================================
   Footer
   ============================================================ */
.foot {
  border-top: var(--hair);
  padding-block: 3.5rem 2.5rem;
  margin-top: 2rem;
}
.foot__in {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.foot__note {
  font-size: .78rem;
  color: var(--bone-45);
  line-height: 1.7;
  max-width: 52ch;
}
.foot__note strong { color: var(--bone-70); font-weight: 400; }
.foot__links { display: flex; flex-direction: column; gap: .5rem; }
.foot__links a {
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bone-45);
  transition: color .3s var(--step);
}
.foot__links a:hover { color: var(--gold); }

.age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--gold-40);
  border-radius: 50%;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 500;
  flex-shrink: 0;
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
/* Visible by default: an element that paints a background must never depend on
   JavaScript to become opaque. The observer only plays the entrance. */
.rise.in { animation: rise .8s var(--step) backwards; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .nav__links {
    position: fixed;
    inset: 68px 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    border-bottom: var(--hair);
    padding: .5rem var(--gutter) 1.5rem;
    transform: translateY(-120%);
    transition: transform .4s var(--swing);
  }
  .nav__links a {
    display: block;
    padding: .9rem 0;
    font-size: .9rem;
    border-bottom: var(--hair);
  }
  .nav[data-open='true'] .nav__links { transform: none; }

  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px; height: 40px;
    padding: 0 8px;
    background: none;
    border: 1px solid var(--gold-40);
    cursor: pointer;
  }
  .nav__toggle i {
    display: block;
    height: 1px;
    background: var(--gold);
    transition: transform .35s var(--swing), opacity .2s;
  }
  .nav[data-open='true'] .nav__toggle i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav[data-open='true'] .nav__toggle i:nth-child(2) { opacity: 0; }
  .nav[data-open='true'] .nav__toggle i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .ticker { gap: 1.5rem 2.5rem; }
  .ticker .num { font-size: 1.6rem; }
  .foot__in { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  /* Decoration stops. The games keep their motion, because in a casino the spin,
     the deal and the falling ball ARE the thing being played — removing them
     removes the game, not the distraction. Durations are shortened in script. */
  .hero__rose,
  .card__live i,
  .pick__dot,
  .auto.is-running > summary::before,
  .rise.in { animation: none; }

  .tile::before, .card::before { transition: none; }
  .stage, .console > * { animation: none; }
}
