/* Arcana Nouveau's page, dressed as the game dresses its own screens: the Peacock
   Room tokens (apps/game/src/styles/theme.ts), its lettering, and Viktor's UI-kit
   plates, stretched exactly as the game stretches them (apps/game/src/components/
   ui/uiKit.ts: ornamented ends drawn at fixed size, only the plain middle grows;
   the slice numbers below are the game's measured ones). */

:root {
  --bg: #0f3b3f;
  --bg-deep: #0a2838;
  --gold: #c9a84c;
  --ivory: #e8dcc4;
  --glow: rgba(201, 168, 76, 0.15);
}

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

html { height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--gold);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% 40%, var(--glow) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 120%, var(--bg-deep) 0%, transparent 70%),
    url("assets/arcana/texture-teal.webp");
  background-size: auto, auto, 256px 256px;
  font-family: "Cormorant Garamond", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.an {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

/* The game's panel frame (slice 202 / 232), corners drawn 150 px wide; the frame's
   double line sits 14 / 232 of that in from the edge. */
.an-panel {
  width: min(100%, 560px);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(18px, 3.5vw, 26px);
  padding: clamp(56px, 10vw, 84px) clamp(28px, 7vw, 64px);
  border: 11px solid transparent;
  border-image: url("assets/arcana/panel-frame.webp") 202 232 / 131px 150px stretch;
  background: var(--bg) url("assets/arcana/texture-teal.webp") repeat;
  background-size: 256px 256px;
  background-clip: padding-box;
  text-align: center;
  filter: drop-shadow(0 30px 50px rgba(5, 20, 28, 0.55));
}

.an-title {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 11vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  /* the letters a touch inset into the panel, as gilt lettering sits */
  text-shadow: 0 2px 0 rgba(5, 20, 28, 0.6), 0 0 24px rgba(201, 168, 76, 0.18);
}

/* the game's divider: the gold line fading out either side of its ornament */
.an-divider { display: flex; align-items: center; width: min(100%, 340px); }
.an-divider span {
  flex: 1; min-width: 0; height: 18px;
  background: url("assets/arcana/divider-line.webp") center / auto 18px repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 85%);
  mask-image: linear-gradient(90deg, transparent, #000 85%);
}
.an-divider span:last-child {
  -webkit-mask-image: linear-gradient(270deg, transparent, #000 85%);
  mask-image: linear-gradient(270deg, transparent, #000 85%);
}
.an-divider img { flex: none; width: 52px; height: 18px; }

/* The title-frame plate (slice 44 / 165), drawn 60 px tall: its ornamented ends
   at 49 px each, frame lines 13 px deep. Open in the middle, so the teal shows. */
.an-plaque {
  margin: 0;
  min-height: 60px;
  display: inline-flex; align-items: center; justify-content: center;
  border-style: solid;
  border-color: transparent;
  border-width: 13px 49px;
  border-image: url("assets/arcana/title-frame.webp") 44 165 fill / 13px 49px stretch;
  padding: 0 14px;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 4.6vw, 1.5rem);
  white-space: nowrap;
  color: var(--ivory);
}

/* The gold button plate (slice 33 / 141), drawn 52 px tall: ends 43 px, lines 10 px.
   Dark lettering on the gold face, as the game's Continue. One line, always: a
   second line would stretch the ornamented ends. */
.an-button {
  min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border-style: solid;
  border-color: transparent;
  border-width: 10px 43px;
  border-image: url("assets/arcana/btn-gold.webp") 33 141 fill / 10px 43px stretch;
  padding: 0 6px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #15110a;
  text-decoration: none;
  transition: filter 0.15s ease;
}
.an-button::before { content: "‹"; margin-right: 0.6em; font-size: 1.2em; line-height: 1; }
.an-button:hover { filter: brightness(1.08); }
/* darker while pressed, as the game's plated buttons */
.an-button:active { filter: brightness(0.85); }
.an-button:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }

.an-footer { padding: 0 16px 24px; text-align: center; }
.an-footer p {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .an-button { transition: none; }
}
