/* Prabhaav Creations — "Himalayan Dawn" design system.
   One stylesheet for every page: marketing pages, legal pages and (later) blog posts. */

:root {
  --bg: #fff8ef;
  --bg-warm: #fdeedd;
  --card: #ffffff;
  --ink: #1b1f4a;
  --ink-2: #4b4f72;
  --ink-3: #686b88;
  --line: rgba(27, 31, 74, 0.1);
  --line-2: rgba(27, 31, 74, 0.16);
  --sun-1: #ffe38a;
  --sun-2: #fbb247;
  --sun-3: #f2804a;
  --violet: #5f5aa2;
  --accent: #b2470f;
  --grad-text: linear-gradient(100deg, #e2580c, #d6402b 55%, #b8336a);
  --grad-sun: linear-gradient(180deg, #ffd66b, #f6a23c);
  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 1px 2px rgba(27, 31, 74, 0.05), 0 24px 48px -24px rgba(27, 31, 74, 0.25);
  --shadow-lg: 0 1px 2px rgba(27, 31, 74, 0.05), 0 34px 64px -30px rgba(27, 31, 74, 0.4);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-deva: "Mukta", "Noto Sans Devanagari", sans-serif;
  --nav-h: 76px;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.nw {
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: min(74rem, 100% - 3rem);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(48rem, 100% - 3rem);
  margin-inline: auto;
}

.np {
  font-family: var(--font-deva);
  letter-spacing: 0;
}

/* ---------- Type helpers ---------- */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sun-2), var(--sun-3));
}

.h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 500;
  color: var(--ink-2);
  text-wrap: pretty;
}

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background 0.25s,
    border-color 0.25s;
}

.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  transition: transform 0.35s var(--ease-out);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px rgba(27, 31, 74, 0.6);
}

.btn:hover svg.go {
  transform: translateX(3px);
}

