:root {
  --bg-base: #07070B;
  --surface: rgba(17, 17, 24, 0.82);
  --surface-hover: rgba(23, 23, 33, 0.92);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #F5F5F7;
  --text-secondary: #A1A1B5;
  --text-muted: #6E6E85;
  --accent-indigo: #6366F1;
  --accent-cyan: #22D3EE;
  --accent-emerald: #10B981;
  --radius-card: 24px;
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient lighting & subtle dot-matrix texture */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 22% 8%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(50% 40% at 82% 18%, rgba(34, 211, 238, 0.12), transparent 70%),
    radial-gradient(45% 40% at 50% 95%, rgba(99, 102, 241, 0.08), transparent 75%);
}

.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.065) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 45%, #000 35%, transparent 100%);
}

/* Shell & Grid */
.bento-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.bento-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 16px;
}

/* Base Bento Card */
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 40px -24px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 24px;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 240ms ease,
    background-color 240ms ease,
    box-shadow 240ms ease;
  opacity: 0;
  animation: cardIn 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

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

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

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

a.bento-card:hover,
button.bento-card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 24px 48px -20px rgba(0, 0, 0, 0.9),
    0 0 32px -14px rgba(99, 102, 241, 0.25);
}

/* Typography helpers */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mono-handle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Card 1: Hero */
.card-hero {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 292px;
  gap: 20px;
}

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

.avatar-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
}

.avatar-halo {
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.55), rgba(34, 211, 238, 0.45));
  filter: blur(10px);
  opacity: 0.65;
  animation: haloPulse 5s ease-in-out infinite;
}

.avatar-badge {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(145deg, #171726 0%, #0D0D15 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent-emerald);
  border: 3px solid #0E0E15;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.65);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-body h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 36px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-tagline {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 34ch;
}

.hero-footer {
  display: flex;
  align-items: center;
}

.domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.24);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C7D2FE;
}

/* Card 2: Featured X Card */
.card-x {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 292px;
  gap: 18px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(99, 102, 241, 0.16), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(34, 211, 238, 0.08), transparent 55%),
    var(--surface);
}

.x-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 85% 15%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle at 85% 15%, #000 0%, transparent 65%);
}

.card-x-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.x-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 240ms ease;
}

.card-x:hover .x-icon-box {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.24);
}

.arrow-circle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), background-color 240ms ease, color 240ms ease;
}

.arrow-circle svg {
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card-x:hover .arrow-circle {
  background: var(--text-primary);
  color: #07070B;
}

.card-x:hover .arrow-circle svg {
  transform: translate(2px, -2px);
}

.card-x-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.x-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.x-title-row h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.x-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 34ch;
}

.card-x-footer {
  position: relative;
  display: flex;
  align-items: center;
}

.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #07070B;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color 220ms ease;
}

.cta-arrow {
  font-size: 14px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card-x:hover .cta-pill {
  background: #FFFFFF;
}

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

/* Card 3: Share / Copy Strip (2x1) */
.card-share {
  grid-column: span 2;
  padding: 20px 24px;
  min-height: 96px;
  justify-content: center;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.share-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

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

.share-icon-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

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

.share-hint {
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  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.4);
  color: var(--accent-emerald);
}

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

.share-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.hidden {
  display: none;
}

/* Card 4: Coming Soon */
.card-soon {
  grid-column: span 2;
  padding: 20px 24px;
  min-height: 96px;
  background: rgba(13, 13, 19, 0.55);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.11);
  justify-content: center;
}

.soon-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.soon-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.soon-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--text-secondary);
}

.soon-plus {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 4px;
}

.footer-sep {
  opacity: 0.5;
}

/* Animations */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes haloPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.06);
  }
}

/* Tablet & Mobile */
@media (max-width: 859px) {
  .bento-shell {
    padding: 28px 16px 24px;
    justify-content: flex-start;
  }

  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-hero,
  .card-x,
  .card-share,
  .card-soon {
    grid-column: span 2;
  }

  .card-hero,
  .card-x {
    grid-row: span 1;
    min-height: 240px;
  }
}

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

  .bento-grid {
    gap: 12px;
  }

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

  .card-hero,
  .card-x {
    min-height: 224px;
  }

  .card-share,
  .card-soon {
    padding: 18px 20px;
    min-height: 88px;
  }

  .share-title {
    font-size: 16px;
  }
}

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

  .bento-card::before,
  .avatar-halo {
    animation: none;
  }

  a.bento-card:hover,
  button.bento-card:hover {
    transform: none;
  }
}
