/* ─────────────────────────────────────────────────────────────
   Triple Kong, LLC — deep jade felt, ivory tile faces, gold rules.
   Static, no build step. One stylesheet.
   ───────────────────────────────────────────────────────────── */

:root {
  --felt-900: #071a12;
  --felt-800: #0b2418;
  --felt-700: #113022;
  --felt-600: #1a4d2e;

  --ivory: #f3ecdd;
  --ivory-dim: #cfc6b4;
  --bone: #fffaf0;

  --gold: #c9a227;
  --vermillion: #c8452f;
  --jade: #3f8f63;

  --display: 'Bodoni Moda', 'Didot', Georgia, serif;
  --body: 'Karla', 'Helvetica Neue', sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --rule: 1px solid rgba(201, 162, 39, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 78% -10%, rgba(63, 143, 99, 0.22), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgba(200, 69, 47, 0.1), transparent 65%),
    linear-gradient(178deg, var(--felt-800) 0%, var(--felt-900) 70%);
  background-attachment: fixed;
  color: var(--ivory);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fine grain over the whole page — keeps the flat green from looking like
   a CSS swatch and reads as felt. */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

/* ── Tiles ──────────────────────────────────────────────────── */

/* Real tile faces. The art carries its own bevel and rounding, so the only
   thing CSS adds is the cast shadow onto the felt. */
.tile {
  display: block;
  width: 3.3rem;
  height: auto;
  border-radius: 0.4rem 0.4rem 0.55rem 0.55rem;
  box-shadow: 0 0.7rem 1.3rem rgba(0, 0, 0, 0.45);
  user-select: none;
}

/* ── Top bar ────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(7, 26, 18, 0.86), rgba(7, 26, 18, 0.35));
  border-bottom: var(--rule);
}

/* The logo is red-on-transparent, so it rides on an ivory tile face —
   same material as the mah jongg tiles elsewhere on the page. */
.mark {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-radius: 0.35rem 0.35rem 0.45rem 0.45rem;
  background: linear-gradient(180deg, var(--bone), var(--ivory));
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 6px 14px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.mark:hover {
  transform: translateY(-2px);
}

.mark__logo {
  display: block;
  width: auto;
  height: 1.15rem;
}

.foot__mark {
  display: block;
  width: auto;
  height: 2.6rem;
  margin-bottom: 0.4rem;
}

.topnav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.4rem);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topnav a {
  text-decoration: none;
  color: var(--ivory-dim);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.topnav a:hover {
  color: var(--bone);
  border-color: var(--gold);
}

/* ── Hero ───────────────────────────────────────────────────── */

/* Single centred column: eyebrow, logo, button, stacked and centred. */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(4rem, 11vh, 8rem) var(--gutter) clamp(5rem, 12vh, 9rem);
  min-height: 60vh;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 1.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  background: var(--gold);
  vertical-align: 0.32em;
  margin-right: 0.9rem;
}

.display {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.4rem, 9vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
}

.nowrap {
  white-space: nowrap;
}

.display em {
  font-style: italic;
  font-weight: 800;
  color: var(--bone);
  margin-left: 0.6em;
}

/* Logo lockup. The source art is only 268px wide, so it is capped near its
   native size — scaling past that goes soft on retina. */
.display--logo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.2rem;
  flex-wrap: wrap;
}

/* The lede used to space the logo from the button; it has moved to the
   studio, so restore that gap here. */
.hero .btn {
  margin-top: clamp(2rem, 4vw, 2.8rem);
}

.hero__logo {
  display: block;
  width: min(100%, 20rem);
  height: auto;
}

.display .llc {
  font-size: 0.2em;
  font-family: var(--body);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  vertical-align: 0.75em;
  margin-left: 0.5em;
}

