/* Deckhand's web identity: every page under /deckhand/ links this file and wears the app's
   Harbor Night theme. The studio site's Archivo/cyan system stays at the root. */

/* Self-hosted, latin subset - the app's two faces, per brand/README.md */
@font-face {
  font-family: "Young Serif";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/young-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Work Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/work-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  /* Harbor Night - packages/app/src/theme/generated/palettes.ts. Role names are the
     app's, so a token here means what it means in the app. */
  --shell: #101E2B;
  --shell-relief: #192835;
  --shell-ink: #7D8F9F;
  --shell-ink-strong: #AEC1D2;
  --shell-ink-muted: #607281;
  --shell-edge: #607281;

  --surface: #182C3D;
  --surface-relief: #223648;
  --surface-ink: #869FB3;
  --surface-ink-strong: #B8D2E7;
  --surface-edge: #688093;

  --felt: #1A3A31;
  --felt-relief: #0F3027;
  --felt-ink: #F3EEE3;
  --felt-ink-muted: #628479;

  --paper: #FAF6EC;
  --paper-relief: #EDE9DF;
  --paper-ink: #23201B;
  --paper-ink-muted: #89867D;
  --paper-accent: #A48200;
  --card-red: #B3372F;

  --brass-hi: #FED665;
  --brass: #C9A227;
  --brass-lo: #927200;
  --brass-on: #000000;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans Variable", "Work Sans", system-ui, -apple-system, sans-serif;

  /* buildTheme's dark-ground shadow ladder, verbatim */
  --shadow-lift: 0 1px 1px rgba(0, 0, 0, 0.35), 0 3px 8px rgba(0, 0, 0, 0.35);
  --shadow-float: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.35);
  --shadow-well: inset 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 0 48px rgba(0, 0, 0, 0.3);

  --measure: 60rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--shell);
  color: var(--shell-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(201, 162, 39, 0.3);
  color: #fff;
}

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

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

p { margin: 0; }

[hidden] { display: none !important; }

.shell-width {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1.5rem;
  top: 1.5rem;
  z-index: 50;
  background: var(--brass);
  color: var(--brass-on);
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

/* ---------------------------------------------------------------
   Masthead - the app's Rail: a shell band closed by a brass hairline.
   --------------------------------------------------------------- */

.rail {
  background: var(--shell);
  border-bottom: 1px solid var(--brass-lo);
}

.rail-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.875rem;
}

.rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.rail-brand img {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.rail-by {
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--shell-ink-muted);
  text-decoration: none;
}

.rail-by:hover { color: var(--shell-ink-strong); }

/* Brass wordmark (Wordmark.tsx): the display face over a vertical sheen, lit from
   above because the ground is dark. */
.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--brass);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .wordmark {
    background-image: linear-gradient(to bottom, var(--brass-hi), var(--brass) 50%, var(--brass-lo));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* ---------------------------------------------------------------
   Store badges - vendored unmodified; both owners forbid recreating them.
   Google's PNG bakes its own quarter-height clear space into the file, so it
   renders 60px tall to show a 40px badge; Apple's SVG is the bare 40px badge
   and takes that clear space as margin. Both then read at the same size,
   which satisfies Play's same-size-or-larger rule.
   --------------------------------------------------------------- */

/* gap 0: each item already carries its own quarter-height clear space, so any gap
   here would stack on top of the spacing the guidelines specify. */
.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 1.75rem;
}

/* No hover treatment: both owners forbid altering the badge, and a tint or a
   lift is an alteration. The pointer and the focus ring carry the affordance. */
.stores a { display: block; }

.badge-play {
  display: block;
  height: 60px;
  width: auto;
}

/* 40px is Apple's minimum badge height; the 10px margin is the clear space its
   guidelines require, which is why .stores sets gap: 0. */
.badge-appstore {
  display: block;
  height: 40px;
  width: auto;
  margin: 10px;
}

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

