/*
 * Elements Casino Alchemy - site styles.
 * Loaded after the Tailwind CDN script, so these rules win ties with utilities.
 * Keep component rules off properties that a utility on the same element also sets.
 * Colour and radius values mirror the tailwind.config block in each page head.
 */

:root {
  --color-ink: #120d3a;
  --color-deep-purple: #4b2a6c;
  --color-panel-deep: #2c1a50;
  --color-gold: #f0d184;
  --color-gold-light: #fadb9b;
  --color-gold-dark: #b58923;
  --color-lip-gold: #7b5d18;
  --color-signature-red: #b8160d;
  --color-bright-red: #e1251b;
  --color-lip-red: #6e0d08;
  --color-lip-grey: #d0cfd8;
  --color-accent-pink: #cc3366;
  --color-success: #1e7b4f;
  --color-canvas: #f3f3f5;
  --color-well: #ececef;
  --color-muted: #5e5a79;
  --color-lilac: #cdc3d6;

  --font-display: "Fredoka", ui-rounded, system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-panel: 0 4px 16px -4px rgb(18 13 58 / 0.08);
  --header-height: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  background-color: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 3px;
}

/* Layout */
.container-site {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 768px) {
  .container-site {
    padding-inline: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .container-site {
    padding-inline: 2rem;
  }
}

/* The eight type roles (app DESIGN.md section 3). Phone, tablet, desk. */
.type-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.125rem;
  line-height: 1.05;
  letter-spacing: 0;
}
@media (min-width: 768px) {
  .type-display {
    font-size: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .type-display {
    font-size: 3.25rem;
    line-height: 1.02;
  }
}

.type-numeral {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1;
}
@media (min-width: 1024px) {
  .type-numeral {
    font-size: 2rem;
  }
}

.type-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.15;
}
@media (min-width: 768px) {
  .type-title {
    font-size: 1.625rem;
  }
}
@media (min-width: 1024px) {
  .type-title {
    font-size: 2rem;
  }
}

.type-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.2;
}
@media (min-width: 1024px) {
  .type-heading {
    font-size: 1.375rem;
  }
}

.type-cta {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.type-body {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
}
@media (min-width: 768px) {
  .type-body {
    font-size: 1rem;
    line-height: 1.5;
  }
}
@media (min-width: 1024px) {
  .type-body {
    font-size: 1.0625rem;
    line-height: 1.6;
  }
}

.type-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.type-caption {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1.3;
  letter-spacing: 0.2px;
}
@media (min-width: 768px) {
  .type-caption {
    font-size: 0.8125rem;
  }
}

/* Gold words on dark art (display size only) */
.text-gold-gradient {
  background-image: linear-gradient(90deg, var(--color-gold-light), var(--color-gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Game surfaces: lipped buttons, rounded panels, gold fills */
.gold-fill {
  background-image: linear-gradient(180deg, var(--color-gold-light), var(--color-gold) 45%, var(--color-gold-dark));
}

/* Buttons. Wrapping on phones is set by utilities on the element (whitespace-normal, md:whitespace-nowrap). */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 200ms ease, filter 200ms ease;
}
.btn-hero {
  min-height: 4rem;
  padding: 0.75rem 1.75rem;
  font-size: 1.125rem;
}
.btn-primary {
  color: #ffffff;
  background-image: linear-gradient(180deg, var(--color-bright-red), var(--color-signature-red));
  box-shadow: 0 4px 0 var(--color-lip-red), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--color-lip-red), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
.btn-secondary {
  color: var(--color-ink);
  background-image: linear-gradient(180deg, #ffffff, var(--color-well));
  box-shadow: 0 4px 0 var(--color-lip-grey), inset 0 1px 0 #ffffff;
}
.btn-secondary:hover {
  filter: brightness(1.02);
}
.btn-secondary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--color-lip-grey), inset 0 1px 0 #ffffff;
}

.panel {
  border: 1px solid rgb(18 13 58 / 0.14);
  border-radius: var(--radius-xl);
  background-image: linear-gradient(180deg, #ffffff, #fafafa);
  box-shadow: var(--shadow-panel);
}
.card {
  border: 1px solid rgb(18 13 58 / 0.14);
  border-radius: var(--radius-lg);
  background-image: linear-gradient(180deg, #ffffff, #fafafa);
  box-shadow: var(--shadow-panel);
}
.tile {
  border: 1px solid rgb(18 13 58 / 0.14);
  border-radius: var(--radius-md);
  background-image: linear-gradient(180deg, #f6f5f7, var(--color-well));
}

/* Dark art sections: focus ring in gold so it stays visible on ink */
.on-dark :focus-visible {
  outline-color: var(--color-gold);
}

/* Bottom-weighted art scrim: transparent to ink 85 percent */
.art-scrim {
  background-image: linear-gradient(180deg, rgb(18 13 58 / 0) 35%, rgb(18 13 58 / 0.85) 100%);
}

/* Header navigation */
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-ink);
  text-decoration: none;
}
.nav-link:hover {
  background-color: var(--color-well);
}
.nav-link[aria-current="page"] {
  color: #ffffff;
  background-color: var(--color-ink);
}

/* Screenshot rail: a deliberate horizontal scroll region with snap */
.rail {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rail-track {
  display: flex;
  gap: 1rem;
  padding: 0.25rem 1rem 1rem;
}
.rail-item {
  flex: 0 0 62%;
  min-width: 0;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .rail-item {
    flex-basis: 220px;
  }
  .rail-track {
    padding-inline: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .rail-item {
    flex-basis: 200px;
  }
}

/* FAQ accordion: native details, large tap target */
.faq-item {
  border-bottom: 1px solid rgb(18 13 58 / 0.14);
}
.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.75rem 0;
  cursor: pointer;
  list-style: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-chevron {
  transition: transform 200ms ease;
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 0 1.25rem;
  max-width: 68ch;
}

/* Legal documents: prose measure, headings wear a role */
.prose-legal {
  max-width: 72ch;
  color: var(--color-ink);
}
.prose-legal p,
.prose-legal li {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 600;
}
.prose-legal p + p,
.prose-legal p + ul,
.prose-legal ul + p {
  margin-top: 0.875rem;
}
.prose-legal h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.2;
}
.prose-legal ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.prose-legal li + li {
  margin-top: 0.375rem;
}
.prose-legal a {
  color: var(--color-lip-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose-legal strong {
  font-weight: 800;
}

/* Entrance for the hero art only. Off entirely under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero-enter {
    animation: hero-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
}
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
