/* glyphnomad.particles.ca — one stylesheet for the landing page, the
   privacy policy and the terms. Rice paper, sumi ink and a vermilion seal,
   like the game. Headings use Caveat Brush (SIL Open Font License, served
   from this site: assets/fonts/OFL.txt), text uses the system sans. */

@font-face {
  font-family: 'Caveat Brush';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/caveat-brush-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --paper: #f2eee5;
  --paper-2: #e9e4d8;
  --card: #fbf9f4;
  --ink: #1c1b19;
  --ink-soft: #4a4740;
  --muted: #77736a;
  --line: rgba(28, 27, 25, 0.12);
  --seal: #c3372c;
  --seal-dark: #a52b22;
  --mist: #c9c8c1;
  --indigo: #2f4a7a;
  --gold: #c89a3a;

  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --brush: 'Caveat Brush', 'Bradley Hand', 'Segoe Print', 'Comic Sans MS', cursive;

  --wrap: 1180px;
  --gutter: 24px;
  --header-h: 64px;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.06), 0 18px 44px rgba(28, 27, 25, 0.12);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(28, 27, 25, 0.035) 1px, transparent 1.2px),
    radial-gradient(rgba(28, 27, 25, 0.025) 1px, transparent 1.2px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--seal-dark);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--seal);
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--brush);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.nw {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(242, 238, 229, 0.88);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 400 26px/1 var(--brush);
  text-decoration: none;
  white-space: nowrap;
}

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

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(28, 27, 25, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover,
.nav-link[aria-current='page'] {
  color: var(--ink);
  background: rgba(28, 27, 25, 0.06);
}

.nav-studio {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin-left: 6px;
  padding: 6px 12px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-studio svg {
  width: 18px;
  height: 16px;
}

.nav-studio:hover {
  color: var(--ink);
  border-color: rgba(195, 55, 44, 0.4);
  box-shadow: 0 4px 14px rgba(195, 55, 44, 0.15);
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .nav-link {
    display: none;
  }
}

@media (max-width: 400px) {
  .nav-studio {
    gap: 0;
    padding: 6px 9px;
    font-size: 0;
  }
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: 600 16px/1.2 var(--sans);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 22px rgba(28, 27, 25, 0.22);
}

.btn-ink:hover {
  color: #fff;
}

.btn-ghost {
  background: rgba(251, 249, 244, 0.7);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: rgba(28, 27, 25, 0.3);
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px dashed rgba(28, 27, 25, 0.3);
  font-weight: 600;
}

.soon i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--seal);
  color: #fff;
  font: 400 16px/1 var(--brush);
  font-style: normal;
}

/* -------------------------------------------------------------- sections */

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 48px);
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--seal-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kicker::before {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--seal);
}

.section h2 {
  font-size: clamp(40px, 5.6vw, 64px);
}

.lede {
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.6vw, 19px);
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 7vw, 88px) clamp(80px, 10vw, 140px);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.hero .seal {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero .seal b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--seal);
  color: #fff;
  font: 400 24px/1 'Hiragino Mincho ProN', 'Yu Mincho', 'Songti SC', serif;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(76px, 12vw, 148px);
  line-height: 0.86;
}

.hero .lede {
  max-width: 30em;
  margin-top: 22px;
  font-size: clamp(18px, 1.8vw, 21px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.fine {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 460px);
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: -6% -8% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(195, 55, 44, 0.35), rgba(195, 55, 44, 0.08) 70%, transparent);
  filter: blur(18px);
}

.hero-art img {
  position: relative;
  border-radius: 22%;
  box-shadow: 0 0 0 1px rgba(28, 27, 25, 0.1), 0 30px 70px rgba(28, 27, 25, 0.28);
}

/* Ink-wash mountains behind the hero */
.mountains {
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  width: 100%;
  height: 46%;
  pointer-events: none;
}

.mountains path {
  fill: #5d5b56;
}

.mountains .m1 {
  opacity: 0.1;
}

.mountains .m2 {
  opacity: 0.16;
}

.mountains .m3 {
  opacity: 0.24;
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
    width: min(64%, 300px);
  }
}

/* ------------------------------------------------- screenshots in frames */

.shot {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: clamp(16px, 2.4vw, 28px);
  background: var(--mist);
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
}

.shot.tablet {
  border-width: 4px;
}

/* ---------------------------------------------------------- glyph book */

.glyphs {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 0;
  list-style: none;
}

.glyph {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.glyph svg {
  width: 100%;
  max-width: 64px;
  aspect-ratio: 1;
  overflow: visible;
}

.glyph path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.glyph.on {
  border-color: var(--seal);
  color: var(--seal-dark);
  transform: translateY(-3px);
}

.glyph.on path {
  stroke: var(--seal);
}

@media (max-width: 860px) {
  .glyphs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .glyphs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------- feature rows */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(28px, 5vw, 60px);
}

.feature + .feature {
  margin-top: clamp(64px, 9vw, 104px);
}

.feature.flip {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
}

.feature.flip .shot {
  order: 2;
}

.feature h2 {
  font-size: clamp(38px, 4.6vw, 54px);
}

.ticks {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
  font-size: 16px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 7px;
  border-radius: 7px 2px 7px 2px;
  background: var(--seal);
  transform: rotate(-12deg);
}

.ticks b {
  color: var(--ink);
}

@media (max-width: 860px) {
  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
  }

  .feature.flip .shot {
    order: 0;
  }
}

