/*
 * HUBBY flagship layout
 * Built on the original visual language: navy, cyan, orange, product UI and motion.
 */

:root {
  --flag-ink: #082a34;
  --flag-ink-2: #061e26;
  --flag-cyan: #12c5de;
  --flag-cyan-soft: #d9f8fc;
  --flag-orange: #ff7600;
  --flag-orange-soft: #fff0df;
  --flag-paper: #f7f4ed;
  --flag-white: #fff;
  --flag-line: rgba(8, 42, 52, .15);
}

body {
  background: var(--flag-paper);
}

.wrap {
  width: min(calc(100% - 64px), 1280px);
}

/* A confident product header inspired by mature game platforms. */
@media (min-width: 721px) {
  .site-header {
    border-bottom: 1px solid rgba(8, 42, 52, .12);
    background: rgba(255,255,255,.96);
  }

  .header-inner {
    width: min(calc(100% - 64px), 1280px);
    min-height: 88px;
  }

  .brand {
    gap: 10px;
  }

  .brand img {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }

  .site-nav {
    gap: 6px;
  }

  .site-nav a {
    position: relative;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: .86rem;
  }

  .site-nav a::after {
    position: absolute;
    right: 14px;
    bottom: 7px;
    left: 14px;
    height: 2px;
    border-radius: 999px;
    background: var(--flag-cyan);
    content: "";
    opacity: 0;
    transform: scaleX(.25);
    transition: opacity .2s ease, transform .2s ease;
  }

  .site-nav a:hover::after,
  .site-nav a[aria-current="page"]::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .site-nav a[href="/beta/"] {
    margin-left: 4px;
    padding-inline: 18px;
    color: #fff;
    background: var(--flag-orange);
  }

  .site-nav a[href="/beta/"]::after {
    display: none;
  }

  .site-nav a[href="/beta/"]:hover,
  .site-nav a[href="/beta/"][aria-current="page"] {
    color: #fff;
    background: #e86700;
    box-shadow: 0 10px 24px rgba(255,118,0,.22);
  }
}

/* Home hero: retain the original app demo, enlarge the cinematic composition. */
.home-v3 .home-hero {
  background-color: var(--flag-ink-2);
  background-image:
    linear-gradient(110deg, rgba(6,30,38,.98) 0%, rgba(8,42,52,.94) 48%, rgba(8,75,87,.75) 100%),
    radial-gradient(circle at 82% 16%, rgba(18,197,222,.4), transparent 28rem);
}

.home-v3 .home-hero::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 38%;
  height: 8px;
  background: linear-gradient(90deg, var(--flag-cyan), var(--flag-orange));
  content: "";
}

.home-v3 .home-hero-grid {
  min-height: min(920px, calc(100vh - 88px));
  padding: clamp(76px, 8vw, 120px) 0 clamp(112px, 12vw, 158px);
  grid-template-columns: minmax(0, .84fr) minmax(520px, 1.16fr);
  gap: clamp(56px, 7vw, 104px);
}

.home-v3 .home-hero-copy h1 {
  font-size: clamp(4.1rem, 6.5vw, 7.2rem);
  line-height: .93;
}

.home-v3 .home-hero-copy h1 em {
  width: fit-content;
  padding-right: .08em;
  background: linear-gradient(transparent 70%, rgba(18,197,222,.2) 70%);
}

.home-v3 .home-hero-lead {
  max-width: 590px;
  font-size: 1.04rem;
}

.home-v3 .hero-product {
  padding: 70px 10px 34px 36px;
}

.home-v3 .hero-product::before {
  inset: 34px 0 0 4px;
  border-radius: 64px 20px 64px 20px;
  background:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    rgba(18,197,222,.06);
  background-size: 26px 26px;
  transform: none;
}

.home-v3 .product-label {
  top: 26px;
  left: 6px;
}

.home-v3 .app-shell {
  border-radius: 34px 12px 34px 12px;
  box-shadow: 0 42px 90px rgba(0,0,0,.42);
  transform: none;
}

.home-v3 .floating-message {
  right: -18px;
  bottom: 0;
  border: 1px solid rgba(8,42,52,.12);
  border-radius: 16px 6px 16px 6px;
  box-shadow: 10px 10px 0 var(--flag-orange);
  transform: none;
}

.home-v3 .hero-marquee {
  z-index: 3;
  border-color: rgba(255,255,255,.15);
  background: rgba(3,20,26,.62);
  backdrop-filter: blur(10px);
}

.home-v3 .hero-marquee-track span {
  padding-block: 16px;
  color: rgba(255,255,255,.66);
}

/* Strong section rhythm. */
.home-v3 .section {
  padding: clamp(100px, 10vw, 160px) 0;
}

