/* Punk//Body Studio website. The colours and fonts are the app's
   (crates/cps-app/src/theme.rs and the user guide's). Dark only.

   Sections: fonts and tokens, base, header, language switcher, buttons,
   hero, safe strip, sections, features, steps, requirements and FAQ,
   documentation links, final call, changelog, footer, 404. The guides
   (/docs/) have their own stylesheet inside them; what the site adds to it
   is guide.css. */

/* Fonts and tokens */
@font-face { font-family: "Rajdhani"; font-weight: 500; font-display: swap; src: url("/assets/fonts/Rajdhani-Medium.12ff7dcfe4.ttf") format("truetype"); }
@font-face { font-family: "Rajdhani"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Rajdhani-SemiBold.94bbd25a18.ttf") format("truetype"); }
@font-face { font-family: "Rajdhani"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Rajdhani-Bold.691470dd32.ttf") format("truetype"); }
@font-face { font-family: "Share Tech Mono"; font-display: swap; src: url("/assets/fonts/ShareTechMono-Regular.9ceab1f874.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  /* The app's palette. */
  --bg: #08090e; --panel: #0e1018; --surface: #171b26; --line: #2a3142;
  --text: #dde8ee; --dim: #8fa0b0; --yellow: #fcee0a; --cyan: #2df4ff; --red: #ff455a;
  /* The UI face and the mono face, with their fallbacks. */
  --sans: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --mono: "Share Tech Mono", Consolas, monospace;
  /* The content width, the buttons' cut corner, the list markers' arrow. */
  --wrap: 1160px;
  --cut: 14px;
  --triangle: polygon(0 0, 100% 50%, 0 100%);
}
/* Korean, Chinese and Japanese: the system's own fonts behind the Latin
   ones (the app embeds Noto Sans KR, SC and JP; the site leaves them to
   Windows and macOS, which have these). Each language names its own, so a
   Han character takes that language's shape. */
:root:lang(ko) {
  --sans: "Rajdhani", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --mono: "Share Tech Mono", Consolas, "Malgun Gothic", "Apple SD Gothic Neo", monospace;
}
:root:lang(zh-Hans) {
  --sans: "Rajdhani", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Share Tech Mono", Consolas, "Microsoft YaHei", "PingFang SC", monospace;
}
:root:lang(ja) {
  --sans: "Rajdhani", "Yu Gothic", "Meiryo", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --mono: "Share Tech Mono", Consolas, "Yu Gothic", "Meiryo", "Hiragino Sans", monospace;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 500 18px/1.55 var(--sans);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
code, kbd { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--surface); padding: 1px 5px; border-radius: 2px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; padding: 0 5px; border-radius: 3px; background: var(--panel); }
.ui { color: var(--yellow); font-weight: 700; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); letter-spacing: 1px; }
.eyebrow { font-family: var(--mono); font-size: 14px; letter-spacing: 2px; color: var(--cyan); text-transform: uppercase; margin: 0 0 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--yellow); color: var(--bg); padding: 8px 14px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--panel); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--yellow); text-decoration: none; font-weight: 700; font-size: 22px; letter-spacing: 1px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.top nav { margin-left: auto; }
.top nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--text); text-decoration: none; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 16px; }
.top nav a:hover { color: var(--yellow); }
.top nav a.btn, .top nav a.btn:hover { color: var(--bg); }
.top nav .btn { font-size: 15px; padding: 6px 16px; }
@media (max-width: 720px) {
  .top .wrap { gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
  .top nav { margin-left: 0; width: 100%; }
  .top nav ul { gap: 8px 18px; }
  .top nav .opt { display: none; }
}

/* Language switcher: a <details> menu in the header (no JavaScript) and
   plain links in the footer. The build writes both (LANG_MENU and
   LANG_LINKS in build/locales.mjs). */
.top nav .lang details { position: relative; }
.top nav .lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 15px; letter-spacing: 1px; color: var(--text);
}
.top nav .lang summary::-webkit-details-marker { display: none; }
.top nav .lang summary::after { content: "\25BE"; font-size: 13px; }
.top nav .lang summary:hover { color: var(--yellow); }
.top nav .lang summary svg { width: 18px; height: 18px; }
.top nav .lang ul {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 5; display: block; min-width: 230px;
  margin: 0; padding: 6px 0; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.top nav .lang ul a { display: block; padding: 8px 16px; font-family: var(--sans); text-transform: none; letter-spacing: 0; font-weight: 600; }
.top nav .lang ul a:hover { background: var(--surface); }
.top nav .lang ul a[aria-current] { color: var(--yellow); }
@media (max-width: 720px) {
  /* On a phone the menu spans the nav row, wherever the item sits. */
  .top nav { position: relative; }
  .top nav .lang details { position: static; }
  .top nav .lang ul { left: 0; right: 0; min-width: 0; }
}
footer .langs { margin: 18px 0 0; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; }
footer .langs a { text-decoration: none; }
footer .langs a:hover, footer .langs a[aria-current] { color: var(--yellow); }

/* Buttons, with a cut corner. The yellow is on ::before so the focus
   outline, which clip-path would cut off, stays whole. */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--bg); background: none; text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 10px 26px; border: 0; font-family: inherit; font-size: 18px; line-height: 1.2;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--yellow);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.btn:hover { color: var(--bg); }