/* ------------------------------------------------------------- the lands */

.band {
  border-block: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(233, 228, 216, 0.75), rgba(233, 228, 216, 0.3));
}

.lands {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.land {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--a), var(--b));
  color: #fff;
}

.land::after {
  content: '';
  position: absolute;
  inset: auto -10% -2px;
  height: 55%;
  background: rgba(20, 20, 20, 0.22);
  clip-path: polygon(0 100%, 0 55%, 18% 30%, 34% 52%, 52% 12%, 70% 46%, 86% 26%, 100% 50%, 100% 100%);
}

.land b {
  position: relative;
  z-index: 1;
  display: block;
  font: 400 26px/1 var(--brush);
}

.land span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
}

@media (max-width: 960px) {
  .lands {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .lands {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ----------------------------------------------------------------- facts */

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: clamp(40px, 6vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.fact {
  padding: 22px;
  background: var(--card);
}

.fact b {
  display: block;
  font: 400 48px/1 var(--brush);
  color: var(--seal-dark);
}

.fact span {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
}

@media (max-width: 760px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------------------------------------------ platforms */

.platforms {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 60px);
}

@media (max-width: 860px) {
  .platforms {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------- coming-soon card */

.get {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: clamp(26px, 4vw, 44px);
  border-radius: 26px;
  background:
    radial-gradient(40% 120% at 100% 50%, rgba(195, 55, 44, 0.3), transparent 70%),
    var(--ink);
  color: var(--paper);
}

.get img {
  width: 104px;
  height: 104px;
  border-radius: 24px;
}

.get h2 {
  font-size: clamp(36px, 4.4vw, 52px);
}

.get p {
  margin-top: 8px;
  color: rgba(242, 238, 229, 0.78);
}

.get .btn {
  background: var(--paper);
  color: var(--ink);
}

@media (max-width: 760px) {
  .get {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

/* ------------------------------------------------------------------ help */

.help {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}

.contact-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.contact-card h2 {
  font-size: 40px;
}

.contact-card p {
  margin-top: 10px;
  color: var(--ink-soft);
}

.contact-card .btn {
  margin-top: 20px;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: '+';
  flex: none;
  color: var(--seal);
  font: 400 26px/1 var(--brush);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 18px;
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .help {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding-block: 40px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding-block: 10px;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current='page'] {
  color: var(--seal-dark);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.made-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 10px;
  color: var(--ink-soft);
  text-decoration: none;
}

.made-by svg {
  width: 20px;
  height: 18px;
}

/* ----------------------------------------------------------- legal pages */

.legal-hero {
  padding-block: clamp(44px, 7vw, 76px) clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}

.legal-hero h1 {
  font-size: clamp(54px, 7vw, 80px);
}

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

.legal {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 60px) clamp(64px, 9vw, 96px);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  font-size: 14px;
}

.toc b {
  display: block;
  margin-bottom: 10px;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--seal-dark);
}

.legal-body {
  max-width: 720px;
}

.legal-body section + section,
.summary-card + section {
  margin-top: 36px;
}

.legal-body h2 {
  font-size: 34px;
}

.legal-body p,
.legal-body li {
  color: var(--ink-soft);
}

.legal-body p {
  margin-top: 10px;
}

.legal-body ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.legal-body li + li {
  margin-top: 6px;
}

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

.summary-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--seal);
  border-radius: 16px;
  background: var(--card);
}

.summary-card h2 {
  font-size: 30px;
}

@media (max-width: 860px) {
  .legal {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
  }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .hero .seal,
  .hero h1,
  .hero .lede,
  .hero .cta-row,
  .hero .fine {
    animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .hero h1 {
    animation-delay: 0.08s;
  }

  .hero .lede {
    animation-delay: 0.16s;
  }

  .hero .cta-row {
    animation-delay: 0.24s;
  }

  .hero .fine {
    animation-delay: 0.3s;
  }

  .hero-art {
    animation: ink-in 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
  }

  .hero-art img {
    animation: drift 7s ease-in-out 1.4s infinite;
  }

  .mountains .m1 {
    animation: mist 22s ease-in-out infinite alternate;
  }

  .mountains .m2 {
    animation: mist 16s ease-in-out -6s infinite alternate-reverse;
  }

  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity 0.7s ease,
      transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

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

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

  .js .reveal.stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity 0.6s ease,
      transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 70ms);
  }

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

  .shot {
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease;
  }

  .feature:hover .shot {
    transform: translateY(-4px) rotate(-0.4deg);
    box-shadow: 0 2px 4px rgba(28, 27, 25, 0.08), 0 28px 60px rgba(28, 27, 25, 0.18);
  }

  .land {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .land:hover {
    transform: translateY(-4px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

@keyframes ink-in {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: scale(0.94);
  }
}

@keyframes drift {
  50% {
    transform: translateY(-10px) rotate(-1deg);
  }
}

@keyframes mist {
  to {
    transform: translateX(-3%);
  }
}