.home-v3 .section-kicker {
  font-size: .73rem;
  letter-spacing: .2em;
}

.home-v3 .section-title {
  font-size: clamp(3.2rem, 6.6vw, 6.5rem);
  line-height: 1;
}

/* Feature modules: a Nintendo-like editorial mosaic, not three repeated cards. */
.home-v3 .experience-section {
  color: var(--flag-ink);
  background: var(--flag-paper);
}

.home-v3 .experience-section .section-heading-row {
  align-items: start;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .68fr);
  gap: clamp(60px, 8vw, 120px);
}

.home-v3 .experience-grid {
  display: grid;
  margin-top: 72px;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: 20px;
}

.home-v3 .experience-card {
  min-height: 500px;
  border-radius: 36px 12px 36px 12px;
}

.home-v3 .experience-card:nth-child(1) {
  grid-column: span 5;
  background: #fff;
}

.home-v3 .experience-card:nth-child(2) {
  grid-column: span 7;
  background: var(--cyan-deep);
}

.home-v3 .experience-card:nth-child(3) {
  display: grid;
  min-height: 300px;
  padding-right: clamp(300px, 32vw, 440px);
  grid-column: 1 / -1;
  background: var(--flag-orange-soft);
}

.home-v3 .experience-card:nth-child(3) .experience-icon {
  margin-top: 34px;
}

.home-v3 .experience-card:nth-child(3) .mini-call {
  top: 50%;
  right: 48px;
  bottom: auto;
  left: auto;
  width: min(310px, 31%);
  padding: 30px;
  border: 1px solid rgba(8,42,52,.12);
  border-radius: 26px 8px 26px 8px;
  background: #fff;
  transform: translateY(-50%);
}

.home-v3 .wide-link {
  border-radius: 20px 6px 20px 6px;
  box-shadow: none;
}

/* Recruitment becomes a bold product strip. */
.home-v3 .recruitment-showcase {
  color: var(--flag-ink);
  background: var(--flag-cyan);
}

.home-v3 .recruitment-showcase .section-kicker,
.home-v3 .recruitment-showcase .section-intro {
  color: rgba(8,42,52,.7);
}

.home-v3 .recruitment-showcase .section-title {
  color: var(--flag-ink);
}

.home-v3 .recruitment-rail {
  margin-right: calc((100vw - min(100vw - 64px, 1280px)) / -2);
  padding-right: max(32px, calc((100vw - 1280px) / 2));
  scroll-padding-right: 32px;
}

.home-v3 .sample-party {
  flex-basis: 440px;
  border: 1px solid rgba(8,42,52,.18);
  border-radius: 28px 8px 28px 8px;
  background: #fff;
  box-shadow: 0 18px 0 rgba(8,42,52,.1);
}

.home-v3 .rail-note .button {
  color: #fff;
  background: var(--flag-ink);
}

/* Name story: one dramatic brand block. */
.home-v3 .naming-section {
  color: #fff;
  background: var(--flag-ink);
}

.home-v3 .naming-section .section-title,
.home-v3 .naming-section .naming-copy > p:last-child {
  color: #fff;
}

.home-v3 .naming-section .section-kicker {
  color: var(--flag-cyan);
}

.home-v3 .naming-grid {
  grid-template-columns: minmax(0,.78fr) minmax(540px,1.22fr);
}

.home-v3 .naming-words {
  border-top: 1px solid rgba(255,255,255,.22);
}

.home-v3 .naming-words > div {
  min-height: 126px;
  padding-inline: 10px;
  border-bottom-color: rgba(255,255,255,.22);
}

.home-v3 .naming-words strong {
  color: var(--flag-orange);
  font-size: clamp(3.2rem, 6vw, 6rem);
}

.home-v3 .naming-words span {
  color: rgba(255,255,255,.72);
}

/* Games: a true always-moving showcase with cloned cards. */
.home-v3 .games-home-section {
  overflow: hidden;
  color: var(--flag-ink);
  background: var(--flag-paper);
}

.home-v3 .games-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 64px;
}

.home-v3 .games-home-grid > div:first-child {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0,1.1fr) minmax(300px,.62fr);
  column-gap: 80px;
}

.home-v3 .games-home-grid > div:first-child .section-kicker,
.home-v3 .games-home-grid > div:first-child .section-title {
  grid-column: 1;
}

.home-v3 .games-home-grid > div:first-child .section-intro,
.home-v3 .games-home-grid > div:first-child .button {
  grid-column: 2;
}

.home-v3 .games-home-grid > div:first-child .section-intro {
  grid-row: 1 / span 2;
  align-self: end;
}

.home-v3 .games-home-grid > div:first-child .button {
  width: fit-content;
  margin-top: 18px;
}

