:root {
    --cb-ink: #1c1b16;
    --cb-paper: #f7f2e9;
    --cb-sun: #f2c94c;
    --cb-sky: #395067;
    --cb-card: #f3f3f3;
 }

 body {
    background-color: var(--cb-paper);
    color: var(--cb-ink);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 16px;
 }

 h1, h2, h3, h4, h5 {
    font-family: "Spectral", "Georgia", serif;
 }

 a {
    color: var(--cb-sky);
 }

  a:hover {
    color: #27394b;
  }

  a:focus-visible {
    outline: 2px solid var(--cb-sun);
    outline-offset: 3px;
  }

  .skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    background: var(--cb-sun);
    color: var(--cb-ink);
    padding: 10px 14px;
    border-radius: 8px;
    z-index: 9999;
  }

  .skip-link:focus {
    left: 12px;
  }

 .btn-dark {
    background-color: var(--cb-ink);
    border-color: var(--cb-ink);
 }

 .btn-outline-dark {
    color: var(--cb-ink);
    border-color: var(--cb-ink);
 }

.nav-cta {
    color: var(--cb-sun);
    font-weight: 600;
}

.nav-cta:hover,
.nav-cta:focus-visible {
    color: #f8e08b;
}

.btn:focus-visible {
    outline: 2px solid var(--cb-sun);
    outline-offset: 3px;
}

/* welcome */
.hero-image {
    /* Set a specific height */
    height: 330px;

    /* Position and center the image to scale nicely on all screens */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    margin-bottom:20px;
}

.hero-image--overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 18, 15, 0.65), rgba(20, 18, 15, 0.3));
}

.hero-text {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow:1px 1px 3px rgba(0,0,0,0.6);
    z-index: 1;
}

/*
 * Below the `md` breakpoint the hero's fixed height is smaller than its own
 * content: the heading rides up under the navbar and the CTAs spill out the
 * bottom. Let the box grow on narrow screens and centre the text with flex
 * instead of a transform, so the composition is unchanged on wider ones.
 */
@media (max-width: 767.98px) {
    .hero-image {
        height: auto;
        min-height: 330px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px 16px;
    }

    .hero-text {
        position: static;
        transform: none;
    }
}

.cb-cta-strip {
    background: var(--cb-card);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 992px) {
    .cb-cta-strip {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.project {
    background-color: var(--cb-card);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    text-align: left;
    height: 100%;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  }

  .project:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  }

  .project a.stretched-link {
    color: var(--cb-ink);
  }

  .project a.stretched-link:focus {
    outline: 2px solid var(--cb-sun);
    outline-offset: 4px;
  }

  .project .stretched-link::after {
    border-radius: 16px;
  }

  .project-grid {
    display: grid;
    /*
     * auto-fill, not auto-fit: splitting the home page into two filtered
     * groups means a filter often leaves one or two cards in a group, and
     * auto-fit would stretch a lone card across the whole row. With a full
     * grid the two behave identically.
     */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    align-items: stretch;
  }
  
  .project img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.2s ease;
  }

  .project:hover img {
    transform: scale(1.02);
  }

  .project h3 a {
    text-decoration: none;
  }

.project .tags {
    align-self: flex-start;
    margin-top: auto;
    border-radius: 999px;
    padding: 6px 10px;
}

