/* ============================================================
   Hearth game picker (draft)
   Restyle this file. The homepage uses only gp- classes.
   It does not share rules with the app or with welcome.html.
   Change the tokens first; the layout reads them.
   Breakpoints: cover (default, Galaxy Fold cover),
   40rem (inner screen), 65rem (desktop).
   ============================================================ */

:root {
  --gp-page: #0b0b0d;
  --gp-leather: #18181c;
  --gp-leather-deep: #101013;
  --gp-ink: #f5e6c8;
  --gp-ink-soft: #e4d3ae;
  --gp-ink-faded: #cbb892;
  --gp-gold: #d4a04b;
  --gp-gold-bright: #e8b965;
  --gp-gold-deep: #b8893a;
  --gp-moss: #9dba78;
  --gp-rule: #3e3e45;
  --gp-rule-soft: rgba(203, 160, 96, 0.28);
  --gp-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --gp-display: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;
  --gp-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gp-radius: 12px;
  --gp-max: 1120px;
  --gp-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 36px rgba(0, 0, 0, 0.38);
  --gp-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
  color-scheme: dark;
}

html, body { background: var(--gp-page); color: var(--gp-ink); }

body {
  font-family: var(--gp-serif);
  font-size: 1.125rem;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  background:
    radial-gradient(58rem 36rem at 12% -10%, rgba(255, 190, 110, 0.11), transparent 58%),
    radial-gradient(36rem 24rem at 100% 8%, rgba(194, 90, 74, 0.07), transparent 62%),
    var(--gp-page);
  scrollbar-color: #3e3e45 var(--gp-page);
}

::selection { background: var(--gp-gold); color: #1a120c; }
img, svg { display: block; max-width: 100%; }
a { color: var(--gp-gold-bright); text-underline-offset: 3px; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gp-gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.gp-skip {
  position: absolute;
  left: 12px;
  top: -4rem;
  z-index: 20;
  background: var(--gp-gold);
  color: #1a120c;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 8px;
  font-family: var(--gp-sans);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.gp-skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.gp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gp-wrap {
  width: 100%;
  max-width: var(--gp-max);
  margin: 0 auto;
  padding-left: calc(16px + env(safe-area-inset-left, 0px));
  padding-right: calc(16px + env(safe-area-inset-right, 0px));
}

/* ------------------------------------------------------------ Bar */
.gp-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11,11,13, 0.96);
  border-bottom: 1px solid var(--gp-rule-soft);
  padding-top: env(safe-area-inset-top, 0px);
}
.gp-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 0;
  min-height: 56px;
  padding-top: 6px;
  padding-bottom: 8px;
}
.gp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  order: 1;
  min-height: 44px;
  color: var(--gp-ink);
  text-decoration: none;
}
.gp-tag {
  order: 4;
  flex: 1 0 100%;
  margin: 0;
  padding: 0 0 2px 40px;
  color: var(--gp-gold-bright);
  font-family: var(--gp-display);
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
}
.gp-brand:hover { color: var(--gp-ink); }
.gp-flame { width: 32px; height: 32px; flex: none; }
.gp-word {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}
.gp-version {
  order: 2;
  font-family: var(--gp-sans);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--gp-ink-faded);
}
.gp-bar .gp-version { display: none; }
.gp-install {
  order: 3;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #f0c77a;
  background: linear-gradient(180deg, var(--gp-gold-bright), var(--gp-gold) 55%, var(--gp-gold-deep));
  color: #1a120c;
  font-family: var(--gp-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.55), 0 2px 0 rgba(0, 0, 0, 0.28), 0 8px 18px rgba(0, 0, 0, 0.28);
}
.gp-install:hover { color: #1a120c; }
.gp-install:active { transform: translateY(1px); }

/* ------------------------------------------------------------ Intro */
.gp-main { padding: 28px 0 12px; }
.gp-title {
  font-weight: 500;
  font-size: 1.85rem;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.gp-line { display: block; }
.gp-line-em { font-style: italic; color: var(--gp-gold-bright); }
.gp-lead {
  margin-top: 14px;
  max-width: 36rem;
  color: var(--gp-ink-soft);
  font-size: 1.125rem;
  text-wrap: pretty;
}
.gp-aside { display: none; }
.gp-facts { list-style: none; }
.gp-facts li {
  position: relative;
  padding-left: 22px;
  color: var(--gp-ink-soft);
  font-size: 1.15rem;
  line-height: 1.35;
}
.gp-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gp-gold);
}

