/* Unit type panels, built by assets/js/unit-types.js. Like the brochure's
   type spreads: image and intro on one side, specs on the other, with the
   type letter set huge and white behind the specs. */

@layer components {
  .unit-type {
    display: grid;
    background: var(--theme-color-background);
  }

  .unit-type__media img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .unit-type__body {
    position: relative;
    isolation: isolate;
    overflow: clip;
    display: grid;
    align-content: start;
    gap: var(--theme-space-xs);
    padding: var(--theme-space-md) var(--theme-space-sm);
  }

  .unit-type__letter {
    position: absolute;
    right: -0.04em;
    bottom: -0.2em;
    z-index: -1;
    font-size: var(--theme-text-giant);
    font-weight: var(--theme-weight-bold);
    line-height: 1;
    letter-spacing: -0.06em;
    color: var(--theme-color-surface);
    pointer-events: none;
  }

  .unit-type[data-type='F'] .unit-type__letter {
    color: color-mix(in oklab, var(--theme-color-accent) 70%, var(--theme-color-background));
  }

  .unit-type__title {
    font-size: var(--theme-text-xl);
  }

  .unit-type__title span {
    font-weight: var(--theme-weight-bold);
  }

  .unit-type__price {
    font-weight: var(--theme-weight-bold);
  }

  .unit-type__price span {
    text-decoration: underline 3px var(--theme-color-accent);
    text-underline-offset: 0.3em;
  }

  .unit-type__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--theme-space-2xs);
  }

  .unit-type__tags:empty {
    display: none;
  }

  .unit-type__text {
    max-width: var(--theme-width-text);
    font-size: var(--theme-text-sm);
  }

  .unit-type__specs {
    margin-top: var(--theme-space-2xs);
    font-size: var(--theme-text-sm);
  }

  .unit-type__specs > div {
    border-bottom-color: var(--theme-color-border-strong);
  }

  .unit-type__specs dd {
    max-width: 60%;
  }

  @media (width >= 64rem) {
    .unit-type {
      grid-template-columns: 1fr 1fr;
    }

    .unit-type__body {
      padding: var(--theme-space-md);
    }
  }
}