.project .tag-stack {
    align-self: flex-start;
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Badge palette shared across pages */
.badge-ai { background: #ff6fae; color: #fdfdfd; }
.badge-game { background: #f39c12; color: #fdfdfd; }
.badge-ttrpg { background: #f1c40f; color: #fdfdfd; }
.badge-tools { background: #27ae60; color: #fdfdfd; }
.badge-writing { background: #2980b9; color: #fdfdfd; }
.badge-illustration { background: #d35400; color: #fdfdfd; }
.badge-creatures { background: #c3d17a; color: #fdfdfd; }
.badge-supplements { background: #5bc0ff; color: #fdfdfd; }
.badge-nft { background: #8e44ad; color: #fdfdfd; }
.badge-xr { background: #7f5af0; color: #fdfdfd; }
.badge-mobile { background: #d81b60; color: #fdfdfd; }
.badge-music { background: #00bcd4; color: #fdfdfd; }
.badge-video { background: #e8604c; color: #fdfdfd; }
.badge-labs { background: #7dd3fc; color: #fdfdfd; }
.badge-ops { background: #9ef0c0; color: #fdfdfd; }
.badge-beta { background: #a0b8ff; color: #fdfdfd; }
.badge-story { background: #d7bdf7; color: #fdfdfd; }

  .project-count {
    display: inline-block;
    min-width: 1.9rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--cb-ink);
    color: var(--cb-paper);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    vertical-align: 0.28em;
    text-align: center;
  }

  .project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
  }

  .project-filters .btn.active {
    background-color: var(--cb-ink);
    border-color: var(--cb-ink);
    color: #ffffff;
  }

  .project.is-hidden,
  .project-section.is-hidden {
    display: none;
  }

  .badge.bg-success,
  .badge.bg-danger {
    color: #ffffff;
  }

  .badge.bg-warning {
    color: #1c1b16;
  }

  .cb-details summary {
    cursor: pointer;
  }

  small,
  .small,
  .form-text,
  .figure-caption,
  .badge {
    font-size: 1rem;
  }

  /* fantasy */
  .img-thumbnail {
    height: 256px;
    width: 256px;
  }
  
  /* tutorials */
  time {color:grey;}
  .avatar img {float:left; height:32px; border-radius: 50%;}
  .avatar .info {padding-left:40px;}

  /* welcome and cryptocards (hidden features) */
  .tint {
    content: "";
    background: rgba(255,0,0, 0.5) !important;
  }

/* ----------------------------------------------------------- signup form --
 * The mailing list is the business, so the form appears on more than one
 * page and has to work on paper and on the ship page's black.
 */
.cb-signup__form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0;
}

.cb-signup__input {
    flex: 1 1 15rem;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(28, 27, 22, 0.35);
    border-radius: 10px;
    background: #fff;
    color: var(--cb-ink);
    font-size: 1rem;
}

.cb-signup__input:focus-visible {
    outline: 2px solid var(--cb-sun);
    outline-offset: 2px;
}

.cb-signup__button {
    padding: 12px 22px;
    border: 1px solid var(--cb-ink);
    border-radius: 10px;
    background: var(--cb-ink);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.cb-signup__button:hover,
.cb-signup__button:focus-visible {
    background: #000;
}

.cb-signup__note {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: #5c564c;
}

.cb-signup__error {
    flex: 1 0 100%;
    margin: 0;
    font-size: 0.9rem;
    color: #a8321a;
}

.cb-signup__done {
    margin: 0;
    font-weight: 600;
}

/* On the hero and on the ship page, where the background is dark. */
.cb-signup--hero .cb-signup__input {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.95);
}

.cb-signup--hero .cb-signup__button {
    background: var(--cb-sun);
    border-color: var(--cb-sun);
    color: var(--cb-ink);
}

.cb-signup--hero .cb-signup__button:hover,
.cb-signup--hero .cb-signup__button:focus-visible {
    background: #f8e08b;
}

.cb-signup--hero .cb-signup__note,
.cb-signup--hero .cb-signup__done {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.cb-signup--hero .cb-signup__error {
    color: #ffc9bd;
}

/* ------------------------------------------------------------- the hero --
 * One picture, one headline, one thing to do. The old hero carried eight
 * calls to action between it and the strip below, two of them the same
 * button, over a photograph of woodland that had nothing to do with any of
 * this.
 */
.cb-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 32rem;
    padding: 5rem 0 3rem;
    margin-bottom: 2rem;
    overflow: hidden;
    background: #0b0b0e;
}

.cb-hero__media { position: absolute; inset: 0; z-index: -2; }

.cb-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 45%;
}

.cb-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(8, 8, 11, 0.9) 0%, rgba(8, 8, 11, 0.64) 48%, rgba(8, 8, 11, 0.22) 100%),
        linear-gradient(180deg, rgba(8, 8, 11, 0.7) 0%, rgba(8, 8, 11, 0.1) 36%, rgba(8, 8, 11, 0.82) 100%);
}

.cb-hero__inner { color: #fff; max-width: 46rem; }

.cb-hero__kicker {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cb-sun);
    margin: 0 0 0.6rem;
}

.cb-hero__title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.75rem, 9vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 0.95;
    margin: 0;
    text-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

.cb-hero__deck {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.6;
    margin: 1rem 0 1.75rem;
    max-width: 34rem;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.cb-hero__action { max-width: 32rem; }

.cb-hero__second {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.cb-hero__second a { color: var(--cb-sun); }
.cb-hero__second a:hover { color: #f8e08b; }

@media (max-width: 575.98px) {
    .cb-hero { min-height: 26rem; padding: 3.5rem 0 2rem; }
}
