/* DXN Studio site theme.
 *
 * Palette and proportions come from the publisher ident that plays on cold
 * launch of the studio's apps: spec/timings.json in dxn-studio-splash for the
 * field and word colours, design/DXN Studio Logo.dc.html for the lockup.
 *
 * Two colours from the brand files are deliberately never used as text here:
 * #3b3a63 is 1.80:1 on the field (it is the LIGHT-mode word colour) and the
 * #4b3fd6 violet is 2.72:1. Both fail AA. The gradient is for rules and
 * accents only.
 */

:root {
  --field:     #0f0c22;
  --ink:       #cfd0e4;   /* 12.59:1 on the field */
  --ink-soft:  #9ea1bd;   /*  7.56:1 on the field */
  --rule:      #cfd0e41f;
  --rule-firm: #cfd0e433;
  --mark-w:    min(396px, 78vw);
  --brand: linear-gradient(90deg,
            #211d83 0%, #4c36b6 19%, #6040d0 28%, #7a45e3 37%,
            #9d49ed 46%, #c94ce2 54%, #e15cc0 63%, #ec60ad 72%,
            #fb6997 81%, #ff8a6e 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--field);
  color: var(--ink);
  font-family: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

/* The ident's dark radial, anchored behind the top of the page and faded out
   rather than tiled, so a long page never shows the wash repeating. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: min(760px, 85vh);
  background: radial-gradient(120% 90% at 50% 18%,
              #221b52 0%, #12102a 55%, rgba(15, 12, 34, 0) 100%);
  pointer-events: none;
  z-index: 0;
}

main, footer, .topbar { position: relative; z-index: 1; }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 28px 48px;
  flex: 1;
  width: 100%;
}

a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
a:hover { border-bottom-color: var(--ink); }
a:focus-visible { outline: 2px solid #9d49ed; outline-offset: 3px; }

p { margin: 0 0 22px; }

/* --- home masthead ------------------------------------------------------- */

.lockup { width: var(--mark-w); margin: 0 auto 26px; font-weight: 400; }
.mark { display: block; width: 100%; height: auto; }

/* "studio" is justified across the mark's full width, which is how the logo
   file sets it: a flex row with space-between, not a letter-spacing value. */
.studio {
  display: flex;
  justify-content: space-between;
  margin-top: calc(var(--mark-w) * 0.086);
  font-size: calc(var(--mark-w) * 0.131);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
}

.brand-rule {
  width: calc(var(--mark-w) * 0.46);
  height: 2px;
  margin: 30px auto 0;
  border: 0;
  background: var(--brand);
}

.tag {
  margin: 22px 0 56px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

/* The measure limit is for running text only. Applying it to .tag as well
   shrinks its box to ~390px, and "centred" then means centred in that box,
   which reads as a tag nudged left of everything above it. */
main > p:not(.tag) { max-width: 54ch; }

/* --- app list ------------------------------------------------------------ */

.apps {
  margin-top: 60px;
  padding-top: 2px;
  background: var(--brand);
  background-size: 100% 2px;
  background-repeat: no-repeat;
}
.app {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.app-name { font-size: 23px; font-weight: 400; letter-spacing: 0.005em; }
.app-desc {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* --- inner pages --------------------------------------------------------- */

.topbar {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 28px 0;
  width: 100%;
}
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.topbar a:hover { color: var(--ink); }
.topbar img { width: 42px; height: auto; display: block; }

.doc { padding-top: 40px; }
.doc h1 {
  font-size: 34px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 10px;
}
.doc .meta {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.doc .rule { height: 2px; border: 0; background: var(--brand); margin: 26px 0 34px; }
.doc h2 {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.3;
  margin: 44px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.doc h3 {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 26px 0 8px;
}
.doc p, .doc li { max-width: 62ch; }
.doc ul { margin: 0 0 22px; padding-left: 20px; }
.doc li { margin-bottom: 9px; }
.doc li::marker { color: var(--ink-soft); }
.doc strong { font-weight: 500; color: #e6e7f2; }

/* A short summary block at the top of a policy, so the gist is readable
   without working through the whole document. */
.gist {
  border-left: 2px solid transparent;
  border-image: var(--brand) 1;
  padding: 2px 0 2px 20px;
  margin: 0 0 34px;
}
.gist p { margin-bottom: 12px; }
.gist p:last-child { margin-bottom: 0; }

/* Tables carry the third-party disclosures. They get their own scroll
   container so a narrow screen scrolls the table, never the page. */
.tablewrap { overflow-x: auto; margin: 0 0 24px; }
.doc table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 15px; }
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--rule);
}
/* Keep the service name on one line: "Google Play" breaking across two rows
   reads as two separate services. */
.doc td:first-child, .doc th:first-child { white-space: nowrap; }
.doc th {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom-color: var(--rule-firm);
  white-space: nowrap;
}

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

footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px;
  width: 100%;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
footer a { color: var(--ink-soft); }
footer a:hover { color: var(--ink); }

@media (max-width: 460px) {
  main { padding-top: 64px; }
  .doc { padding-top: 28px; }
  .doc h1 { font-size: 28px; }
  .app { flex-direction: column; gap: 2px; }
  footer { flex-direction: column; gap: 6px; }
}