.home-v3 .game-orbit {
  display: flex;
  width: max-content;
  max-width: none;
  gap: 16px;
  animation: flagship-game-loop 30s linear infinite;
}

.home-v3 .game-orbit > div {
  display: grid;
  flex: 0 0 230px;
  min-height: 230px;
  padding: 28px;
  place-content: center;
  border: 1px solid rgba(8,42,52,.15);
  border-radius: 30px 8px 30px 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(8,42,52,.08);
  text-align: center;
  gap: 14px;
  animation-name: none;
}

.home-v3 .game-orbit > div:nth-child(3n+2) {
  background: var(--flag-cyan-soft);
}

.home-v3 .game-orbit > div:nth-child(3n) {
  background: var(--flag-orange-soft);
}

.home-v3 .game-orbit span {
  font-size: 3rem;
}

.home-v3 .game-orbit strong {
  font-size: .9rem;
}

@keyframes flagship-game-loop {
  to { transform: translateX(calc(-50% - 8px)); }
}

.home-v3 .games-home-section:hover .game-orbit {
  animation-play-state: paused;
}

/* Directory: modular tiles with unmistakable next actions. */
.home-v3 .explore-section {
  background: #fff;
}

.home-v3 .home-directory {
  display: grid;
  margin-top: 70px;
  border: 0;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
}

.home-v3 .home-directory > a {
  min-height: 320px;
  padding: 36px;
  border: 1px solid var(--flag-line);
  border-radius: 34px 10px 34px 10px;
  grid-template-columns: 70px minmax(0,1fr) 48px;
  background: var(--flag-paper);
}

.home-v3 .home-directory > a:nth-child(2) {
  background: var(--flag-cyan-soft);
}

.home-v3 .home-directory > a:nth-child(3) {
  color: #fff;
  background: var(--flag-ink);
}

.home-v3 .home-directory > a:nth-child(3) p {
  color: rgba(255,255,255,.65);
}

.home-v3 .home-directory > a:nth-child(4) {
  background: var(--flag-orange-soft);
}

.home-v3 .home-directory > a:hover {
  padding: 36px;
  transform: translateY(-6px);
}

.home-v3 .home-directory > a > span {
  align-self: start;
  font-size: 3.2rem;
}

.home-v3 .home-directory h3 {
  font-size: clamp(2.1rem,3vw,3rem);
}

/* Story and conversion blocks keep the original art but feel more cinematic. */
.home-v3 .story-home-section {
  background: var(--flag-ink-2);
}

.home-v3 .story-home-grid {
  grid-template-columns: minmax(430px,.92fr) minmax(0,1.08fr);
}

.home-v3 .story-home-art {
  min-height: 650px;
  border: 0;
  border-radius: 50px 12px 50px 12px;
  box-shadow: 18px 18px 0 var(--flag-orange);
}

.home-v3 .final-cta-section {
  color: var(--flag-ink);
  background: var(--flag-orange);
}

.home-v3 .final-cta {
  padding: clamp(44px,6vw,76px);
  border-radius: 48px 12px 48px 12px;
  color: #fff;
  background: var(--flag-ink);
  box-shadow: none;
}

/* Subpages: consistent flagship covers and modular content. */
.page-main.subpage-v3 .subpage-hero {
  min-height: min(820px, calc(100vh - 112px));
  margin: 24px;
  border-radius: 52px 16px 52px 16px;
}

.page-main.subpage-v3 .subpage-hero::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 38%;
  height: 7px;
  background: var(--sub-accent);
  content: "";
}

.page-main.subpage-v3 .subpage-hero-grid {
  min-height: inherit;
  grid-template-columns: minmax(0,.9fr) minmax(470px,1.1fr);
}

.page-main.subpage-v3 .subpage-hero .page-title {
  font-size: clamp(3.7rem,6.5vw,7.3rem);
}

.page-main.subpage-v3 .subpage-visual {
  transform: translateY(18px);
}

.page-main.subpage-v3 .about-party-card,
.page-main.subpage-v3 .games-visual,
.page-main.subpage-v3 .beta-visual,
.page-main.subpage-v3 .guide-visual,
.page-main.subpage-v3 .operator-logo {
  border-radius: 36px 10px 36px 10px;
}

.subpage-v3 > .section {
  padding-block: clamp(96px,10vw,150px);
}

.subpage-v3 .section-title {
  font-size: clamp(3rem,5.8vw,5.8rem);
  line-height: 1.02;
}

.subpage-v3 .feature-grid,
.subpage-v3 .info-grid,
.subpage-v3 .support-grid,
.subpage-v3 .step-grid {
  gap: 20px;
}

