:root {
  --ink: #05070A;
  --surface: rgba(10, 14, 18, 0.78);
  --surface-hover: rgba(14, 19, 25, 0.90);
  --bone: #DFE7E0;
  --bone-dim: #AAB4AD;
  --muted: #78837C;
  --line: rgba(223, 231, 224, 0.13);
  --line-soft: rgba(223, 231, 224, 0.07);
  --crimson: #E0231C;
  --ember: #FF5A3C;
  --emerald: #10B981;
  --radius-card: 22px;
  --font-display: "Onest", system-ui, -apple-system, sans-serif;
  --font-jp: "Noto Sans JP", "Onest", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--ink);
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(224, 35, 28, 0.35);
  color: var(--bone);
}

/* Atmospheric Backdrop Layers */
.ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.vignette-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% 42%, transparent 38%, rgba(2, 4, 6, 0.65) 100%);
}

.grain-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.055;
  background-image: radial-gradient(rgba(223, 231, 224, 0.45) 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}

/* Custom Fine-Pointer Ring Cursor */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(223, 231, 224, 0.45);
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  transition:
    width 240ms cubic-bezier(0.16, 1, 0.3, 1),
    height 240ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 240ms ease,
    background-color 240ms ease,
    opacity 240ms ease;
}

.cursor-ring.is-visible {
  opacity: 1;
}

.cursor-ring.is-active {
  width: 48px;
  height: 48px;
  border-color: rgba(224, 35, 28, 0.75);
  background: rgba(223, 231, 224, 0.06);
}

/* Shell */
.hub-shell {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Editorial Top Bar */
.hub-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--crimson);
  box-shadow: 0 0 12px var(--crimson);
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--bone);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Dual-span vertical text swap (inline-grid prevents horizontal clipping) */
.nav-swap {
  position: relative;
  display: inline-grid;
  align-items: center;
  overflow: hidden;
  min-height: 20px;
  line-height: 20px;
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
}

.nav-swap > span {
  grid-area: 1 / 1;
  display: block;
  padding: 0 4px;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-swap > .nav-swap-alt {
  transform: translateY(115%);
  color: var(--ember);
  font-family: var(--font-jp);
  letter-spacing: 0.06em;
}

.nav-swap:hover > span:first-child,
.nav-swap:focus-visible > span:first-child,
.bento-card:hover .nav-swap > span:first-child,
.bento-card:focus-visible .nav-swap > span:first-child {
  transform: translateY(-115%);
}

.nav-swap:hover > .nav-swap-alt,
.nav-swap:focus-visible > .nav-swap-alt,
.bento-card:hover .nav-swap > .nav-swap-alt,
.bento-card:focus-visible .nav-swap > .nav-swap-alt {
  transform: translateY(0);
}

.nav-swap:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-swap-muted {
  color: var(--muted);
  cursor: default;
}

/* Main Hero + Featured Slot */
.hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

/* Left Editorial Hero Column */
.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 4px 0;
  opacity: 0;
  animation: panelIn 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0ms;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--crimson);
  box-shadow: 0 0 10px var(--crimson);
}

.monogram-badge {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(10, 14, 18, 0.84);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 62px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--bone);
  text-shadow: 0 2px 32px rgba(3, 6, 8, 0.85);
}

.hero-handle {
  margin: 2px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.hero-tagline {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--bone-dim);
  max-width: 42ch;
  text-shadow: 0 1px 18px rgba(3, 6, 8, 0.75);
}

.index-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  gap: 12px;
}

.index-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.index-cell + .index-cell {
  border-left: 1px solid var(--line-soft);
  padding-left: 14px;
}

.index-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}

.index-label {
  font-size: 12px;
  color: var(--muted);
}

.featured-slot {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Base Bento Card */
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(223, 231, 224, 0.06),
    0 22px 46px -24px rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 22px;
  color: inherit;
  text-decoration: none;
  transform-style: preserve-3d;
  transition:
    transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 280ms ease,
    background-color 280ms ease,
    box-shadow 280ms ease;
  opacity: 0;
  animation: panelIn 620ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Cursor spotlight sheen */
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease;
  background: radial-gradient(
    300px circle at var(--mx, 50%) var(--my, 50%),
    rgba(223, 231, 224, 0.09),
    transparent 65%
  );
}

/* Crimson bottom accent bar */
.bento-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--ember));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover::after {
  transform: scaleX(1);
}

.bento-card:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 3px;
}

a.bento-card:hover,
button.bento-card:hover {
  background: var(--surface-hover);
  border-color: rgba(224, 35, 28, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(223, 231, 224, 0.1),
    0 26px 52px -22px rgba(0, 0, 0, 0.95),
    0 0 28px -16px rgba(224, 35, 28, 0.32);
}

/* Featured #01 Card */
.card-featured {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  height: 100%;
  animation-delay: 80ms;
}

.card-x-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.x-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(5, 7, 10, 0.78);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--bone);
  transition: border-color 260ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card-featured:hover .x-icon-box {
  transform: scale(1.04);
  border-color: rgba(223, 231, 224, 0.28);
}

