/* ═══════════════════════════════════════
   GROUPS PAGE — Reverse Palette (White BG)
   Osmo Image Preview Cursor Follower
   ═══════════════════════════════════════ */

@font-face {
  font-family: Roobert Pro;
  src: url('../fonts/RoobertPRO-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Roobert Pro;
  src: url('../fonts/RoobertPRO-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Roobert Pro;
  src: url('../fonts/RoobertPRO-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Roobert Pro;
  src: url('../fonts/RoobertPRO-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base — Reverse Palette ── */
.groups-body {
  font-family:
    'Roobert Pro',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: #ffffff;
  color: #0a0a0a;
  font-size: 1vw;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ═══ NAV ═══ */
.groups-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.groups-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: none;
  padding: 1.25em 2em;
}

.groups-nav__logo {
  font-weight: 600;
  font-size: 1.125em;
  letter-spacing: -0.02em;
  color: #0a0a0a;
}

.groups-nav__links {
  display: flex;
  gap: 2em;
}

.groups-nav__link {
  font-size: 0.875em;
  font-weight: 400;
  color: #0a0a0a80;
  transition: color 0.2s;
}
.groups-nav__link:hover,
.groups-nav__link.is--active {
  color: #0a0a0a;
}

/* ═══ HERO ═══ */
.groups-hero {
  padding: 10em 2em 4em;
  max-width: 76em;
  margin: 0 auto;
}

.groups-hero__inner {
  max-width: 48em;
}

.groups-hero__eyebrow {
  font-size: 0.75em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0a0a0a60;
  margin-bottom: 1.5em;
}

.groups-hero__title {
  font-size: 5em;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #0a0a0a;
  margin-bottom: 0.4em;
}

.groups-hero__subtitle {
  font-size: 1.25em;
  font-weight: 300;
  line-height: 1.5;
  color: #0a0a0a80;
  max-width: 32em;
}

.groups-hero__cta {
  display: inline-block;
  margin-top: 2em;
  padding: 0.75em 1.8em;
  font-size: 1em;
  font-weight: 500;
  color: #fff;
  background: #0a0a0a;
  border-radius: 100px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.groups-hero__cta:hover {
  background: #333;
  transform: translateY(-1px);
}

.groups-loading,
.groups-empty {
  padding: 4em 2em;
  text-align: center;
  font-size: 1.1em;
  color: #0a0a0a80;
}
.groups-empty a {
  text-decoration: underline;
}

/* ═══ GROUPS SECTION ═══ */
.groups-section {
  padding-bottom: 8em;
}

/* ═══ OSMO CURSOR FOLLOWER — Reverse Palette ═══ */
.preview-container {
  width: 100%;
  max-width: 76em;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2em;
  padding-right: 2em;
}

.preview-collection {
  width: 100%;
  margin-top: 0.5em;
}

.preview-item__row {
  flex-flow: wrap;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  display: flex;
}

.preview-item__col {
  flex: 1;
}
.preview-item__col.is--large {
  max-width: 45%;
}
.preview-item__col.is--medium {
  max-width: 25%;
}
.preview-item__col.is--small {
  max-width: 15%;
}

.preview-container__label {
  color: #0a0a0a50;
  text-transform: uppercase;
  font-size: 0.75em;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.preview-list {
  flex-flow: column;
  width: 100%;
  display: flex;
  position: relative;
}

.preview-item {
  width: 100%;
  transition: opacity 0.2s;
}

.preview-item__heading {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 3.5em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #0a0a0a;
}

.preview-item__text {
  margin-bottom: 0;
  font-size: 1.125em;
  font-weight: 400;
  line-height: 1.2;
  color: #0a0a0a90;
}

.preview-item__visual {
  aspect-ratio: 1 / 1.25;
  width: 20em;
  display: none;
  position: absolute;
  overflow: hidden;
  border-radius: 0.5em;
}

.preview-follower [data-follower-visual] {
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.preview-item__inner {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  padding-top: 2.5em;
  padding-bottom: 2.5em;
  display: block;
}

.preview-item__visual-img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Cursor follower */
.preview-follower {
  z-index: 100;
  aspect-ratio: 1 / 1.25;
  pointer-events: none;
  border-radius: 0.75em;
  justify-content: center;
  align-items: center;
  width: 20em;
  display: flex;
  position: fixed;
  inset: 0% auto auto 0%;
  overflow: hidden;
}

.preview-follower__label {
  z-index: 2;
  position: absolute;
  bottom: 1em;
  opacity: 0;
  transform: translate(0px, 100%);
  transition:
    opacity 0.1s ease,
    transform 0.6s cubic-bezier(0.65, 0.1, 0, 1);
}

.preview-follower__label-span {
  background-color: #0a0a0a;
  color: #ffffff;
  border-radius: 0.25em;
  padding: 0.75em 1.25em;
  font-size: 1em;
  font-weight: 500;
}

.preview-follower__inner {
  z-index: 2;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  opacity: 0;
  transform: scale(0);
  transition:
    opacity 0.1s ease,
    transform 0.6s cubic-bezier(0.65, 0.1, 0, 1);
}

/* Desktop hover states */
@media screen and (min-width: 992px) {
  .preview-item:last-of-type .preview-item__inner {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
}

@media (hover: hover) and (min-width: 992px) {
  body:has([data-follower-collection]:hover) .preview-follower__inner {
    opacity: 1;
    transform: scale(1);
  }
  body:has([data-follower-collection]:hover) .preview-follower__label {
    opacity: 1;
    transform: translate(0px, 0%);
  }
  body:has(.preview-item:hover) .preview-item:not(:hover) {
    opacity: 0.35;
  }
}

/* ═══ MAGAZINE COVER (The Magazine cursor visual) ═══ */
.magazine-cover {
  background: #ffffff;
  border-radius: 0.5em;
  overflow: hidden;
}

.magazine-cover__grid {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto auto;
  padding: 1em;
  gap: 0;
  background: #ffffff;
  /* Grid lines overlay */
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 50% 25%;
}

.magazine-cover__header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 0.5em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 0.5em;
}

.magazine-cover__issue {
  font-size: 0.55em;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0a0a0a;
}

.magazine-cover__date {
  font-size: 0.5em;
  color: #0a0a0a80;
}

.magazine-cover__hero-text {
  grid-column: 1 / -1;
  padding: 0.5em 0;
}

.magazine-cover__title {
  font-size: 0.85em;
  line-height: 1.2;
  font-weight: 400;
  margin: 0;
}

.magazine-cover__title-bold {
  font-weight: 600;
  color: #0a0a0a;
  display: block;
}

.magazine-cover__title-light {
  font-weight: 300;
  color: #0a0a0a90;
}

.magazine-cover__detail {
  grid-column: 1 / 2;
  align-self: end;
  padding-bottom: 0.5em;
}

.magazine-cover__detail-label {
  font-size: 0.5em;
  font-weight: 600;
  color: #0a0a0a;
}

.magazine-cover__image-block {
  grid-column: 2 / 3;
  grid-row: 2 / 5;
  position: relative;
  background: #2952e6;
  border-radius: 0.25em;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5em;
}

.magazine-cover__halftone {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.6;
}

.magazine-cover__asterisk {
  font-size: 2.5em;
  color: #6b9aff;
  z-index: 1;
  line-height: 1;
}

.magazine-cover__stats {
  grid-column: 1 / 2;
  display: flex;
  gap: 0.5em;
  padding-top: 0.5em;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  align-self: end;
}

.magazine-cover__stat {
  display: flex;
  flex-direction: column;
}

.magazine-cover__stat-number {
  font-size: 0.7em;
  font-weight: 600;
  color: #0a0a0a;
  line-height: 1.2;
}

.magazine-cover__stat-label {
  font-size: 0.35em;
  color: #0a0a0a60;
  line-height: 1.3;
}

.magazine-cover__grid-lines {
  display: none; /* handled by background-image on parent */
}

/* ═══ FOOTER ═══ */
.groups-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 3em 2em;
}

.groups-footer__inner {
  max-width: 76em;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.groups-footer__text {
  font-size: 0.875em;
  font-weight: 400;
  color: #0a0a0a;
}
.groups-footer__text.is--muted {
  color: #0a0a0a50;
}

/* ═══ TABLET ═══ */
@media screen and (max-width: 991px) {
  .groups-body {
    font-size: 16px;
  }

  .groups-hero__title {
    font-size: 3em;
  }
  .groups-hero__subtitle {
    font-size: 1.1em;
  }

  .preview-item__row {
    grid-row-gap: 0.5em;
  }
  .preview-item__row.tablet--hide {
    display: none;
  }

  .preview-item__col.is--large {
    flex: none;
    order: -1;
    width: 100%;
    max-width: none;
  }
  .preview-item__col.is--medium {
    order: -1;
    max-width: 80%;
  }
  .preview-item__col.is--small {
    text-align: right;
    max-width: 20%;
  }
  .preview-item__col.is--small.tablet--hide {
    display: none;
  }

  .preview-list {
    grid-column-gap: 1em;
    grid-row-gap: 4em;
    flex-flow: wrap;
  }

  .preview-item {
    width: calc(50% - 0.5em);
  }

  .preview-item__heading {
    font-size: 2em;
  }

  .preview-item__visual {
    border-radius: 0.75em;
    order: -1;
    width: 100%;
    margin-bottom: 1em;
    display: block;
    position: relative;
  }

  .preview-item__inner {
    border: 1px #000;
    flex-flow: column;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
  }

  .preview-follower {
    display: none;
  }

  /* Magazine cover on tablet */
  .magazine-cover {
    aspect-ratio: 1 / 1.25;
    display: block;
    position: relative;
  }
}

/* ═══ MOBILE ═══ */
@media screen and (max-width: 767px) {
  .groups-hero {
    padding: 8em 1em 3em;
  }
  .groups-hero__title {
    font-size: 2.5em;
  }
  .groups-hero__eyebrow {
    font-size: 0.7em;
  }

  .preview-container {
    padding-left: 1em;
    padding-right: 1em;
  }

  .preview-list {
    grid-row-gap: 3em;
  }
  .preview-item {
    width: 100%;
  }

  .groups-nav__inner {
    padding: 1em;
  }
  .groups-footer__inner {
    flex-direction: column;
    gap: 0.5em;
    text-align: center;
  }
}

/* ── Nav Auth Elements ── */
.groups-nav__login {
  font-weight: 500;
  cursor: pointer;
}
.groups-nav__user {
  display: flex;
  align-items: center;
  gap: 0.75em;
}
.groups-nav__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}