.subpage-v3 .feature-card,
.subpage-v3 .info-card,
.subpage-v3 .support-card,
.subpage-v3 .step-card {
  border-radius: 32px 10px 32px 10px;
  box-shadow: 0 18px 44px rgba(8,42,52,.08);
}

.subpage-v3 .dark-callout {
  border-radius: 42px 12px 42px 12px;
}

.subpage-games .game-card {
  border-radius: 26px 8px 26px 8px;
}

.subpage-games .showcase-panel,
.subpage-games .candidate-game {
  border-radius: 30px 10px 30px 10px;
}

.legal-sheet {
  border-radius: 40px 12px 40px 12px;
}

/* Mobile remains unmistakably HUBBY while receiving the new section hierarchy. */
@media (max-width: 720px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .home-v3 .home-hero-grid {
    min-height: 0;
    padding-top: 46px;
    padding-bottom: 104px;
    grid-template-columns: minmax(0,1fr);
    gap: 48px;
  }

  .home-v3 .home-hero-copy h1 {
    font-size: clamp(3.25rem,14.8vw,4.7rem);
    line-height: .95;
  }

  .home-v3 .home-hero-copy h1 em {
    width: auto;
    background: none;
  }

  .home-v3 .hero-product {
    padding: 44px 0 26px 10px;
  }

  .home-v3 .hero-product::before {
    inset: 18px 8px 0 0;
    border-radius: 32px 8px 32px 8px;
  }

  .home-v3 .product-label {
    top: 12px;
    left: 0;
  }

  .home-v3 .app-shell {
    border-radius: 24px 8px 24px 8px;
  }

  .home-v3 .section {
    padding-block: 78px;
  }

  .home-v3 .section-title {
    font-size: clamp(2.5rem,11.5vw,3.8rem);
  }

  .home-v3 .experience-section .section-heading-row {
    grid-template-columns: minmax(0,1fr);
    gap: 20px;
  }

  .home-v3 .experience-grid {
    display: flex;
    margin-top: 32px;
    gap: 14px;
  }

  .home-v3 .experience-card,
  .home-v3 .experience-card:nth-child(3) {
    display: grid;
    min-height: 390px;
    padding: 24px 22px;
    border-radius: 26px 8px 26px 8px;
    grid-template-columns: 58px minmax(0,1fr);
  }

  .home-v3 .experience-card:nth-child(3) .mini-call {
    position: static;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    transform: none;
  }

  .home-v3 .recruitment-rail {
    margin-right: -16px;
    padding-right: 16px;
  }

  .home-v3 .sample-party {
    border-radius: 26px 8px 26px 8px;
    box-shadow: 0 10px 0 rgba(8,42,52,.1);
  }

  .home-v3 .naming-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .home-v3 .naming-words > div {
    min-height: 96px;
  }

  .home-v3 .naming-words strong {
    font-size: 2.6rem;
  }

  .home-v3 .games-home-grid > div:first-child {
    display: block;
  }

  .home-v3 .game-orbit {
    animation-duration: 22s;
    gap: 12px;
  }

  .home-v3 .game-orbit > div {
    flex-basis: 150px;
    min-height: 170px;
    padding: 18px;
    border-radius: 22px 6px 22px 6px;
  }

  .home-v3 .game-orbit span {
    font-size: 2.2rem;
  }

  .home-v3 .home-directory {
    grid-template-columns: minmax(0,1fr);
    gap: 12px;
  }

  .home-v3 .home-directory > a,
  .home-v3 .home-directory > a:hover {
    min-height: 220px;
    padding: 24px 20px;
    border-radius: 26px 8px 26px 8px;
    grid-template-columns: 52px minmax(0,1fr) 42px;
  }

  .home-v3 .home-directory > a > span {
    font-size: 2.1rem;
  }

  .home-v3 .story-home-art {
    min-height: 390px;
    border-radius: 28px 8px 28px 8px;
    box-shadow: 9px 9px 0 var(--flag-orange);
  }

  .home-v3 .final-cta {
    padding: 28px 22px;
    border-radius: 28px 8px 28px 8px;
  }

  .page-main.subpage-v3 .subpage-hero {
    min-height: 0;
    margin: 0;
    border-radius: 0 0 34px 10px;
  }

  .page-main.subpage-v3 .subpage-hero-grid {
    grid-template-columns: minmax(0,1fr);
  }

  .page-main.subpage-v3 .subpage-visual {
    transform: none;
  }

  .subpage-v3 .feature-card,
  .subpage-v3 .info-card,
  .subpage-v3 .support-card,
  .subpage-v3 .step-card {
    border-radius: 26px 8px 26px 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-v3 .game-orbit {
    animation-play-state: paused;
  }
}