.btn-glass,
.btn-secondary {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border-color: var(--line-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn-glass:hover,
.btn-secondary:hover {
  background: #fff;
  box-shadow: 0 16px 30px -18px rgba(27, 31, 74, 0.4);
}

.btn-sun {
  background: var(--grad-sun);
  color: var(--ink);
}

.btn-sun:hover {
  box-shadow: 0 16px 36px -12px rgba(246, 162, 60, 0.75);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
  border-color: #fff;
  box-shadow: none;
}

.btn-small {
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  view-transition-name: site-nav;
  transition:
    background 0.3s,
    box-shadow 0.3s;
}

.nav.scrolled,
.nav.open {
  background: rgba(255, 248, 239, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  margin-right: auto;
}

.brand img {
  width: 36px;
  height: 23px;
  transition: transform 0.6s var(--ease-out);
}

.brand:hover img {
  transform: translateY(-2px) scale(1.06);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(27, 31, 74, 0.07);
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--ink-2);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  transition:
    background 0.25s,
    color 0.25s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: #fff;
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  box-shadow: 0 1px 2px rgba(27, 31, 74, 0.08);
}

.nav-links .menu-cta {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.35s var(--ease-out),
    top 0.35s var(--ease-out);
}

.nav-toggle span:first-child {
  top: 17px;
}

.nav-toggle span:last-child {
  top: 25px;
}

.nav.open .nav-toggle span:first-child {
  top: 21px;
  transform: rotate(45deg);
}

.nav.open .nav-toggle span:last-child {
  top: 21px;
  transform: rotate(-45deg);
}

/* ---------- Entrance + scroll reveal ---------- */

.rise {
  opacity: 0;
  transform: translateY(20px);
  animation: rise 1.1s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 1s);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 1s var(--ease-out),
    transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 1s);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Home hero: dawn over the Himalaya ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: max(100svh, 720px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #d9e4f7 0%, #ece4ef 34%, #fbe3d3 58%, #ffe8c4 78%, #fff1dc 100%);
}

.predawn {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #b9c6ea 0%, #cfc9e6 50%, #e7cfd6 100%);
  animation: fade-out 3.2s 0.2s ease-out forwards;
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

/* The mountains live in a "scene" that fills the space below the text (overlapping it a little).
   Each ridge is a wide panorama scaled by the scene's height, so wider screens see more
   mountains instead of zooming in and cropping the peaks or the sun. */
.scene {
  position: relative;
  z-index: 1;
  flex: 1 0 clamp(240px, 32vh, 420px);
  max-height: 600px;
  margin-top: calc(-1 * clamp(12px, 2.6vh, 40px));
  pointer-events: none;
}

.layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -3%;
  right: -3%;
  pointer-events: none;
  will-change: transform;
}

.layer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.layer.sun {
  z-index: 1;
}

.sun-inner {
  position: absolute;
  inset: 0;
  animation: sunrise 3.4s 0.2s var(--ease-out) both;
}

/* sized from the scene height so it always sits on the same spot of the ridge line */
.scene .sun-glow,
.scene .sun-disc {
  position: absolute;
  left: 76%;
  top: 25%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.scene .sun-glow {
  height: 165%;
  background: radial-gradient(closest-side, rgba(255, 231, 160, 0.95), rgba(255, 210, 122, 0.45) 35%, rgba(255, 210, 122, 0));
}

.scene .sun-disc {
  height: 46%;
  background: radial-gradient(circle at 45% 40%, #fff6cc, #ffd66b 55%, #f7a845);
}

@keyframes sunrise {
  from {
    transform: translateY(26%);
  }
}

.l-far {
  z-index: 2;
}

.l-far2 {
  z-index: 3;
}

.l-mid {
  z-index: 4;
}

.l-near {
  z-index: 5;
}

.l-front {
  z-index: 7;
}

.mist {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  height: 36%;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 246, 236, 0.75) 60%, transparent);
}

.cloud {
  position: absolute;
  z-index: 1;
  opacity: 0.85;
  pointer-events: none;
  animation: drift 90s linear infinite;
}

.cloud-1 {
  top: 24%;
  left: -10%;
  width: 220px;
}

.cloud-2 {
  top: 40%;
  left: 60%;
  width: 160px;
  opacity: 0.6;
  animation-duration: 120s;
  animation-delay: -60s;
}

@keyframes drift {
  from {
    transform: translateX(-10vw);
  }
  to {
    transform: translateX(110vw);
  }
}

.birds {
  position: absolute;
  top: 30%;
  left: 0;
  z-index: 1;
  width: 70px;
  pointer-events: none;
  animation: fly 38s 1.5s linear infinite;
}

.birds path {
  fill: none;
  stroke: rgba(27, 31, 74, 0.55);
  stroke-width: 1.6;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  animation: flap 0.9s ease-in-out infinite alternate;
}

.birds path:nth-child(2) {
  animation-delay: -0.3s;
}

.birds path:nth-child(3) {
  animation-delay: -0.6s;
}

@keyframes flap {
  to {
    transform: scaleY(0.4);
  }
}

@keyframes fly {
  from {
    transform: translate(-10vw, 40px);
  }
  to {
    transform: translate(110vw, -60px);
  }
}

.hero-copy {
  position: relative;
  z-index: 8;
  margin-bottom: auto;
  text-align: center;
  padding-top: clamp(124px, 16vh, 168px);
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem 0.4rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(27, 31, 74, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 1.6rem;
}

.pill .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
}

.pill .dot img {
  width: 18px;
}

.hero h1 {
  font-size: clamp(2.8rem, 7.6vw, 6.3rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 .line {
  display: block;
}

.hero .lede {
  max-width: 37rem;
  margin: 1.5rem auto 2rem;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  z-index: 9;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border-radius: 999px;
  border: 2px solid rgba(27, 31, 74, 0.3);
}

.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--ink);
  animation: cue 2s ease-in-out infinite;
}

@keyframes cue {
  60% {
    transform: translateY(12px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- Inner page hero ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding: calc(var(--nav-h) + clamp(3rem, 7vw, 5.5rem)) 0 clamp(9rem, 15vw, 13rem);
  background: linear-gradient(180deg, #dbe5f7 0%, #ede5ef 40%, #fbe4d4 72%, #ffeccf 100%);
}

.page-hero .ridge-art {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(130px, 17vw, 230px);
  z-index: -1;
  pointer-events: none;
}

.page-hero .ridge-art svg {
  width: 100%;
  height: 100%;
  overflow: visible; /* lets the sun's glow fade out above the strip instead of being cut */
}

.page-hero .ridge-art .ph-sun {
  animation: sunrise-small 3s 0.2s var(--ease-out) both;
}

@keyframes sunrise-small {
  from {
    transform: translateY(40px);
  }
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: -0.045em;
  max-width: 16ch;
  margin-inline: auto;
}

.page-hero .lede {
  max-width: 36rem;
  margin: 1.2rem auto 0;
}

.page-hero.compact {
  padding-bottom: clamp(8rem, 13vw, 11rem);
}

.page-hero.compact h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.app-badge {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 1.2rem;
  box-shadow: 0 14px 30px -14px rgba(27, 31, 74, 0.55);
}

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(5rem, 11vw, 8.5rem) 0;
}

.section.tight-top {
  padding-top: 0;
}

.center {
  text-align: center;
  margin-inline: auto;
}

.section-head {
  max-width: 42rem;
  margin-bottom: 3.5rem;
}

.section-head > p:not(.kicker) {
  margin-top: 1rem;
  color: var(--ink-2);
  font-size: 1.12rem;
}

/* ---------- Meaning ---------- */

.meaning {
  text-align: center;
}

.meaning .word {
  font-family: var(--font-deva);
  font-weight: 800;
  font-size: clamp(5.5rem, 16vw, 12rem);
  line-height: 1.1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 30px rgba(242, 128, 74, 0.16));
}

.meaning .say {
  font-weight: 600;
  color: var(--ink-3);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

.meaning .say b {
  color: var(--ink);
  letter-spacing: 0.04em;
}

.meaning .def {
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  max-width: 22ch;
  margin: 2rem auto 1.4rem;
}

.meaning .def span {
  color: var(--ink-3);
}

.meaning .body {
  color: var(--ink-2);
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ---------- Cards / principles ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  padding: 2.4rem 2.2rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.6));
  border: 1px solid rgba(27, 31, 74, 0.06);
  box-shadow: var(--shadow);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--ink-2);
}

.orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 1.7rem;
  color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff3c4, #ffd27a 45%, #f59e5b);
  box-shadow:
    0 14px 30px -12px rgba(242, 128, 74, 0.6),
    inset 0 -4px 10px rgba(194, 85, 122, 0.25);
}

.orb svg {
  width: 36px;
  height: 36px;
}

/* ---------- Games ---------- */

.games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.game {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}

.game:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.game-art {
  display: block;
  aspect-ratio: 1024 / 500;
  overflow: hidden;
  background: #1d2a2a;
}

.game-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.game:hover .game-art img {
  transform: scale(1.045);
}

.game-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.7rem 2rem 2rem;
}

.game-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex: none;
  box-shadow: 0 8px 18px -10px rgba(27, 31, 74, 0.5);
}

.game h3 {
  font-size: 1.8rem;
}

.meta {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.3rem;
}

.game-body > p {
  color: var(--ink-2);
  margin-bottom: 1.2rem;
}

.tags {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tags li {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #fff3e2;
  color: var(--accent);
}

.game-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
}

.store-note {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-3);
}

.next-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2rem 2.4rem;
  border-radius: var(--radius);
  border: 1.5px dashed rgba(27, 31, 74, 0.2);
  background: rgba(255, 255, 255, 0.4);
}

.next-card h3 {
  font-size: 1.6rem;
  margin: 0.2rem 0 0.35rem;
}

.next-card p:not(.meta) {
  color: var(--ink-2);
  max-width: 40rem;
}

.bud {
  width: 96px;
  overflow: visible;
}

.bud path {
  transform-box: view-box;
  transform-origin: 60.2px 76.4px;
  transition: transform 1s var(--ease-out);
}

.bud .p-il {
  transform: rotate(16deg) scale(0.8);
}

.bud .p-ir {
  transform: rotate(-16deg) scale(0.8);
}

.bud .p-ol {
  transform: rotate(40deg) scale(0.6);
}

.bud .p-or {
  transform: rotate(-40deg) scale(0.6);
}

.bud .p-c {
  transform: scale(0.8, 0.9);
}

.next-card:hover .bud path {
  transform: none;
}

.soon {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #fbb247);
  white-space: nowrap;
}

/* ---------- The climb (timeline) ---------- */

.climb {
  background: linear-gradient(180deg, var(--bg), var(--bg-warm) 50%, var(--bg));
}

