/* POWDER DRIFT legal / support site. Colors follow apps/web/src/ui/ui.css; system fonts only
   (the game bundles no web font). */
:root {
  --ink: #1b2a4a;
  --ink-soft: #44557a;
  --coral: #ff5a5f;
  --sun: #ffd23f;
  --sky: #3ec6ff;
  --grape: #8a5cff;
  --paper: #ffffff;
  --snow: #eef8ff;
  --night: #0d0f14;
  --shadow-hard: 0 4px 0 rgba(27, 42, 74, 0.9);
  --font-display:
    ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', 'Hiragino Maru Gothic ProN',
    'Avenir Next', system-ui, sans-serif;
  --font-body:
    'Avenir Next', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic',
    system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sky) 0, #9fe3ff 260px, var(--snow) 520px) no-repeat,
    var(--snow);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

a {
  color: #0a6fa8;
  text-underline-offset: 2px;
}

a:focus-visible {
  outline: 3px solid var(--grape);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 18px 0 8px;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.logo {
  display: inline-block;
  filter: drop-shadow(0 3px 0 rgba(27, 42, 74, 0.35));
  transform: rotate(-3deg);
  text-decoration: none;
}

.logo-cut {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 7px 14px 8px;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.02em;
  clip-path: polygon(
    3% 9%, 18% 2%, 34% 6%, 52% 0%, 71% 5%, 88% 1%, 99% 10%, 96% 30%, 100% 52%, 97% 74%,
    100% 93%, 82% 99%, 63% 94%, 44% 100%, 25% 95%, 8% 100%, 1% 84%, 4% 62%, 0% 40%, 3% 22%
  );
}

.logo-line-2 {
  color: var(--sun);
  font-size: 1.18em;
  letter-spacing: 0.06em;
}

.logo-large .logo-cut {
  padding: 18px 30px 20px;
  font-size: clamp(38px, 11vw, 56px);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li {
  margin: 0;
}

.nav a {
  display: inline-block;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.nav a[aria-current='page'] {
  background: var(--sun);
}

.nav a.lang {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Content ---------- */

main {
  padding: 16px 0 40px;
}

.card {
  padding: 24px 20px 28px;
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-hard);
}

@media (min-width: 640px) {
  .card {
    padding: 36px 44px 40px;
  }
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.3;
}

h1 {
  margin: 0 0 4px;
  font-size: clamp(24px, 6vw, 32px);
}

h2 {
  margin: 36px 0 8px;
  padding-left: 12px;
  border-left: 6px solid var(--coral);
  font-size: 20px;
}

h3 {
  margin: 24px 0 6px;
  font-size: 17px;
}

.meta {
  margin: 0 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
}

.lead {
  font-size: 17px;
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 4px;
}

.table-scroll {
  overflow-x: auto;
  margin: 12px 0;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}

th,
td {
  padding: 8px 10px;
  border: 1.5px solid #c9d6ea;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
}

.note {
  margin: 16px 0;
  padding: 12px 16px;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  background: #fff8d6;
}

.steps {
  counter-reset: step;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  padding: 2px 0 2px 44px;
  counter-increment: step;
}

.steps li + li {
  margin-top: 10px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--sun);
  font-family: var(--font-display);
  font-weight: 900;
}

details {
  margin: 10px 0;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
}

details[open] {
  background: #f6fbff;
}

summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 800;
}

details > :last-child {
  margin-bottom: 4px;
}

.contact {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  word-break: break-all;
}

/* ---------- Landing ---------- */

.hero {
  padding: 32px 0 8px;
  text-align: center;
}

.hero .logo {
  margin-bottom: 20px;
}

.pitch {
  max-width: 34em;
  margin: 0 auto 20px;
  font-size: 18px;
  font-weight: 600;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.badges li {
  margin: 0;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  min-width: 180px;
  padding: 8px 18px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--night);
  color: var(--paper);
  box-shadow: var(--shadow-hard);
  font-family: var(--font-display);
  line-height: 1.3;
}

.badge small {
  color: var(--sun);
  font-size: 12px;
  font-weight: 800;
}

.badge strong {
  font-size: 17px;
}

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

.features li {
  margin: 0;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--snow);
}

.features strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 17px;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-list li {
  margin: 0;
}

.link-list a {
  display: block;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 8px 0 32px;
  color: var(--ink-soft);
  font-size: 13px;
}

.site-footer .nav a {
  font-size: 12px;
  box-shadow: none;
}

.site-footer p {
  margin: 12px 0 0;
}

/* ---------- Disclosure tables (shikin / tokushoho) ---------- */

table.facts {
  min-width: 0;
  font-size: 15px;
}

table.facts th[scope='row'] {
  width: 32%;
  background: var(--snow);
  font-family: var(--font-display);
  font-weight: 800;
}

table.facts td > :first-child {
  margin-top: 0;
}

table.facts td > :last-child {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  table.facts th[scope='row'],
  table.facts td {
    display: block;
    width: auto;
  }

  table.facts th[scope='row'] {
    border-bottom: 0;
  }
}

/* ---------- Invite (/r/<CODE>) ---------- */

.invite h1 {
  margin: 0 0 8px;
}

.invite-code-label {
  margin: 16px 0 0;
  font-weight: 800;
}

.invite-code {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.invite-open {
  align-items: center;
  background: var(--coral);
  font-size: 20px;
}

.invite-help {
  max-width: 30em;
  margin: 16px auto;
}