.btn:hover::before { background: #fff35a; }
.btn:active::before { background: var(--cyan); }
.btn-big { font-size: 28px; padding: 16px 44px; --cut: 20px; }
.btn-big svg { width: 28px; height: 28px; }

/* Hero */
.hero { padding: 56px 0 40px; background:
  radial-gradient(ellipse 70% 60% at 75% 40%, rgba(45, 244, 255, 0.07), transparent 70%),
  linear-gradient(180deg, var(--panel), var(--bg) 70%); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero h1 { margin: 0 0 14px; font-size: clamp(44px, 6.4vw, 76px); line-height: 0.95; color: var(--yellow); letter-spacing: 1px; font-weight: 700; }
.hero h1 span { display: block; }
.pitch { font-size: 22px; line-height: 1.45; margin: 0 0 28px; max-width: 34ch; }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cta-meta { font-family: var(--mono); font-size: 14px; color: var(--dim); letter-spacing: 1px; margin: 0; }
.cta-meta strong { color: var(--text); font-weight: 400; }
.cta-verify { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--dim); letter-spacing: 0.5px; max-width: 100%; }
.cta-copy { padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; color: var(--cyan); text-decoration: underline; cursor: pointer; }
.cta-copy:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cta-copy.shown { color: var(--text); text-decoration: none; overflow-wrap: anywhere; text-align: left; user-select: all; }
.preview-note { margin: 26px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--cyan); background: var(--surface); font-size: 17px; max-width: 46ch; }
.badge { display: inline-block; font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: var(--bg); background: var(--cyan); padding: 2px 8px; margin-right: 8px; vertical-align: 2px; }
.guide-link { margin: 18px 0 0; font-weight: 600; }
.guide-link + .guide-link { margin-top: 8px; }
.shot { position: relative; margin: 0; border: 1px solid var(--line); background: var(--panel); }
.shot::after { /* HUD corner brackets */
  content: ""; position: absolute; inset: -6px; pointer-events: none;
  background:
    linear-gradient(var(--yellow), var(--yellow)) left top / 22px 2px,
    linear-gradient(var(--yellow), var(--yellow)) left top / 2px 22px,
    linear-gradient(var(--yellow), var(--yellow)) right bottom / 22px 2px,
    linear-gradient(var(--yellow), var(--yellow)) right bottom / 2px 22px;
  background-repeat: no-repeat;
}
.shot figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--dim); padding: 6px 10px; border-top: 1px solid var(--line); }
@media (max-width: 960px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

/* Safe strip */
.safe { background: var(--surface); border-bottom: 1px solid var(--line); }
.safe .wrap { display: flex; gap: 16px; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.safe svg { flex: none; width: 34px; height: 34px; color: var(--cyan); }
.safe p { margin: 0; }
.safe strong { color: var(--cyan); }

/* Sections */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
/* A page's title (privacy, changelog) looks like a section heading. */
h2, h1.title {
  font-size: clamp(30px, 4vw, 40px); font-weight: 700; color: var(--yellow); text-transform: uppercase; letter-spacing: 1px;
  margin: 0 0 8px; line-height: 1.1;
}
.lede { color: var(--dim); font-size: 20px; margin: 0 0 40px; max-width: 60ch; }
/* A privacy subsection (an h2 under the page's h1) looks like an h3. */
h3, h2.sub { font-size: 24px; font-weight: 700; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 10px; line-height: 1.15; }
p { margin: 0 0 14px; }

/* Features: a screenshot beside its text, sides alternating */
.feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 44px; align-items: center; margin: 0 0 64px; }
.feature:last-of-type { margin-bottom: 0; }
.feature:nth-of-type(even) .shot { order: 2; }
.feature .num { font-family: var(--mono); color: var(--dim); font-size: 14px; letter-spacing: 2px; margin: 0 0 6px; }
.feature ul { margin: 0; padding-left: 20px; }
.feature li { margin: 4px 0; }
.feature .note { color: var(--dim); font-size: 16px; }
.feature-narrow { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.feature-narrow:nth-of-type(even) { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.feature-narrow .shot { justify-self: center; max-width: 300px; width: 100%; }
@media (max-width: 860px) {
  .feature, .feature-narrow, .feature-narrow:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .feature:nth-of-type(even) .shot { order: 0; }
}

.callout {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start;
  margin: 64px 0 0; padding: 24px 28px; background: var(--surface); border-left: 3px solid var(--cyan);
}
.callout svg { width: 44px; height: 44px; color: var(--cyan); }
.callout p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .callout { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; } .callout svg { width: 36px; height: 36px; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--line); padding: 24px 22px; position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 34px; color: var(--yellow); line-height: 1; margin-bottom: 14px;
}
.steps li::after { content: ""; position: absolute; left: -1px; top: -1px; width: 40px; height: 3px; background: var(--yellow); }
.steps p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Requirements and FAQ */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
.req { list-style: none; margin: 0; padding: 0; }
.req li { padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line); position: relative; }
.req li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 10px; height: 10px; background: var(--cyan); clip-path: var(--triangle); }
.req strong { color: var(--text); font-weight: 700; }