.lede {
  max-width: 34ch;
  margin: 2rem 0 2.6rem;
  font-size: 1.08rem;
  color: var(--ivory-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  background: transparent;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s;
}
.btn:hover {
  background: var(--gold);
  color: var(--felt-900);
}
.btn:hover svg {
  transform: translateX(4px);
}

/* The wall: three kongs, fanned and overlapping. Centred below the games
   list as a decorative close to the section. */
.wall {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  width: max-content;
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
  transform: rotate(-7deg);
}

.kong {
  display: flex;
  gap: 0.35rem;
}
.kong:nth-child(2) {
  margin-right: -2.6rem;
}
.kong:nth-child(3) {
  margin-right: 1.8rem;
}

/* Tiles deal in when the wall scrolls into view. The script arms the wall
   (hiding the tiles) and adds .is-in once it enters the viewport. Without
   JS the wall is never armed, so the tiles simply show. */
.wall--armed .kong {
  opacity: 0;
}
.wall.is-in .kong {
  animation: deal 0.9s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  animation-delay: var(--d);
}

.kong .tile {
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.kong:hover .tile:nth-child(1) { transform: translateY(-10px) rotate(-3deg); }
.kong:hover .tile:nth-child(2) { transform: translateY(-16px); }
.kong:hover .tile:nth-child(3) { transform: translateY(-16px); }
.kong:hover .tile:nth-child(4) { transform: translateY(-10px) rotate(3deg); }

@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(48px) rotate(6deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__copy > * {
  animation: rise 0.8s ease both;
}
.hero__copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero__copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero__copy > *:nth-child(3) { animation-delay: 0.26s; }
.hero__copy > *:nth-child(4) { animation-delay: 0.36s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Section furniture ──────────────────────────────────────── */

section {
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter);
}

.rule {
  margin: 0 0 clamp(2rem, 5vh, 3.4rem);
  padding-bottom: 0.9rem;
  border-bottom: var(--rule);
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Studio ─────────────────────────────────────────────────── */

/* A single statement carries the section. Set in the body sans rather than
   the Bodoni display — its hairline strokes get hard to read at paragraph
   length. */
.studio__lead {
  margin: 0;
  max-width: 28ch;
  font-family: var(--body);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 300;
  line-height: 1.32;
  letter-spacing: -0.005em;
  color: var(--bone);
  text-wrap: balance;
}

.studio__body {
  margin: 1.8rem 0 0;
  max-width: 46ch;
  color: var(--ivory-dim);
}

/* ── Games ──────────────────────────────────────────────────── */

/* Portrait 4:5 artwork on the left, copy alongside it. */
.card {
  display: grid;
  grid-template-columns: minmax(0, 22rem) 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  text-decoration: none;
  border: var(--rule);
  border-radius: 0.9rem;
  background: linear-gradient(150deg, rgba(26, 77, 46, 0.5), rgba(7, 26, 18, 0.35));
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1), border-color 0.4s,
    box-shadow 0.4s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 162, 39, 0.7);
  box-shadow: 0 1.6rem 3rem rgba(0, 0, 0, 0.4);
}

/* The banner carries its own background and framing, so the face is just a
   rounded window onto it — no felt gradient behind. */
.card__face {
  border-radius: 0.5rem;
  overflow: hidden;
  line-height: 0;
}

.card__shot {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.card:hover .card__shot {
  transform: scale(1.02);
}

.card__kicker {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--jade);
}

/* Title set in the body sans to match the studio lead — keeps the page's
   large statements in one voice rather than reviving the Bodoni display. */
.card h3 {
  margin: 0 0 0.9rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--bone);
}

.card p {
  margin: 0 0 1.4rem;
  color: var(--ivory-dim);
  max-width: 52ch;
}

.card__link {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.card__link svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s;
}
.card:hover .card__link svg {
  transform: translate(3px, -3px);
}

/* Store badges sit under the site link as the card's second call to action. */
.card__stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: 1.5rem 0 0;
  max-width: none;
}
.card__store {
  display: inline-flex;
  border-radius: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1), opacity 0.3s;
}
.card__store img {
  display: block;
  height: 2.6rem;
  width: auto;
}
.card__store:hover {
  transform: translateY(-2px);
  opacity: 0.88;
}
.card__store:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.games__next {
  margin: 2.4rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.games__next span {
  color: rgba(207, 198, 180, 0.5);
}

/* ── Contact ────────────────────────────────────────────────── */

.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact__aside p {
  margin: 0 0 1.6rem;
  max-width: 34ch;
  color: var(--ivory-dim);
}

.contact__direct a {
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.005em;
  color: var(--bone);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.contact__direct a:hover {
  color: var(--gold);
}

.form {
  display: grid;
  gap: 1.1rem;
}

.form label {
  display: grid;
  gap: 0.45rem;
}

.form label span {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.form input,
.form textarea {
  font: inherit;
  color: var(--bone);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(243, 236, 221, 0.18);
  border-radius: 0.4rem;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.25s, background 0.25s;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.07);
}

.form textarea {
  resize: vertical;
}

.form button {
  justify-self: start;
  margin-top: 0.4rem;
  padding: 0.85rem 2.2rem;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--felt-900);
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.form button:hover {
  background: transparent;
  color: var(--gold);
}

/* Netlify honeypot */
.hp {
  display: none;
}

/* ── Footer ─────────────────────────────────────────────────── */

.foot {
  display: grid;
  gap: 0.5rem;
  padding: 2.6rem var(--gutter) 3.4rem;
  border-top: var(--rule);
  font-size: 0.8rem;
  color: var(--ivory-dim);
}
.foot p {
  margin: 0;
}
.foot__fine {
  color: rgba(207, 198, 180, 0.45);
  font-size: 0.72rem;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 0.3rem;
}
.foot__links a {
  color: var(--ivory-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s;
}
.foot__links a:hover {
  color: var(--bone);
  border-color: var(--gold);
}

/* ── Legal pages (privacy, terms) ───────────────────────────── */

/* A single readable measure of prose. Reuses the topbar/footer furniture
   from the home page; everything here is just the document body. */
.legal {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--gutter) clamp(4rem, 10vh, 7rem);
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
}
.legal__back:hover {
  color: var(--bone);
}

.legal__title {
  margin: 0 0 0.5rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.legal__meta {
  margin: 0 0 clamp(2rem, 5vh, 3rem);
  padding-bottom: 1.4rem;
  border-bottom: var(--rule);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ivory-dim);
}

.legal h2 {
  margin: 2.6rem 0 0.8rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  letter-spacing: -0.01em;
  color: var(--bone);
}

.legal h3 {
  margin: 1.7rem 0 0.5rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--ivory);
}

.legal p {
  margin: 0 0 1.1rem;
  color: var(--ivory-dim);
}

.legal a {
  color: var(--gold);
}

.legal ul {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
  color: var(--ivory-dim);
}
.legal li {
  margin: 0.4rem 0;
}

.legal strong {
  color: var(--ivory);
  font-weight: 500;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 880px) {
  .hero {
    min-height: 0;
  }
  .wall {
    transform: rotate(-4deg) scale(0.85);
    transform-origin: center;
  }
  .kong:nth-child(2),
  .kong:nth-child(3) {
    margin-right: 0;
  }
  .contact__grid,
  .card {
    grid-template-columns: 1fr;
  }
  /* Stacked, the 4:5 art would otherwise run the full card width. */
  .card__face {
    max-width: 20rem;
    margin: 0 auto;
  }
  .card__store img {
    height: 2.3rem;
  }
  .topnav {
    gap: 1.1rem;
  }
}

/* The wide logo can't shrink on its own, so give it and the nav less room
   to fight over on narrow phones. */
@media (max-width: 400px) {
  .topbar {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  .mark {
    padding: 0.35rem 0.45rem;
  }
  .mark__logo {
    height: 0.85rem;
  }
  .topnav {
    gap: 0.7rem;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }
}

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