/* ------------------------------------------------------------ Choices */
.gp-choices { margin-top: 22px; }

.gp-door {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  min-height: 44px;
  border: 1px solid var(--gp-gold-deep);
  border-radius: var(--gp-radius);
  background: linear-gradient(180deg, var(--gp-leather), var(--gp-leather-deep));
  color: var(--gp-ink);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, 0.14), var(--gp-shadow);
  overflow: hidden;
}
.gp-door:hover { color: var(--gp-ink); border-color: var(--gp-gold-bright); }
.gp-door:active { transform: translateY(1px); }
.gp-door:focus-visible { outline-offset: 4px; }

.gp-hinge {
  position: relative;
  background: linear-gradient(180deg, #f3d7a0, #d4a04b 42%, #4c4c54);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.35);
}
.gp-hinge::before,
.gp-hinge::after {
  content: "";
  position: absolute;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff1c9, #8a6230 70%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}
.gp-hinge::before { top: 10px; }
.gp-hinge::after { bottom: 10px; }
.gp-ember {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 22px;
  height: 42%;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 244, 214, 0.95), rgba(194, 90, 74, 0.15));
  transform-origin: center bottom;
  animation: gp-wick 1.05s var(--gp-ease) both;
}
@keyframes gp-wick {
  from { transform: scaleY(0.2); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}

.gp-door-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 14px 16px 16px;
}
.gp-door-copy { flex: 1 1 16rem; min-width: 0; }
.gp-door-name {
  display: block;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.gp-door-meta {
  display: block;
  margin-top: 4px;
  color: var(--gp-ink-soft);
  font-size: 1rem;
}
.gp-live {
  color: var(--gp-moss);
  font-family: var(--gp-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gp-live::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--gp-moss);
  box-shadow: 0 0 0 3px rgba(157, 186, 120, 0.18);
  vertical-align: 0.05em;
}
.gp-door-desc {
  display: block;
  margin-top: 8px;
  color: var(--gp-ink-soft);
  font-size: 1.05rem;
  line-height: 1.35;
  max-width: 42rem;
}
.gp-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #f0c77a;
  background: linear-gradient(180deg, var(--gp-gold-bright), var(--gp-gold) 55%, var(--gp-gold-deep));
  color: #1a120c;
  font-family: var(--gp-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.5), 0 2px 0 rgba(0, 0, 0, 0.28);
}
.gp-enter svg { width: 18px; height: 18px; }

.gp-apk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--gp-gold-bright);
  background: rgba(212, 160, 75, 0.16);
  color: var(--gp-gold-bright);
  font-family: var(--gp-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, 0.16), 0 2px 4px rgba(0, 0, 0, 0.35);
}
.gp-apk[hidden] { display: none; }
.gp-apk::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M11 3h2v9.2l3.3-3.3 1.4 1.4L12 16l-5.7-5.7 1.4-1.4 3.3 3.3zM5 18h14v2H5z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M11 3h2v9.2l3.3-3.3 1.4 1.4L12 16l-5.7-5.7 1.4-1.4 3.3 3.3zM5 18h14v2H5z'/></svg>") center / contain no-repeat;
}
.gp-apk:hover { color: var(--gp-ink); border-color: var(--gp-ink); }
.gp-apk:active { transform: translateY(1px); }

.gp-shelf-title {
  margin: 26px 0 10px;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}
.gp-shelf {
  list-style: none;
  border: 1px solid var(--gp-rule-soft);
  border-radius: var(--gp-radius);
  background: rgba(39,39,45, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 226, 170, 0.06), 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px rgba(0, 0, 0, 0.22);
}
.gp-shelf li + li { border-top: 1px solid var(--gp-rule-soft); }

.gp-latched {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gp-latched:hover { background: rgba(212, 160, 75, 0.07); }
.gp-latched:active { background: rgba(212, 160, 75, 0.14); }
.gp-latched:focus-visible { outline-offset: -3px; border-radius: 8px; }
.gp-latched.is-noted { background: rgba(212, 160, 75, 0.12); }

.gp-mark {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--gp-gold);
}
.gp-latched-text { flex: 1 1 9rem; min-width: 0; }
.gp-latched-name {
  display: block;
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.15;
}
.gp-latched-desc {
  display: block;
  margin-top: 2px;
  color: var(--gp-ink-soft);
  font-size: 1rem;
  line-height: 1.3;
}
.gp-soon {
  margin-left: auto;
  font-family: var(--gp-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gp-gold-bright);
  white-space: nowrap;
}