details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 700; font-size: 20px; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 10px; font-family: var(--mono); font-size: 24px; color: var(--yellow); }
details[open] summary::after { content: "\2212"; }
summary:hover { color: var(--yellow); }
details > div { padding: 0 0 16px; }

/* Documentation links */
.links { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.links a { display: block; height: 100%; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.links a:hover { border-color: var(--yellow); }
.links a strong { display: block; color: var(--yellow); text-transform: uppercase; letter-spacing: 1px; font-size: 19px; }
.links a span { color: var(--dim); font-size: 16px; }

/* Final call */
.final { text-align: center; }
.final .cta { align-items: center; }

/* Changelog: one article per release, written by the build from the git
   tags (changelog.mjs). */
.releases { max-width: 80ch; }
.release { position: relative; padding: 26px 0 24px 22px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.release::before { content: ""; position: absolute; left: 0; top: 34px; width: 10px; height: 10px; background: var(--line); clip-path: var(--triangle); }
.release:first-child::before { background: var(--yellow); }
.release:target { background: linear-gradient(90deg, var(--surface), transparent 70%); }
.release-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 10px; }
.release h3 { margin: 0; font-family: var(--mono); font-weight: 400; font-size: 26px; letter-spacing: 1px; text-transform: none; }
.release h3 a { color: var(--yellow); text-decoration: none; }
.release h3 a:hover { color: var(--cyan); }
.release .badge { margin: 0; vertical-align: 0; }
.release time { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; color: var(--dim); }
.release p { margin: 0 0 8px; }
.notes { margin: 0; padding-left: 20px; }
.notes li { margin: 5px 0; }
.notes li::marker { color: var(--cyan); }
.releases-none { margin: 0; padding: 12px 16px; border: 1px solid var(--line); border-left: 3px solid var(--cyan); background: var(--surface); max-width: 60ch; }
@media (max-width: 600px) { .release { padding-left: 18px; } .release h3 { font-size: 22px; } }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--panel); padding: 36px 0 44px; color: var(--dim); font-size: 16px; }
footer p { margin: 0 0 8px; max-width: 90ch; }
footer a { color: var(--text); }

/* 404 */
.lost { min-height: 70vh; display: flex; align-items: center; }
.lost h1 { font-size: clamp(44px, 8vw, 88px); color: var(--yellow); margin: 0 0 8px; line-height: 1; overflow-wrap: anywhere; }
.lost .actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; margin-top: 28px; }
