/* Treasure: colours and shapes from the game (Theme.swift, Brand.swift). */

@font-face {
  font-family: "Titan One";
  src: url("/fonts/TitanOne-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --black: #0b0b0c;
  --ink: #121214;
  --card: #ffffff;
  --edge: #6b6b6b;
  --ruby: #e8197d;
  --emerald: #2db563;
  --topaz: #f7a43a;
  --citrine: #ffd23f;
  --sapphire: #2e8bea;
  --amethyst: #8e5be8;
  --red: #f04e37;
  --muted: #a7a7ad;
  --display: "Titan One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 22px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--black) url("/img/hex.svg") repeat;
  background-size: 105px auto;
  color: #fff;
  font: 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.display { font-family: var(--display); font-weight: 400; letter-spacing: 0.01em; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 22px;
}

.brand img { width: 36px; height: 36px; border-radius: 9px; }

.nav { display: flex; gap: 22px; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }

/* Buttons and pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--edge);
}

.pill.ruby { background: var(--ruby); color: #fff; box-shadow: 0 5px 0 #fff; }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px 12px 18px;
  border-radius: 18px;
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  text-align: left;
}

.soon svg { width: 30px; height: 30px; flex: none; }
.soon small { display: block; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.soon span { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; }

/* Hero */

.hero { padding: 72px 0 56px; text-align: center; }

.wordmark {
  display: grid;
  justify-content: center;
  margin: 0 auto;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 15vw, 132px);
  line-height: 1.15;
  padding: 0.14em;
}

.wm-layer { grid-area: 1 / 1; display: flex; letter-spacing: 0; }
.wm-layer span { display: inline-block; margin-right: -0.09em; transform: translateY(var(--y)) rotate(var(--r)); }
.wm-layer.ring { color: #fff; -webkit-text-stroke: 0.26em #fff; }
.wm-layer.outline { color: var(--ink); -webkit-text-stroke: 0.15em var(--ink); }
.wm-layer.fill { color: #fff; }

.tagline {
  display: inline-block;
  margin-top: -6px;
  padding: 6px 18px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(12px, 2.6vw, 18px);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero p.lede {
  max-width: 600px;
  margin: 28px auto 32px;
  font-size: clamp(19px, 2.4vw, 23px);
  color: #e6e6ea;
}

.hero .meta { margin-top: 18px; color: var(--muted); font-size: 15px; }

/* Phones */

.phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  margin-top: 56px;
}

.phone {
  width: 250px;
  flex: none;
  border-radius: 40px;
  border: 8px solid #1d1d20;
  outline: 3px solid rgba(255, 255, 255, 0.85);
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.phone:nth-child(1) { transform: rotate(-4deg) translateY(30px); }
.phone:nth-child(3) { transform: rotate(4deg) translateY(30px); }

/* Sections */

section { padding: 64px 0; }

.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 44px); margin: 0 0 8px; line-height: 1.1; }
.section-title p { color: var(--muted); margin: 0 auto; max-width: 560px; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 2.5px solid #fff;
  background: #000;
  font-family: var(--display);
  font-size: 16px;
}

/* Sticker cards */

.grid { display: grid; gap: 24px; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }

.sticker {
  --tint: var(--edge);
  position: relative;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--tint);
  overflow: hidden;
}

.sticker .band {
  background: var(--tint);
  color: #fff;
  padding: 12px 18px;
  font-family: var(--display);
  font-size: 20px;
  border-bottom: 3px solid var(--ink);
}

.sticker .body { padding: 16px 18px 20px; font-size: 16px; }
.sticker .body p { margin: 0 0 8px; }
.sticker .body p:last-child { margin-bottom: 0; }

.ruby { --tint: var(--ruby); }
.topaz { --tint: var(--topaz); }
.emerald { --tint: var(--emerald); }
.citrine { --tint: #b07d00; }
.sapphire { --tint: var(--sapphire); }
.amethyst { --tint: var(--amethyst); }

/* Levels */

.levels { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.levels .pill { box-shadow: 0 5px 0 var(--tint, var(--edge)); }
.levels .arrow { color: var(--muted); font-size: 22px; }

.unlocks { margin-top: 28px; text-align: center; color: #e6e6ea; }
.unlocks strong { font-family: var(--display); font-weight: 400; }

/* Compass */

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; margin: 0 auto; }

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  box-shadow: 0 4px 0 var(--tint, var(--edge));
  font-weight: 600;
  font-size: 15px;
}

/* Private */

.private { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.private .sticker .body { text-align: center; padding: 22px 16px; }
.private .icon { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.private h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 19px; }
.private p { margin: 0; font-size: 15px; color: #4a4a50; }

/* CTA */

.cta { text-align: center; padding: 72px 0 88px; }
.cta img { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 22px; box-shadow: 0 0 0 3px #fff; }
.cta h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 44px); margin: 0 0 10px; }
.cta p { color: var(--muted); margin: 0 0 26px; }

/* Document pages (privacy, support) */

.doc { padding: 56px 0 80px; }

.doc .paper {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--edge);
  padding: clamp(24px, 5vw, 52px);
}

.doc h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 6vw, 48px); line-height: 1.1; margin: 0 0 6px; }
.doc .updated { color: #6b6b72; margin: 0 0 28px; font-size: 15px; }
.doc h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 36px 0 10px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: #2b2b30; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: #b3105f; font-weight: 600; }

.summary {
  background: #fff4f9;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 8px;
}

.summary p { margin: 0; }

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--ruby);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 20px 24px;
  margin: 8px 0 12px;
}

.contact-card h2 { color: #fff; margin: 0; font-size: 22px; }
.contact-card p { color: #ffe3f0; margin: 2px 0 0; }
.contact-card a.pill { color: var(--ink); box-shadow: 0 4px 0 var(--ink); }

details {
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  padding: 0 18px;
  margin-bottom: 12px;
  background: #fafafa;
}

details[open] { background: #fff; }

summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 28px 14px 0;
  font-weight: 700;
  position: relative;
}

summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-family: var(--display); font-size: 22px; }
details[open] summary::after { content: "–"; }
details > *:not(summary) { margin-top: 0; }
details > p:last-child, details > ul:last-child { padding-bottom: 6px; }

/* Footer */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 11, 12, 0.9);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* Responsive */

@media (max-width: 900px) {
  .grid.four, .private { grid-template-columns: repeat(2, 1fr); }
  .phone { width: 210px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 44px; }
  .nav { gap: 16px; }
  .nav .hide-sm { display: none; }
  .grid.four, .private { grid-template-columns: 1fr; }
  .phones { gap: 0; margin-top: 44px; }
  .phone { width: 46%; border-width: 5px; border-radius: 26px; }
  .phone:nth-child(1) { transform: rotate(-4deg) translate(10px, 20px); }
  .phone:nth-child(2) { position: relative; z-index: 1; }
  .phone:nth-child(3) { display: none; }
  section { padding: 48px 0; }
}

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