* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #131313;
    color: #f2f0ea;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

header {
    position: static;
    top: 0;
    z-index: 10;
    background: var(--bg, #131313);
    border-bottom: 1px solid #2c2c2c;
    padding: 22px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.wordmark {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
}

.wordmark:hover {
    color:#e07a3f
}

.wordmark-link {
    color: #f2f0ea;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 34px;
    flex-wrap: wrap;
}

nav a {
    color: #9a978f;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1.2px;
    font-weight: 600;
    text-transform: uppercase;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

nav a:hover {
    color: #f2f0ea;
}

nav a.active {
    color: #f2f0ea;
    border-color: #e07a3f;
}

.intro {
    padding: 56px 48px 8px;
    max-width: 760px;
}

.eyebrow {
    color: #e07a3f;
    font-size: 12px;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 10px;
}

h1 {
    font-size: 34px;
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.sub {
    color: #9a978f;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.grid {
    column-count: 2;
    column-gap: 20px;
    row-gap: 20px;
    width: min(90%, 1800px);
    margin: 0 auto;
    padding: 36px 0 80px;
}

.tile {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
}

.tile--hero {
    margin-top: 10px;
    column-span: all;
    max-height: none;
    width: 100%;
}

.tile--hero img {
    max-height: none;
    width: 100%;
}

.tile img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 40%;
    transition: transform 0.25s ease;
}

@media (max-width: 1300px) {
  .grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 22px;
    padding: 36px 20px 80px;
  }
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .tile--wide {
    grid-column: span 1;
  }
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-left: 18px;
    padding-right: 18px;
  }
}
.cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.tile:hover .cap {
    opacity: 1;
    transform: translateY(0);
}


.cap .title {
    font-size: 14px;
    color: #f2f0ea;
    font-weight: 600;
    margin: 0;
}

.cap .meta {
    font-size: 11px;
    color: #9a978f;
    margin: 2px 0 0;
    letter-spacing: 0.4px;
}

footer {
    padding: 28px 48px 48px;
    border-top: 1px solid #2c2c2c;
    color: #9a978f;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

footer a {
    color: #9a978f;
    text-decoration: none;
    transition: color 0.15s ease;
}

footer a:hover {
    color: #f2f0ea;
}


/* piece detail pages */

.piece {
    max-width: 80%;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.back-link {
    display: inline-block;
    color: #9a978f;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 24px;
}

.back-link:hover {
    color: #f2f0ea;
}

.piece-hero img {
    width: 100%;
    display: block;
}

.piece-info {
    padding: 28px 0;
    border-bottom: 1px solid #2c2c2c;
    margin-bottom: 28px;
}

.piece-info h1 {
    font-size: 28px;
    margin: 0 0 8px;
}

.piece-meta {
    color: #9a978f;
    font-size: 13px;
    letter-spacing: 0.4px;
    margin: 0 0 16px;
}

.piece-desc {
    font-size: 15px;
    line-height: 1.7;
    max-width: 640px;
    margin: 0;
}

.piece-related {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.piece-related img {
    width: 100%;
    display: block;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 2px;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #f2f0ea;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
}

.lightbox-close:hover {
    color: #e07a3f;
}

.lightbox-img,
.tile img,
.game-card-media img {
    cursor: zoom-in;
}

.about {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    text-align: center;
}

.about-content {
    display: flex;
    flex-direction: column;
}

.about-portrait {
    width: 30rem;
    height: auto;
    display: block;
    margin-bottom: 32px;
    align-self: center;
}

.about h1 {
    font-size: 30px;
    margin: 0 0 20px;
    text-align: left;
}

.about-text {
    font-size: 14px;
    line-height: 1.8;
    color: #f2f0ea;
    text-align: left;
    text-justify: center;
    margin: 0;
}

.contact-band {
    background: #1f1f1f;
    border-top: 1px solid #2c2c2c;
    padding: 40px 24px;
}

.contact-content {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.contact-band h2 {
    font-size: 22px;
    margin: 0 0 16px;
    text-align: center;
}

.contact-line {
    font-size: 14px;
    color: #9a978f;
    margin: 4px 0;
    text-align: left;
}

.gamedev-list {
    max-width: 820px;
    margin: 0 auto;
    padding: 36px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.game-card {
    background: #1b1b1b;
    border: 1px solid #2c2c2c;
    border-radius: 4px;
    overflow: hidden;
}

.game-card-poster {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-card-poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #f2f0ea;
    border: 1px solid #f2f0ea;
    border-radius: 24px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.play-button:hover {
    background: #e07a3f;
    border-color: #e07a3f;
}

.play-icon {
    font-size: 11px;
}

.game-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 384 / 208;
    background: #000;
    overflow: hidden;
}

.game-card-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.game-card-media img {
    display: block;
    width: 100%;
    height: auto;
}

.game-card-body {
    padding: 24px 28px 28px;
}

.game-card-body h2 {
    font-size: 20px;
    margin: 0 0 6px;
}

.game-meta {
    color: #9a978f;
    font-size: 12px;
    letter-spacing: 0.4px;
    margin: 0 0 14px;
}

.game-desc {
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 18px;
}

.game-link {
    display: inline-block;
    color: #e07a3f;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.game-link:hover {
    color: #f2f0ea;
}

.book-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 24px 80px;
}

.gallery {
    margin-bottom: 60px;
}

.gallery h3 {
    font-size: 20px;
    margin: 0 0 12px;
}

.sub-section {
    color: #9a978f;
    font-size: 11px;
    letter-spacing: 1px;
    margin: 0 0 12px;
}

.thumbnail-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.thumbnail-row img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s ease;
}

.thumbnail-row img.active {
    border-color: #e07a3f;
}

.gallery h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    color: #9a978f;
}

.gallery-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image .main-image {
    width: 100%;
    display: block;
    border-radius: 4px;
    cursor: zoom-in;
}

.gallery-arrow {
    position: absolute;
    opacity: 20%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #f2f0ea;
    border: none;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 2;
}

.gallery-arrow:hover {
    opacity: 80%;
}

.gallery-arrow.left { left: 16px; }
.gallery-arrow.right { right: 16px; }

.cb-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
}

.cb-lightbox.open {
    display: flex;
}

.cb-lightbox-image {
    max-width: 90%;
    max-height: 80%;
    cursor: grab;
    user-select: none;
}

.cb-lightbox-caption {
    color: #9a978f;
    font-size: 13px;
    margin-top: 16px;
}

.cb-lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    color: #f2f0ea;
    font-size: 36px;
    cursor: pointer;
}

.cb-lightbox-close:hover {
    color: #e07a3f;
}