/* ==========================================================================
   Turf War (جنگ محله‌ها) — theme tokens + home showcase.
   "City of Shadows": warm black, one amber primary, cream ink, hex blocks,
   a noir painting and a serif with 1930s manners.
   ========================================================================== */

@font-face {
  font-family: "Instrument Serif";
  src: url("../../../fonts/instrument-serif-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../../../fonts/instrument-serif-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

[data-game="turf-war"] {
  --g-bg: #0c0805;
  --g-well: #17110a;
  --g-card: #2f2415;
  --g-raised: #3d2e1c;
  --g-ink: #f3f3f2;
  --g-ink-2: #c9b99a;
  --g-ink-3: #9b8b6d;
  --g-accent: #ff9500;
  --g-accent-lit: #ffb347;
  --g-accent-shade: #e8860a;
  --g-accent-ink: #201708;
  --g-line: #4a3a24;
  --g-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --g-display: var(--g-serif);
  --tw-hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 55 16.5v31L28 63 1 47.5v-31z M28 63v34 M1 16.5 0 16 M55 16.5l1-.5' fill='none' stroke='%234a3a24' stroke-width='1.2'/%3E%3C/svg%3E");
}

:root[lang="fa"] [data-game="turf-war"],
:root[lang="fa"][data-game="turf-war"] {
  --g-display: var(--font-persian);
}

/* Amber primary with dark ink: the game's own rule, never white on amber. */
.btn--tw {
  --btn-ink: var(--g-accent-ink, #201708);
  background: linear-gradient(180deg, #ffb347 0%, #ff9500 55%, #e8860a 100%);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgb(255 225 170 / 0.8),
    inset 0 -2px 0 rgb(120 60 0 / 0.35),
    0 10px 30px -12px rgb(255 149 0 / 0.6);
  font-weight: 700;
}

.btn--tw:hover {
  box-shadow:
    inset 0 1px 0 rgb(255 225 170 / 0.9),
    inset 0 -2px 0 rgb(120 60 0 / 0.35),
    0 14px 40px -12px rgb(255 149 0 / 0.85);
}

.chip--tw {
  border-radius: 8px;
  background: rgb(23 17 10 / 0.8);
  box-shadow: inset 0 0 0 1px var(--g-line);
  color: var(--g-ink-2);
}

.chip--tw .chip__dot {
  background: var(--g-accent);
  box-shadow: 0 0 0 3px rgb(255 149 0 / 0.25);
}

/* The hex island: block outlines that fade out toward the edges. */
.tw-hex {
  position: absolute;
  inset: 0;
  background-image: var(--tw-hex);
  background-size: 56px 97px;
  opacity: 0.55;
  mask-image: radial-gradient(70% 70% at 50% 60%, #000 20%, transparent 85%);
}

.tw-spot {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(255 149 0 / 0.2), rgb(255 149 0 / 0.05) 55%, transparent);
  filter: blur(10px);
}

.tw-grain {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Serif headline in English; the Persian title stays in Vazirmatn. */
.tw-title {
  font-family: var(--g-display);
  font-weight: 400;
  letter-spacing: -0.01em;
}

:root[lang="fa"] .tw-title {
  font-weight: 800;
}

.tw-title em {
  color: var(--g-accent);
  font-style: italic;
}

:root[lang="fa"] .tw-title em {
  font-style: normal;
}

.tw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--g-ink-2);
  font-size: var(--fs-13);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.tw-kicker::before,
.tw-kicker::after {
  content: "";
  width: 7px;
  height: 7px;
  rotate: 45deg;
  background: var(--g-accent);
}

/* Art-deco frame with amber corner brackets. */
/* Square corners all the way in: a picture frame, concentric at 0. */
.tw-frame {
  position: relative;
  border: 1px solid var(--g-line);
  border-radius: 0;
  padding: 10px;
  background: linear-gradient(180deg, rgb(47 36 21 / 0.55), rgb(12 8 5 / 0.9));
  box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.95);
}

.tw-frame::before,
.tw-frame::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid var(--g-accent);
  pointer-events: none;
  transition: inset var(--t-slow) var(--ease-out);
}

.tw-frame::before {
  top: -7px;
  inset-inline-start: -7px;
  border-inline-end: 0;
  border-bottom: 0;
}

.tw-frame::after {
  bottom: -7px;
  inset-inline-end: -7px;
  border-inline-start: 0;
  border-top: 0;
}

.tw-frame__img {
  position: relative;
  overflow: hidden;
  outline: 1px solid oklch(1 0 0 / 0.1);
  outline-offset: -1px;
}

.tw-frame__img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 50% 30%;
  filter: sepia(0.15) contrast(1.05);
  transition: transform 1.6s var(--ease-out), filter 1.2s ease;
}

.tw-frame__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 90% at 50% 40%, transparent 50%, rgb(12 8 5 / 0.75)),
    linear-gradient(to top, rgb(12 8 5 / 0.9), transparent 45%);
}

.tw-frame:hover .tw-frame__img img {
  transform: scale(1.04);
  filter: sepia(0) contrast(1.08);
}

.tw-frame:hover::before {
  top: -11px;
  inset-inline-start: -11px;
}

.tw-frame:hover::after {
  bottom: -11px;
  inset-inline-end: -11px;
}

/* The crew: five busts standing on hex plates; a plate lights amber, like a
   selected block on the board. */
.tw-crew {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tw-role {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.tw-role__art {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 4;
}

/* The hex plate the figure stands on. */
.tw-role__art::before {
  content: "";
  position: absolute;
  inset-inline: 2%;
  bottom: 0;
  height: 24%;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background-color: #3d3427;
  background-image: linear-gradient(180deg, rgb(255 255 255 / 0.12), rgb(0 0 0 / 0.16));
  box-shadow: inset 0 0 0 1px #5b4d3b;
  transition: background-color var(--t-med) ease, filter var(--t-med) ease;
}

.tw-role__art img {
  position: relative;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 92%;
  margin-bottom: 9%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.6));
  transition: transform 300ms var(--ease-out);
}

.tw-role:hover .tw-role__art::before {
  background-color: #f39424;
  filter: drop-shadow(0 0 14px rgb(255 149 0 / 0.65));
}

.tw-role:hover .tw-role__art img {
  transform: translateY(-6%);
}

.tw-role__name {
  color: var(--g-ink);
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.2;
}

.tw-price {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--g-well, #17110a);
  box-shadow: inset 0 0 0 1px var(--g-line, #4a3a24);
  color: var(--g-accent);
  font-family: var(--font-latin);
  font-size: var(--fs-12);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tw-price--free {
  color: var(--g-ink-2);
}

/* ---------- Home showcase ------------------------------------------------- */

.showcase--turf-war .showcase__bg .tw-spot {
  top: -10%;
  inset-inline-end: -14%;
}

.showcase--turf-war .showcase__title {
  font-size: clamp(3.25rem, 2.2rem + 4.6vw, 6.25rem);
  line-height: 0.92;
}

:root[lang="fa"] .showcase--turf-war .showcase__title {
  font-size: clamp(2.75rem, 2rem + 3.6vw, 5rem);
  line-height: 1.2;
}