.ridge svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.ridge .fill {
  fill: url(#ridge-fill);
}

.ridge .path {
  fill: none;
  stroke: url(#ridge-stroke);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.js .ridge .fill {
  opacity: 0;
  transition: opacity 1.6s 0.4s;
}

.js .ridge .path {
  stroke-dasharray: var(--len, 2000);
  stroke-dashoffset: var(--len, 2000);
  transition: stroke-dashoffset 2.6s cubic-bezier(0.45, 0, 0.2, 1);
}

.js .ridge .dot,
.js .ridge .flag {
  transform-box: fill-box;
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.js .ridge .dot {
  transform-origin: center;
}

.js .ridge .flag {
  transform-origin: bottom left;
  transition-duration: 0.7s;
  transition-delay: 2.5s;
}

.js .ridge.in .fill {
  opacity: 1;
}

.js .ridge.in .path {
  stroke-dashoffset: 0;
}

.js .ridge.in .dot,
.js .ridge.in .flag {
  transform: scale(1);
}

.js .ridge.in .dot:nth-of-type(1) {
  transition-delay: 0.15s;
}

.js .ridge.in .dot:nth-of-type(2) {
  transition-delay: 0.85s;
}

.js .ridge.in .dot:nth-of-type(3) {
  transition-delay: 1.55s;
}

.js .ridge.in .dot:nth-of-type(4) {
  transition-delay: 2.3s;
}

.stops {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.js .stop {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}

.js .ridge.in + .stops .stop {
  opacity: 1;
  transform: none;
}

.js .ridge.in + .stops .stop:nth-child(1) {
  transition-delay: 0.3s;
}

.js .ridge.in + .stops .stop:nth-child(2) {
  transition-delay: 1s;
}

.js .ridge.in + .stops .stop:nth-child(3) {
  transition-delay: 1.7s;
}

.js .ridge.in + .stops .stop:nth-child(4) {
  transition-delay: 2.4s;
}

.stop .when {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  margin-bottom: 0.9rem;
}

.stop:last-child .when {
  background: var(--grad-sun);
  color: var(--ink);
}

.stop h3 {
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.stop p {
  color: var(--ink-2);
  font-size: 0.98rem;
}

/* ---------- Founder quote ---------- */

.quote {
  margin: 0 auto;
  max-width: 60rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: start;
}

.quote-mark {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(160deg, #ffe08a, #f6a23c 60%, #ea6a3a);
  box-shadow: 0 18px 40px -16px rgba(242, 128, 74, 0.7);
}

.quote-mark svg {
  width: 40px;
  height: 40px;
}

.quote-photo {
  position: relative;
  width: 112px;
}

.quote-photo .quote-mark {
  position: absolute;
  right: -8px;
  bottom: -4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 8px 18px -8px rgba(242, 128, 74, 0.8);
}

.quote-photo .quote-mark svg {
  width: 20px;
  height: 20px;
}

.founder-photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  padding: 4px;
  background: linear-gradient(160deg, #ffe08a, #f6a23c 60%, #ea6a3a);
  box-shadow: 0 18px 40px -16px rgba(242, 128, 74, 0.7);
}

.quote blockquote {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.025em;
}

.quote figcaption {
  margin-top: 1.6rem;
  color: var(--ink-2);
  font-weight: 500;
}

.quote figcaption strong {
  color: var(--ink);
}

/* ---------- Dusk CTA panel ---------- */

.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 40px;
  text-align: center;
  color: #fff;
  padding: clamp(4rem, 9vw, 7rem) 1.5rem clamp(9rem, 16vw, 12rem);
  background: linear-gradient(180deg, #2c2a6b 0%, #3d357c 45%, #8d5a8f 80%, #e08a6a 100%);
}

.cta :focus-visible {
  outline-color: var(--sun-1);
}

.cta .sunset {
  position: absolute;
  left: 50%;
  bottom: -110px;
  z-index: -1;
  width: 380px;
  aspect-ratio: 1;
  margin-left: -190px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe38a, #fbb247 45%, rgba(242, 128, 74, 0) 70%);
  animation: breathe 7s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(1.08);
  }
}

.cta .hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 100%;
  height: auto;
}

.cta h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  max-width: 16ch;
  margin-inline: auto;
}

.cta p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.12rem;
  max-width: 32rem;
  margin: 1.2rem auto 2.2rem;
}

/* ---------- About ---------- */

.story {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.founder-card {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  padding: 2.2rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.founder-card .portrait {
  width: 184px;
  height: 184px;
  margin: 0 auto 1.3rem;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(160deg, #ffe08a, #f6a23c 60%, #ea6a3a);
}

.founder-card .portrait > * {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.founder-card h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.founder-card .role {
  color: var(--ink-3);
  font-weight: 600;
  margin-top: 0.3rem;
}

.founder-card .np-word {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.95rem;
}

.founder-card .np-word .np {
  display: block;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.story-body .lead {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.6rem;
}

.story-body p:not(.lead, .kicker) {
  color: var(--ink-2);
  font-size: 1.12rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.story-body strong {
  color: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin: 0;
}

.facts > div {
  background: var(--card);
  padding: 1.5rem 1.7rem;
}

.facts dt {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.35rem;
}

.facts dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.08rem;
}

.facts dd a {
  color: var(--accent);
  text-decoration: none;
}

.facts dd a:hover {
  text-decoration: underline;
}

.path-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.path-list li {
  counter-increment: step;
  padding: 1.8rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.path-list li::before {
  content: "0" counter(step);
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.path-list h3 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.path-list p {
  color: var(--ink-2);
}

.path-list .now {
  background: var(--ink);
  color: #fff;
}

.path-list .now::before {
  color: var(--sun-1);
}

.path-list .now p {
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  align-items: start;
  margin-top: -6.5rem;
  position: relative;
  z-index: 2;
}

.contact-main {
  padding: clamp(2rem, 5vw, 3.2rem);
  border-radius: 32px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.contact-main .label {
  font-weight: 600;
  color: var(--ink-3);
}

.contact-email {
  display: inline-block;
  margin: 0.4rem 0 1.6rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-email:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun-3);
}

.contact-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin: 2rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.contact-meta dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.3rem;
}

.contact-meta dd {
  margin: 0;
  color: var(--ink-2);
}

.help-list {
  display: grid;
  gap: 1rem;
}

.help {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.5rem;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(27, 31, 74, 0.06);
  box-shadow: var(--shadow);
}

.help .orb {
  width: 48px;
  height: 48px;
  margin: 0;
}

.help .orb svg {
  width: 24px;
  height: 24px;
}

.help h2 {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  margin: 0.15rem 0 0.35rem;
}

.help p {
  color: var(--ink-2);
  font-size: 0.97rem;
}

.help a {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Documents (legal pages, future blog posts) ---------- */

.doc {
  position: relative;
  z-index: 2;
  margin-top: -6rem;
  padding: clamp(1.8rem, 5vw, 3.6rem);
  border-radius: 32px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.prose p {
  margin: 0 0 1.1em;
}

.prose h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ink);
  margin: 2.3em 0 0.7em;
}

.prose h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  margin: 1.8em 0 0.5em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose strong {
  color: var(--ink);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose a.btn {
  color: var(--ink);
  text-decoration: none;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.prose li {
  margin: 0.35em 0;
}

.prose li::marker {
  color: var(--sun-3);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 3px solid var(--sun-2);
  color: var(--ink);
  font-weight: 500;
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.4em 0;
}

.prose img {
  border-radius: 16px;
}

.prose figure {
  margin: 1.8em 0;
}

.prose figcaption {
  margin-top: 0.6em;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.65em 0.8em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prose th {
  color: var(--ink);
  font-weight: 700;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: #f4efe7;
  color: var(--ink);
}

.prose .callout {
  margin: 1.6em 0;
  padding: 1.1em 1.3em;
  border-radius: 18px;
  background: #fff3e2;
  color: var(--ink);
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.4rem 0 1.2rem;
}

.doc-foot {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.doc-foot a {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  padding: 4.5rem 0 2.2rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), #fbefe2);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem 3rem;
  flex-wrap: wrap;
}

.footer-brand p {
  max-width: 19rem;
  margin-top: 0.9rem;
  color: var(--ink-2);
}

.footer-cols {
  display: flex;
  gap: 2.5rem 3.5rem;
  flex-wrap: wrap;
}

.footer-h {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1rem;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer li {
  color: var(--ink-3);
  font-size: 0.95rem;
}

.footer a {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer .brand {
  color: var(--ink);
  font-weight: 800;
}

.footer .brand:hover {
  text-decoration: none;
}

.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--ink-3);
}

/* ---------- Guides (how to play) ----------
   Cards are drawn here, not taken from the games: the card art inside the apps is
   licensed for the games only. A card is <i class="pc h" data-r="7"></i>, where the
   class is the suit (s h c d) and data-r the rank. Add .w for a wild card, .lamphe
   for a printed joker. A row of cards that overlap is a .fan; size a group with
   --w on any parent (or .sm / .xs / .lg). */

.guide {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 52rem);
  justify-content: center;
  align-items: start;
  gap: 2rem;
  margin-top: -6rem;
}

.guide .doc {
  margin-top: 0;
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  max-height: calc(100dvh - var(--nav-h) - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.3rem 1rem 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  scrollbar-width: thin;
}

.toc-h,
.toc-part {
  margin: 0 0 0.4rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.toc-part {
  margin-top: 1rem;
  color: var(--accent);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.toc a {
  display: block;
  padding: 0.28rem 0.6rem;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}

.toc a:hover {
  background: #fff3e2;
  color: var(--ink);
}

.toc a[aria-current="true"] {
  background: #fff3e2;
  color: var(--accent);
}

.toc-get {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.2rem;
  padding: 0.9rem 0.6rem 0;
  border-top: 1px solid var(--line);
}

.toc-get img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.toc-get p {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-3);
}

.toc-get .btn {
  grid-column: 1 / -1;
  width: 100%;
}

.guide-cta {
  margin-top: 2rem;
}

/* the article */

.guide-doc {
  --w: 2.9rem;
}

.guide-doc .lead {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
}

.guide-doc .part {
  margin: 3.6rem 0 0;
  padding-top: 2.6rem;
  border-top: 1px solid var(--line);
}

.guide-doc .part:first-of-type {
  margin-top: 2.4rem;
}

.guide-doc .part > .kicker {
  margin-bottom: 0.6rem;
}

.guide-doc .part > h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 0.6rem;
}

.guide-doc .part > p {
  color: var(--ink-2);
}

.guide-doc section {
  margin-top: 2.6rem;
}

.guide-doc section > h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.5rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}

.guide-doc h4 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.guide-doc .muted {
  color: var(--ink-3);
  font-size: 0.92rem;
}

/* quick start */

.quick {
  list-style: none;
  counter-reset: q;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.6em 0 0 !important;
  padding: 0 !important;
}

.quick li {
  counter-increment: q;
  position: relative;
  margin: 0;
  padding: 1rem 1.1rem 1.05rem 3.3rem;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf3, #fff1de);
  line-height: 1.5;
}

.quick li::before {
  content: counter(q);
  position: absolute;
  left: 0.95rem;
  top: 0.95rem;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-sun);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.82rem;
}

.quick strong {
  display: block;
  margin-bottom: 0.1rem;
}

.facts-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.2em 0 !important;
  padding: 0 !important;
}

.facts-strip li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: #fff3e2;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
}

.facts-strip .suit {
  width: 1em;
  height: 1em;
  background: var(--suit) center / contain no-repeat;
}

/* the playing card */

.pc {
  position: relative;
  display: inline-block;
  flex: none;
  vertical-align: middle;
  width: var(--w, 2.9rem);
  aspect-ratio: 5 / 7;
  border-radius: calc(var(--w, 2.9rem) * 0.13);
  background-color: #fff;
  background-image: var(--wash, none), var(--suit);
  background-repeat: no-repeat;
  background-position:
    0 0,
    right 13% bottom 10%;
  background-size:
    100% 100%,
    44%;
  box-shadow:
    0 0 0 1px rgba(27, 31, 74, 0.13),
    0 6px 14px -8px rgba(27, 31, 74, 0.5);
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.pc::before {
  content: attr(data-r);
  position: absolute;
  left: 11%;
  top: 8%;
  font-size: calc(var(--w, 2.9rem) * 0.34);
  letter-spacing: -0.04em;
}

.pc[data-r="10"]::before {
  left: 6%;
  letter-spacing: -0.1em;
}

.pc::after {
  content: "";
  position: absolute;
  left: 12%;
  top: 38%;
  width: 22%;
  aspect-ratio: 1;
  background: var(--suit) center / contain no-repeat;
}

.pc.h,
.pc.d {
  color: #c9302c;
}

.pc.s,
.suit.s {
  --suit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%231B1F4A'%3E%3Cpath d='M50 4C63 24 94 38 94 61c0 13-10 22-22 22-8 0-15-4-18-10 1 10 5 17 13 22H33c8-5 12-12 13-22-3 6-10 10-18 10C16 83 6 74 6 61 6 38 37 24 50 4z'/%3E%3C/svg%3E");
}

.pc.h,
.suit.h {
  --suit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23C9302C'%3E%3Cpath d='M50 92C21 70 5 53 5 33 5 19 16 8 29 8c9 0 16 5 21 14 5-9 12-14 21-14 13 0 24 11 24 25 0 20-16 37-45 59z'/%3E%3C/svg%3E");
}

.pc.c,
.suit.c {
  --suit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%231B1F4A'%3E%3Ccircle cx='50' cy='28' r='20'/%3E%3Ccircle cx='28' cy='57' r='20'/%3E%3Ccircle cx='72' cy='57' r='20'/%3E%3Cpath d='M42 42h16v22H42zM45 58h10c1 17 5 28 15 36H30c10-8 14-19 15-36z'/%3E%3C/svg%3E");
}

.pc.d,
.suit.d {
  --suit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%23C9302C'%3E%3Cpath d='M50 3C60 20 73 36 88 50 73 64 60 80 50 97 40 80 27 64 12 50 27 36 40 20 50 3z'/%3E%3C/svg%3E");
}

/* a wild card: the pink wash on the top-left corner, as in the game */
.pc.w {
  --wash: radial-gradient(circle at 0 0, rgba(255, 94, 155, 0.55), rgba(255, 94, 155, 0.5) 36%, rgba(255, 94, 155, 0) 50%);
}

/* a printed joker (lamphe) */
.pc.lamphe {
  --suit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 0 116 100'%3E%3Cpath d='M14 72C18 50 12 36 4 24c18 4 28 14 32 30 2-18 8-32 14-44 6 12 12 26 14 44 4-16 14-26 32-30-8 12-14 26-10 48z' fill='%235F5AA2'/%3E%3Crect x='11' y='70' width='78' height='15' rx='6' fill='%23E2580C'/%3E%3Ccircle cx='4' cy='24' r='7' fill='%23FBB247'/%3E%3Ccircle cx='50' cy='10' r='7' fill='%23FBB247'/%3E%3Ccircle cx='96' cy='24' r='7' fill='%23FBB247'/%3E%3C/svg%3E");
  background-position:
    0 0,
    center 58%;
  background-size:
    100% 100%,
    70%;
}

.pc.lamphe::before {
  content: "JOKER";
  left: 0;
  right: 0;
  top: 9%;
  text-align: center;
  font-size: calc(var(--w, 2.9rem) * 0.15);
  letter-spacing: 0.08em;
  color: var(--violet);
}

.pc.lamphe::after {
  content: none;
}

.sm {
  --w: 2.25rem;
}

.xs {
  --w: 1.6rem;
}

.lg {
  --w: 4.4rem;
}

/* overlapping cards: 42% of each card shows, as in the game's fans */
.fan {
  display: inline-flex;
  flex: none;
  padding: 0.2rem 0;
}

.fan > .pc + .pc {
  margin-left: calc(var(--w, 2.9rem) * -0.58);
}

.fan.gap > .pc + .pc {
  margin-left: calc(var(--w, 2.9rem) * 0.12);
}

.fans {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin: 1.3em 0 0.6em;
}

.fans.tight {
  gap: 0.8rem 1rem;
}

/* the leftover card, leaned, as the game shows a finish */
.leftover {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.leftover .pc {
  transform: rotate(12deg);
  box-shadow:
    0 0 0 2px var(--sun-2),
    0 10px 18px -8px rgba(27, 31, 74, 0.5);
}

/* meld cards */

.melds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4em 0;
}

.meld {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fffaf4);
}

.meld .fans {
  margin: 0;
  min-height: calc(var(--w, 2.9rem) * 1.4 + 0.4rem);
}

.meld p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.55;
}

.tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: #f1eefb;
  color: var(--violet);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 0.12em;
}

/* figures */

.figure {
  margin: 1.4em 0;
  padding: 1.2rem 1.3rem;
  border-radius: 20px;
  background: linear-gradient(160deg, #eff0fa, #fdece0);
}

.figure figcaption,
.figure .cap {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}

.figure .fans {
  margin: 0;
}

.maal-hero {
  display: flex;
  align-items: center;
  gap: 1.3rem;
}

.maal-hero p {
  margin: 0;
}

.maal-hero strong {
  display: block;
  font-size: 1.15rem;
}

.legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
  gap: 1rem 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.legend small {
  display: block;
  font-weight: 600;
  color: var(--ink-3);
}

/* rule + picture */

.rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 1.2rem 1.6rem;
  margin: 1.2em 0;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid var(--line);
}

.rule.solo {
  grid-template-columns: 1fr;
}

.rule p {
  margin: 0;
}

.rule .figure {
  margin: 0;
}

/* a trick: the cards on the table, then the hand you choose from */

.felt-label {
  margin: 0 0 0.45rem !important;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.played {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.slot {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  color: var(--ink-3);
}

.slot em {
  font-style: normal;
}

.slot.win .pc {
  box-shadow:
    0 0 0 3px var(--sun-2),
    0 10px 20px -8px rgba(242, 128, 74, 0.8);
}

.slot.win em {
  color: var(--accent);
}

.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.9rem;
}

.hand .pc {
  transition: transform 0.4s var(--ease-out);
}

.hand .pc.up {
  transform: translateY(-0.8rem);
  box-shadow:
    0 0 0 2px var(--sun-2),
    0 12px 20px -10px rgba(242, 128, 74, 0.9);
}

/* round-the-table drawing */

.seats svg {
  width: 100%;
  max-width: 15rem;
  height: auto;
  margin-inline: auto;
}

/* steps (Deal → Bid → Play → Score) */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.4em 0 0 !important;
  padding: 0 !important;
  counter-reset: st;
}

.steps li {
  counter-increment: st;
  margin: 0;
  padding: 0.9rem 0.9rem 1rem;
  border-radius: 18px;
  background: #fff3e2;
  font-size: 0.9rem;
  line-height: 1.4;
}

.steps li::before {
  content: "0" counter(st);
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.steps strong {
  display: block;
  font-size: 1.05rem;
}

/* ace-high ladder */

.ladder {
  display: flex;
  align-items: flex-end;
  gap: 0.2rem;
  overflow-x: auto;
  padding: 0.3rem 0.1rem 0.4rem;
}

.ladder-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* tables in a guide */

.table-wrap {
  margin: 1.2em 0;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.table-wrap table {
  margin: 0;
  min-width: 100%;
}

.table-wrap th,
.table-wrap td {
  padding: 0.7em 0.9em;
  vertical-align: middle;
}

.table-wrap thead th {
  background: #fff7ec;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.table-wrap tbody tr:last-child > * {
  border-bottom: 0;
}

.table-wrap .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.table-wrap tr.total > * {
  background: #fffaf3;
  font-weight: 800;
  color: var(--ink);
}

.row-name {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  color: var(--ink);
}

.row-name .fan {
  --w: 1.6rem;
  min-width: 3rem;
  padding: 0;
}

.pos {
  color: #1d7f56 !important;
}

.neg {
  color: #c9302c !important;
}

.chip {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #f1eefb;
  color: var(--violet);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.chip.gold {
  background: linear-gradient(180deg, #ffe08a, #fbb247);
  color: var(--ink);
}

/* settling one hand */

.walk {
  display: grid;
  gap: 0.6rem;
  margin: 1.2em 0;
}

.walk > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  background: #fffaf3;
  border: 1px solid var(--line);
}

.walk > div.winner {
  background: linear-gradient(180deg, #fff6dc, #ffeccb);
  border-color: rgba(251, 178, 71, 0.6);
}

.walk .who {
  font-weight: 800;
  color: var(--ink);
}

.walk .sum {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.walk .verdict {
  font-weight: 800;
  white-space: nowrap;
}

.formula {
  display: grid;
  gap: 0.5rem;
  margin: 1.2em 0;
}

.formula > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: #f6f4fc;
  color: var(--ink);
  font-weight: 600;
}

.formula code {
  background: none !important;
  padding: 0 !important;
  font-weight: 700;
}

.vs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1em 0 1.2em;
}

.vs span {
  padding: 0.5rem 0.95rem;
  border-radius: 14px;
  background: #f6f4fc;
  color: var(--ink);
  font-weight: 700;
}

.vs b {
  color: var(--ink-3);
  font-weight: 800;
}

/* lists of short reminders */

.checks {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 1.2em 0 !important;
  padding: 0 !important;
}

.checks li {
  position: relative;
  margin: 0;
  padding-left: 2rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231B1F4A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / 70% no-repeat,
    var(--grad-sun);
}

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin: 1.2em 0;
}

.notes > div {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: #fffaf3;
  border: 1px solid var(--line);
}

.notes p {
  margin: 0;
  font-size: 0.97rem;
}

/* words from the table */

.glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.2em 0;
}

.glossary > div {
  padding: 0.95rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.glossary dt {
  font-weight: 800;
  color: var(--ink);
}

.glossary dt .np {
  margin-left: 0.4rem;
  font-weight: 600;
  color: var(--ink-3);
}

.glossary dd {
  margin: 0.2rem 0 0;
  font-size: 0.96rem;
  line-height: 1.55;
}

/* questions */

.faq {
  margin: 0.6rem 0;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.faq summary {
  position: relative;
  padding: 1rem 3rem 1rem 1.2rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: -0.45rem;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

.faq[open] summary::after {
  transform: rotate(225deg);
  margin-top: -0.1rem;
}

.faq > div {
  padding: 0 1.2rem 1.1rem;
}

.faq > div p:last-child {
  margin-bottom: 0;
}

/* the other game's guide */

.other-guide {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.2rem;
  margin-top: 3rem;
  padding: 1.2rem 1.4rem;
  border-radius: 22px;
  background: linear-gradient(160deg, #eff0fa, #fdece0);
  text-decoration: none !important;
  color: var(--ink) !important;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}

.other-guide:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.other-guide img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.other-guide strong {
  display: block;
  font-size: 1.15rem;
}

.other-guide span {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.other-guide svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 1080px) {
  .guide {
    grid-template-columns: minmax(0, 52rem);
  }

  .toc {
    position: static;
    max-height: none;
    columns: 2;
    column-gap: 1rem;
  }

  .toc > * {
    break-inside: avoid;
  }

  .toc-get {
    display: none;
  }
}

@media (max-width: 760px) {
  .guide {
    margin-top: -5rem;
    gap: 1rem;
  }

  .quick,
  .melds,
  .glossary {
    grid-template-columns: 1fr;
  }

  .rule {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .walk > div {
    grid-template-columns: 1fr auto;
  }

  .walk .sum {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .other-guide {
    grid-template-columns: auto 1fr;
  }

  .other-guide svg {
    display: none;
  }
}

@media (max-width: 520px) {
  .guide-doc {
    --w: 2.45rem;
  }

  .guide-doc .sm {
    --w: 2rem;
  }

  .guide-doc .lg {
    --w: 3.8rem;
  }

  .toc {
    columns: 1;
  }

  .figure {
    padding: 1rem;
  }

  .table-wrap table {
    font-size: 0.88rem;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 0.6em 0.55em;
  }

  .table-wrap thead th {
    white-space: normal;
    font-size: 0.66rem;
    letter-spacing: 0.02em;
  }

  .table-wrap.board tbody th {
    white-space: nowrap;
  }

  .row-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .ladder {
    gap: 0;
  }

  .ladder > .pc + .pc {
    margin-left: calc(var(--w, 2.9rem) * -0.42);
  }
}

/* ---------- 404 ---------- */

.lost {
  min-height: max(100svh, 640px);
  display: grid;
  align-items: center;
  padding-bottom: clamp(10rem, 18vw, 15rem);
}

.lost .code {
  font-size: clamp(5rem, 16vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin-bottom: 0.6rem;
}

.lost .cta-row {
  margin-top: 2rem;
}

/* ---------- Page transitions (supporting browsers only) ---------- */

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-out 0.22s ease-in both;
}

::view-transition-new(root) {
  animation: vt-in 0.42s var(--ease-out) both;
}

@keyframes vt-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .grid-3,
  .path-list {
    grid-template-columns: 1fr;
  }

  .games {
    grid-template-columns: 1fr;
  }

  .story,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .founder-card {
    position: static;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .next-card {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .ridge svg {
    display: none;
  }

  .stops {
    grid-template-columns: 1fr;
    border-left: 3px solid var(--sun-2);
    padding-left: 1.4rem;
  }

  .js .stop {
    opacity: 1;
    transform: none;
  }

  .quote {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 760px) {
  .js .nav-toggle {
    display: block;
  }

  html:not(.js) .brand span {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .js .nav-links {
    position: absolute;
    top: calc(var(--nav-h) - 6px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.6rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top;
    transition:
      opacity 0.25s,
      transform 0.35s var(--ease-out),
      visibility 0s 0.35s;
  }

  .js .nav.open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 0.25s,
      transform 0.35s var(--ease-out);
  }

  .js .nav-links a {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    border-radius: 16px;
  }

  .js .nav-links .menu-cta {
    display: flex;
    margin-top: 0.4rem;
    background: var(--ink);
    color: #fff;
    justify-content: center;
  }

  .layer {
    left: 0;
    right: 0;
  }

  .scene .sun-glow,
  .scene .sun-disc {
    left: 86%;
  }

  .hero .cta-row .btn,
  .lost .cta-row .btn {
    flex: 1 1 100%;
  }

  .contact-grid {
    margin-top: -5rem;
  }

  .contact-meta {
    grid-template-columns: 1fr;
  }

  .doc {
    margin-top: -5rem;
    border-radius: 26px;
  }
}

@media (max-width: 520px) {
  .wrap,
  .wrap-narrow {
    width: calc(100% - 2rem);
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .game-body {
    padding: 1.5rem 1.4rem 1.7rem;
  }

  .help {
    grid-template-columns: 1fr;
  }

  .contact-email {
    font-size: 1.25rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    transition-delay: 0s !important;
  }

  .js .reveal,
  .js .stop {
    opacity: 1;
    transform: none;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
