/*
 * Terra Life -- title screen and character creation.
 *
 * These two screens use the approved full-bleed artwork rather than the
 * parchment-panel component system used everywhere else in the app
 * (see parchment.css). Real, accessible controls are layered on top of
 * the art via CSS -- nothing interactive is baked into the images.
 */

.title-screen-page .wrapper,
.character-creation-page .wrapper {
  max-width: none;
  padding: 0;
  margin: 0;
}

.title-screen-page .status-bar {
  display: none;
}

/* --- Title screen --- */

.title-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c0904;
}

.title-screen__frame {
  position: relative;
  width: min(100vw, calc(100vh * 1.5));
  aspect-ratio: 1536 / 1024;
  margin: 0 auto;
}

.title-screen__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Real, clickable controls positioned over the artwork's own button
   graphics (measured against the source image, percentages of the
   frame). Left visually "invisible" on purpose -- the artwork already
   renders the NEW LIFE / CONTINUE / OPTIONS labels -- but they're real
   focusable links/buttons with a visible hover/focus state, not dead
   pixels, and carry their own text for screen readers. */
.title-screen__btn {
  position: absolute;
  left: 38.4%;
  width: 24.4%;
  border-radius: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.title-screen__btn:hover,
.title-screen__btn:focus-visible {
  background: rgba(255, 214, 130, 0.14);
  box-shadow: inset 0 0 0 2px rgba(255, 214, 130, 0.55);
  outline: none;
}

.title-screen__btn--new-life {
  top: 64.7%;
  height: 6.1%;
}

.title-screen__btn--continue {
  top: 72.1%;
  height: 6.0%;
}

.title-screen__btn--options {
  top: 79.4%;
  height: 6.0%;
  cursor: default;
}

.title-screen__btn--options:hover {
  background: transparent;
  box-shadow: none;
}

/* --- Character creation --- */

.character-creation {
  position: relative;
  min-height: 100vh;
  padding: 24px 16px 64px;
  overflow: hidden;
}

/* The reference artwork bakes its own (non-functional) panels/fields
   into the image. Used only as a blurred, heavily darkened atmospheric
   backdrop -- enough to carry its color/mood, not enough for its fake
   UI to read as content and compete with the real panels on top. */
.character-creation::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: url("/static/img/title/character-creation-bg.png") center / cover no-repeat;
  filter: blur(6px) brightness(0.35) saturate(0.9);
  z-index: 0;
}

.character-creation__scrim {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.character-creation__logo {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 8px;
}

.character-creation__tagline {
  text-align: center;
  color: var(--parchment-bg);
  font-style: italic;
  margin: 0 0 24px;
}

.character-creation__columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 900px) {
  .character-creation__columns {
    grid-template-columns: 1fr 1.3fr 1fr;
    align-items: start;
  }
}

.character-creation__sex {
  display: flex;
  gap: 12px;
}

.character-creation__sex label {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid var(--parchment-edge);
  border-radius: 6px;
  background: #f6ecd6;
  cursor: pointer;
  font-weight: bold;
}

.character-creation__sex input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.character-creation__sex .symbol {
  font-size: 28px;
  line-height: 1;
}

.character-creation__sex label:has(input:checked) {
  background: var(--gold);
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--accent-dark);
}

.attribute-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.attribute-row__label {
  font-weight: bold;
  flex: 1 1 120px;
}

.attribute-row__pips {
  display: flex;
  gap: 4px;
}

.attribute-row__pip {
  width: 16px;
  height: 16px;
  border: 2px solid var(--parchment-edge);
  border-radius: 3px;
  background: #d9c290;
}

.attribute-row__pip.is-filled {
  background: var(--gold);
  border-color: var(--accent-dark);
}

.attribute-row__input {
  width: 3em;
  text-align: center;
  font-weight: bold;
  padding: 4px !important;
}

.attribute-row__btn {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 4px;
  border: 2px solid var(--parchment-edge);
  background: #f6ecd6;
  color: var(--ink);
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.attribute-row__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.attribute-points-remaining {
  text-align: center;
  font-weight: bold;
  margin: 12px 0;
  padding: 8px;
  border: 1px dashed var(--parchment-edge);
  border-radius: 4px;
  background: rgba(246, 236, 214, 0.5);
}

.portrait-frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 3px solid var(--parchment-edge);
  border-radius: 6px;
  background: linear-gradient(160deg, #2b2117, #191309);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--parchment-bg-dark);
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px;
}

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

.possessions-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--parchment-edge);
}

.possessions-list li:last-child {
  border-bottom: none;
}

.sheet-portrait {
  width: 140px;
  height: auto;
  border: 3px solid var(--parchment-edge);
  border-radius: 6px;
  float: right;
  margin: 0 0 12px 12px;
}
