/* Shortsy — page-specific styles; the shared subpage kit is at the end of assets/css/styles.css. */

/* ---------- Page head ---------- */
.shorts-head .page-head__lead { max-width: 64ch; }

/* ---------- Seven category banners ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "index arrow"
    "body body";
  align-content: space-between;
  row-gap: 26px;
  min-height: 184px;
  padding: 26px 30px 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(21, 26, 33, 0.08);
}
.category-card:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 3px;
}
.category-card::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--brand-strong);
  border-bottom: 2px solid var(--brand-strong);
  border-bottom-right-radius: 6px;
  opacity: 0.45;
}

.category-card__index {
  grid-area: index;
  color: var(--brand-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.category-card__arrow {
  grid-area: arrow;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.category-card:hover .category-card__arrow {
  border-color: var(--brand);
  background: var(--brand);
}

.category-card__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 42px;
}
.category-card__name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}
.category-card__sub {
  max-width: 42ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.category-card--wide {
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "index body arrow";
  align-items: center;
  align-content: center;
  gap: 0 26px;
  min-height: 168px;
  padding: 28px 34px;
  background: var(--tint);
}
.category-card--wide .category-card__index {
  font-size: 0.875rem;
}
.category-card--wide .category-card__body {
  padding-right: 0;
}
.category-card--wide .category-card__name {
  font-size: 1.75rem;
}
.category-card--wide::after { display: none; }

/* ---------- Category view ---------- */
.shorts-films { background: var(--tint); }

/* Stacked head (different rhythm from the category section head). */
.shorts-films__head {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.shorts-films__head h2 {
  max-width: 26ch;
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.1;
}
.shorts-films__head p {
  max-width: 60ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.shorts-panel {
  display: none;
  scroll-margin-top: 100px;
}
.shorts-panel:target { display: block; }

.shorts-panel__head {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 430px;
  margin: 0 auto 28px;
}
.shorts-panel__index {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 12px;
  background: var(--brand);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.shorts-panel__head h3 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.15;
}
.shorts-panel__back {
  margin-left: auto;
  color: var(--brand-strong);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.shorts-panel__back:hover { color: var(--ink); }

.shorts-feed {
  display: grid;
  justify-items: center;
  gap: 34px;
}

/* One 9:16 card per row; the column stays phone-wide on desktop, like a feed. */
.short-card {
  width: min(100%, 430px);
}

.short-card__details {
  border-radius: var(--radius);
}

.short-card__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 9 / 16;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.short-card__frame::-webkit-details-marker { display: none; }
.short-card__frame:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 3px;
}
/* The logo's focus frame, enlarged behind the play button. */
.short-card__frame::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 168px;
  height: 168px;
  border: 2px solid currentColor;
  border-radius: 20px;
  opacity: 0.16;
  transform: translate(-50%, -50%);
}

.short-card__frame--mint { background: var(--brand); }
.short-card__frame--coral { background: var(--coral); }
.short-card__frame--deep { background: var(--deep); color: #fff; }
.short-card__frame--light {
  background: var(--paper);
  border: 1px solid var(--line);
}

.short-card__slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0.78;
}
.short-card__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
}

.short-card__number {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.45;
  font-variant-numeric: tabular-nums;
}

.short-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(21, 26, 33, 0.18);
  transform: translate(-50%, -50%);
}
.short-card__play svg { margin-left: 3px; }
.short-card__frame--light .short-card__play {
  background: var(--ink);
  color: #fff;
}

.short-card__meta {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 38px;
}
.short-card__title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
}
.short-card__byline {
  font-size: 0.875rem;
  line-height: 1.3;
  opacity: 0.75;
}

.short-card__notice {
  margin-top: 12px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.short-card__notice-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}
.short-card__notice p + p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Shown until a category is opened; hidden by any targeted panel. */
.shorts-prompt {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 46px 30px;
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
}
.shorts-panel:target ~ .shorts-prompt { display: none; }
.shorts-prompt__icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--ink);
}
.shorts-prompt__icon svg { margin-left: 3px; }
.shorts-prompt__title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}
.shorts-prompt p + p {
  max-width: 38ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 156px; padding: 24px 26px; }
  .category-card--wide {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "index arrow"
      "body body";
    align-content: space-between;
    gap: 0;
    row-gap: 24px;
    min-height: 156px;
    padding: 24px 26px;
  }
  .category-card--wide .category-card__index { font-size: 0.75rem; }
  .category-card--wide .category-card__body { padding-right: 42px; }
  .category-card--wide .category-card__name { font-size: 1.5rem; }
}

@media (max-width: 600px) {
  .shorts-panel__head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px 16px;
    max-width: none;
  }
  .shorts-panel__index { grid-column: 1; grid-row: 1; }
  .shorts-panel__head h3 { grid-column: 2; grid-row: 1; }
  .shorts-panel__back {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    width: auto;
    margin: 0;
    padding: 0;
  }
  .short-card__frame { padding: 18px; }
  .short-card__number { top: 14px; right: 18px; font-size: 1.5rem; }
  .short-card__meta { left: 18px; right: 18px; bottom: 18px; padding-right: 30px; }
  .short-card__title { font-size: 1.15rem; }
  .short-card__play { width: 58px; height: 58px; }
}