.gp-soon-note {
  min-height: 0;
  margin-top: 12px;
  color: var(--gp-gold-bright);
  font-size: 1.05rem;
  font-style: italic;
  text-wrap: pretty;
}
.gp-soon-note:empty { margin-top: 0; }

/* ------------------------------------------------------------ Footer */
.gp-foot {
  margin-top: 36px;
  border-top: 1px solid var(--gp-rule);
  padding: 22px 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
.gp-signoff {
  font-family: var(--gp-display);
  font-size: clamp(1.15rem, 3.4vw, 1.55rem);
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-wrap: balance;
}
.gp-foot-meta {
  margin-top: 8px;
  color: var(--gp-ink-faded);
  font-family: var(--gp-sans);
  font-size: 0.8rem;
  font-weight: 650;
}
.gp-foot-links {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin-top: 8px;
}
.gp-foot-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--gp-ink-soft);
  font-family: var(--gp-sans);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}
.gp-foot-links a:hover { color: var(--gp-ink); text-decoration: underline; }
.gp-legal {
  margin-top: 8px;
  color: var(--gp-ink-faded);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 46rem;
}

/* ------------------------------------------------------------ Wider */
@media (min-width: 22rem) {
  .gp-title { font-size: 2.15rem; }
  .gp-bar .gp-version { display: inline; }
}

@media (min-width: 40rem) {
  .gp-wrap {
    padding-left: calc(28px + env(safe-area-inset-left, 0px));
    padding-right: calc(28px + env(safe-area-inset-right, 0px));
  }
  .gp-main { padding-top: 36px; }
  .gp-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    column-gap: 2rem;
    align-items: start;
  }
  .gp-choices { margin-top: 0; }
  .gp-title { font-size: clamp(2.35rem, 4.2vw, 4.4rem); }
  .gp-bar-inner { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
  .gp-tag {
    order: 2;
    flex: 0 1 auto;
    padding: 0;
    font-size: 1.2rem;
    white-space: nowrap;
  }
  .gp-version { order: 3; }
  .gp-install { order: 4; }
  .gp-foot-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 22px;
  }
}

@media (min-width: 65rem) {
  .gp-main { padding-top: 56px; }
  .gp-layout {
    column-gap: 4rem;
    align-items: start;
  }
  .gp-intro { padding-top: 8px; }
  .gp-door-name { font-size: 2.35rem; }
  .gp-door-body { padding: 20px 22px 20px 20px; }
  .gp-shelf {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .gp-shelf li + li { border-top: 0; }
  .gp-shelf li:nth-child(odd) { border-right: 1px solid var(--gp-rule-soft); }
  .gp-shelf li:nth-child(n + 3) { border-top: 1px solid var(--gp-rule-soft); }
  .gp-shelf li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: 0;
  }
  .gp-shelf-title { margin-top: 22px; }
  .gp-aside { display: block; margin-top: 28px; max-width: 26rem; }
  .gp-sketch { width: min(100%, 280px); height: auto; }
  .gp-facts { display: grid; gap: 10px; margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .gp-door:active,
  .gp-install:active,
  .gp-apk:active { transform: none; }
}

@media (forced-colors: active) {
  .gp-door,
  .gp-shelf,
  .gp-install,
  .gp-enter,
  .gp-apk {
    border: 1px solid ButtonText;
  }
  .gp-enter,
  .gp-install {
    background: ButtonFace;
    color: ButtonText;
  }
  .gp-live::before,
  .gp-ember { forced-color-adjust: none; }
}

@media (prefers-contrast: more) {
  .gp-door,
  .gp-shelf,
  .gp-latched:focus-visible { border-color: var(--gp-ink); }
}

/* One type style with the app (2 Nov, whole-app check): sentence case, no letter-spacing, no italics; the small-caps
   display face becomes the app's serif for titles and its sans for buttons and labels. */
:root { --gp-display: var(--gp-serif); }
body *, body *::before, body *::after { text-transform: none !important; letter-spacing: normal !important; font-style: normal !important; }
.gp-install, .gp-enter, .gp-soon, .gp-live, .gp-door-meta { font-family: var(--gp-sans) !important; }
