:root {
  --bg: #f3f6f2;
  --ink: #1a1a1a;
  --muted: #5e656d;
  --line: #e4e7e4;
  --accent: #e10600;
  --card: #ffffff;
  --chip: #eef0f2;
  --shadow: 0 10px 28px rgba(26, 26, 26, 0.06);
  --shadow-hover: 0 18px 40px rgba(26, 26, 26, 0.12);
  --font: "Outfit", system-ui, sans-serif;
  --my: "Noto Sans Myanmar", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #e4ebf6;
  color: var(--ink);
  font-family: var(--font);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.mesh {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(ellipse 72% 58% at -8% 8%, rgba(225, 6, 0, 0.42), transparent 58%),
    radial-gradient(ellipse 68% 52% at 108% 0%, rgba(37, 99, 235, 0.48), transparent 56%),
    radial-gradient(ellipse 46% 36% at 72% 42%, rgba(255, 186, 48, 0.28), transparent 62%),
    radial-gradient(ellipse 58% 46% at 8% 78%, rgba(124, 58, 237, 0.34), transparent 58%),
    radial-gradient(ellipse 42% 32% at 48% 28%, rgba(255, 255, 255, 0.5), transparent 72%),
    linear-gradient(160deg, #f8e4df 0%, #e3ebfb 42%, #efe4fb 100%);
  animation: mesh 26s ease-in-out infinite alternate;
}

.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(22, 28, 42, 0.14) 1.1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 18%, transparent 0%, #000 72%);
}

.floaters span {
  position: absolute;
  width: 148px;
  height: 148px;
  border-radius: 36px;
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  box-shadow: 0 18px 40px rgba(20, 24, 40, 0.12);
  animation: floaty 9s ease-in-out infinite;
}

.floaters span:nth-child(1) { left: -78px; top: 46%; transform: rotate(-14deg); }
.floaters span:nth-child(2) { right: -86px; top: 38%; animation-delay: -3s; transform: rotate(12deg); }
.floaters span:nth-child(3) { left: -54px; bottom: 6%; width: 120px; height: 120px; animation-delay: -5s; transform: rotate(8deg); }
.floaters span:nth-child(4) { right: -48px; bottom: 10%; width: 132px; height: 132px; animation-delay: -1.5s; transform: rotate(-8deg); }
.floaters span:nth-child(5) { right: 12%; top: -48px; width: 92px; height: 92px; opacity: 0.12; animation-delay: -6s; }

.playfield {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 34vh;
  background:
    linear-gradient(transparent, rgba(228, 235, 246, 0.2) 30%, rgba(228, 235, 246, 0.85)),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.14) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(225, 6, 0, 0.1) 0 1px, transparent 1px 36px);
  transform: perspective(520px) rotateX(62deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(transparent, #000 28%, #000 70%, transparent);
}

@keyframes mesh {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

button, input { font: inherit; color: inherit; }

.wrap {
  width: min(1160px, calc(100% - 64px));
  margin: 0 auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.nav-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 180px 1fr 320px;
  align-items: center;
}

.logo {
  color: var(--accent);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.links {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.links button {
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 15px;
  color: #3f454c;
  cursor: pointer;
}

.links button:hover { color: var(--ink); }

.nav-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.lang {
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--chip);
}

.lang button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #8b9198;
  cursor: pointer;
}

.lang button.is-on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.08);
}

.search {
  position: relative;
  width: 210px;
}

.search input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: #f1f3f4;
  padding: 10px 36px 10px 14px;
  font-size: 13px;
  outline: none;
}

.search input:focus { box-shadow: 0 0 0 2px rgba(225, 6, 0, 0.18); }

.search svg {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #6b727a;
  pointer-events: none;
}

.hero {
  padding: 8px 0 4px;
  scroll-margin-top: 84px;
}

.ribbon {
  height: 96px;
  margin-top: 18px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ribbon-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: ribbon 72s linear infinite;
}

.ribbon-track span {
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 20px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 22px rgba(20, 24, 40, 0.16);
}

.hero-copy {
  padding-top: 22px;
  text-align: center;
}

@keyframes ribbon {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero h1 {
  margin: 0;
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.lede {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0 8px;
}

.chips button {
  border: 0;
  background: #fff;
  color: #3f454c;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
}

.chips button.is-on {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 20px 0 8px;
}

.card {
  position: relative;
  min-height: 286px;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: card-in 320ms ease both;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

@keyframes card-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  z-index: 2;
}

.face {
  min-height: 286px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.icon-well {
  width: 100%;
  height: 176px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0%, #f3f4f6 68%);
}

.icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 22px rgba(20, 22, 24, 0.14);
}

.face h3 {
  margin: 14px 16px 8px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.tag {
  margin: 0 16px 16px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f2f4;
  color: #5c636b;
  font-size: 12px;
}

.detail {
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(26, 26, 26, 0.04);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.card:hover .detail,
.card:focus-within .detail {
  opacity: 1;
  transform: translateY(0);
}

.detail-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail h3 {
  margin: 2px 0 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.detail p {
  margin: 12px 0 0;
  color: #3f454c;
  font-size: 13.5px;
  line-height: 1.55;
}

.pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 0 4px;
}

.pager[hidden] { display: none; }

.pager-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.pager button {
  min-width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  color: #3f454c;
}

.pager button:hover:not(:disabled):not(.is-on) {
  background: #f3f4f6;
}

.pager button.is-on {
  background: var(--ink);
  color: #fff;
}

.pager button:disabled {
  opacity: 0.32;
  cursor: default;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 0 8px;
}

.about {
  padding: 72px 0 28px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.about h2 {
  margin: 12px auto 0;
  max-width: 760px;
  font-size: 36px;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.about-body {
  max-width: 720px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.rivals {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.rivals li {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

footer {
  padding: 8px 0 36px;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.foot .logo { font-size: 14px; }

body.lang-my,
body.lang-my .lede,
body.lang-my .about-body,
body.lang-my .detail p,
body.lang-my .chips button,
body.lang-my .links button,
body.lang-my .tag,
body.lang-my .kicker {
  font-family: var(--my);
}

body.lang-my .kicker { letter-spacing: 0; text-transform: none; font-size: 12px; }

body.lang-my .hero h1 { font-size: 36px; }
body.lang-my .about h2 { font-size: 32px; }

@media (max-width: 980px) {
  .nav-row { grid-template-columns: 1fr auto; }
  .links { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floaters { display: none; }
}

@media (max-width: 640px) {
  .wrap { width: min(1160px, calc(100% - 32px)); }
  .nav-tools .search { display: none; }
  .grid { grid-template-columns: 1fr; }
  .hero h1, body.lang-my .hero h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .mesh, .ribbon-track, .floaters span { animation: none !important; }
}