body > footer {
  background: var(--shell);
  border-top: 1px solid var(--shell-relief);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--shell-ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

body > footer a {
  color: var(--shell-ink);
  text-decoration-color: rgba(125, 143, 159, 0.45);
  text-underline-offset: 0.2em;
}

body > footer a:hover {
  color: var(--brass-hi);
  text-decoration-color: var(--brass-hi);
}

/* ---------------------------------------------------------------
   Doc pages - how-to-play, house rules, privacy, join: one reading
   column on the shell ground.
   --------------------------------------------------------------- */

.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

.doc a {
  color: var(--brass-hi);
  text-decoration-color: rgba(254, 214, 101, 0.4);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.18s ease;
}

.doc a:hover { text-decoration-color: var(--brass-hi); }

.doc h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: var(--shell-ink-strong);
  text-wrap: balance;
}

.doc h2 {
  margin: 3rem 0 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--shell-relief);
  font-size: 1.625rem;
  color: var(--shell-ink-strong);
}

.doc h3 {
  margin: 2rem 0 0.625rem;
  font-size: 1.25rem;
  color: var(--shell-ink-strong);
}

.doc p { margin: 0 0 1rem; }

.doc strong {
  color: var(--shell-ink-strong);
  font-weight: 600;
}

.doc ul,
.doc ol { padding-left: 1.5rem; }

.doc li { margin-bottom: 0.5rem; }

/* The eyebrow voice: small caps-tracked labels in brass or quiet ink. */
.doc .meta,
.doc .crumbs,
.doc .label,
.doc .facts dt,
.doc th,
.doc .games .count {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc .meta {
  margin-bottom: 2.5rem;
  color: var(--brass);
}

.doc .crumbs {
  margin-bottom: 2rem;
  color: var(--shell-ink);
}

.doc .crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc .crumbs li { margin: 0; }

.doc .crumbs li + li::before {
  content: "\203A";
  margin-right: 0.5rem;
}

.doc .lede {
  font-size: 1.1875rem;
  color: var(--shell-ink-strong);
}

.doc .facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.25rem;
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--surface-relief);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
}

.doc .facts dt {
  padding-top: 0.2rem;
  color: var(--brass);
}

.doc .facts dd {
  margin: 0;
  color: var(--surface-ink-strong);
}

.doc .table-wrap { overflow-x: auto; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.doc th,
.doc td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--shell-relief);
  text-align: left;
  vertical-align: top;
}

.doc th { color: var(--brass); }

.doc td:first-child {
  color: var(--shell-ink-strong);
  font-weight: 600;
  white-space: nowrap;
}

.doc .faq h3 { margin-top: 1.75rem; }

.doc .games {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc .games li {
  margin: 0;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--shell-relief);
}

.doc .games li:first-child { border-top: 1px solid var(--shell-relief); }

.doc .games + h2 {
  border-top: 0;
  padding-top: 0;
}

.doc .games a {
  font-family: var(--font-display);
  font-size: 1.375rem;
}

.doc .games p { margin: 0.25rem 0 0; }

.doc .games .count { color: var(--brass); }

.doc .more {
  columns: 2;
  padding-left: 1.25rem;
}

/* Join: the table code is the page's one job, so it gets the display face at size. */
.doc .label {
  margin: 2.5rem 0 0.5rem;
  color: var(--brass);
}

.doc .code {
  margin: 0;
  font-family: var(--font-display);
  font-size: 3.5rem;
  letter-spacing: 0.18em;
  line-height: 1.1;
  color: var(--shell-ink-strong);
}

/* The app's primary button: brass sheen, ink from brand.sheen.on. */
.doc .open {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(to bottom, var(--brass-hi), var(--brass) 55%, var(--brass-lo));
  box-shadow: var(--shadow-lift);
  font-weight: 600;
  text-decoration: none;
  color: var(--brass-on);
}

@media (max-width: 30rem) {
  .doc .facts {
    grid-template-columns: 1fr;
    gap: 0.125rem;
  }

  .doc .facts dd { margin-bottom: 0.625rem; }

  .doc td:first-child { white-space: normal; }
}