.card-x-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--crimson);
}

.arrow-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.65);
  display: grid;
  place-items: center;
  color: var(--bone-dim);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), background-color 240ms ease, color 240ms ease, border-color 240ms ease;
}

.card-featured:hover .arrow-circle,
.social-card:hover .arrow-circle {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--ink);
  transform: translate(2px, -2px);
}

.card-x-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.x-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}

.x-title-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--bone);
  height: 30px;
  line-height: 30px;
}

.x-handle {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.x-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--bone-dim);
}

/* Hero CTA Footer */
.card-x-footer {
  display: flex;
  align-items: center;
}

/* Bottom-up Bone Fill Sweep CTA */
.cta-sweep {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(223, 231, 224, 0.28);
  background: rgba(5, 7, 10, 0.72);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  transition: color 300ms ease, border-color 300ms ease;
}

.cta-sweep::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bone);
  transform: translate3d(0, 101%, 0);
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.cta-sweep span {
  position: relative;
  z-index: 1;
}

.cta-arrow {
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card-featured:hover .cta-sweep::before {
  transform: translate3d(0, 0, 0);
}

.card-featured:hover .cta-sweep {
  color: var(--ink);
  border-color: var(--bone);
}

.card-featured:hover .cta-arrow {
  transform: translate(2px, -2px);
}

/* Social Channels Section */
.socials-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--bone);
}

.section-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* 6-Column Bento Mosaic for 5 Social Tiles (Row 1: 3+3; Row 2: 2+2+2) */
.socials-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.social-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 162px;
}

.social-card:nth-child(-n+2) {
  grid-column: span 3;
}

.social-card:nth-child(1) { animation-delay: 110ms; }
.social-card:nth-child(2) { animation-delay: 150ms; }
.social-card:nth-child(3) { animation-delay: 190ms; }
.social-card:nth-child(4) { animation-delay: 230ms; }
.social-card:nth-child(5) { animation-delay: 270ms; }

.social-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.social-icon-sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.72);
  display: grid;
  place-items: center;
  color: var(--bone);
}

.social-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(5, 7, 10, 0.65);
  color: var(--muted);
}

.social-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.social-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--bone);
  min-height: 24px;
  line-height: 24px;
}

.social-handle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.social-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--bone-dim);
}

/* Bottom Utility Row */
.utility-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Card Share Strip */
.card-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  animation-delay: 310ms;
}

.share-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.share-icon-wrap {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(5, 7, 10, 0.78);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--bone);
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.card-share.copied .share-icon-wrap {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--emerald);
}

.share-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.share-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--bone);
}

.share-subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.share-hint {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.65);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.card-share.copied .share-hint {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--emerald);
}

.hidden {
  display: none;
}

/* Card Upcoming Strip */
.card-upcoming {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(10, 14, 18, 0.58);
  border-style: dashed;
  border-color: rgba(223, 231, 224, 0.15);
  animation-delay: 350ms;
}

.upcoming-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.upcoming-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.upcoming-title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--bone-dim);
}

.upcoming-plus {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px dashed rgba(223, 231, 224, 0.18);
  background: rgba(5, 7, 10, 0.45);
  display: grid;
  place-items: center;
  color: var(--muted);
}

/* Footer */
.hub-footer {
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-sep {
  opacity: 0.45;
}

/* Entrance Animation */
@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablet */
@media (max-width: 860px) {
  .hub-shell {
    padding: 22px 18px 22px;
    gap: 24px;
  }

  .hub-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .hero-panel {
    gap: 22px;
  }

  .socials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-card,
  .social-card:nth-child(-n+2) {
    grid-column: span 1;
  }

  .social-card:nth-child(5) {
    grid-column: span 2;
  }

  .utility-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 559px) {
  .hub-shell {
    padding: 18px 14px 20px;
    gap: 20px;
  }

  .topbar-nav {
    gap: 12px;
  }

  .socials-grid {
    grid-template-columns: 1fr;
  }

  .social-card,
  .social-card:nth-child(-n+2),
  .social-card:nth-child(5) {
    grid-column: span 1;
  }

  .bento-card {
    padding: 18px;
    border-radius: 18px;
  }

  .card-share,
  .card-upcoming {
    padding: 15px 16px;
  }

  .index-strip {
    padding: 14px 0;
  }

  .index-value {
    font-size: 14px;
  }

  .hub-footer {
    justify-content: center;
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-ring {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-panel,
  .bento-card {
    animation: none;
    opacity: 1;
    transition: border-color 180ms ease, background-color 180ms ease;
  }

  .nav-swap > span,
  .cta-sweep::before,
  .bento-card::after,
  .cursor-ring {
    transition: none;
  }

  .cursor-ring {
    display: none;
  }
}
