/* ============================================
   Bonut Labs — Splash Page Styles
   Page-specific only; shared styles in shared.css
   ============================================ */


/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-text,
.hero-tux {
  will-change: transform;
}

/* animated gradient bg */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    var(--bg-darker) 0%,
    #2d1b4e 30%,
    #1e1f29 55%,
    #1a2332 80%,
    var(--bg-darker) 100%);
  background-size: 400% 400%;
  animation: heroShift 16s ease infinite;
  z-index: 0;
}
@keyframes heroShift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* subtle grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(189,147,249,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(189,147,249,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* text side */
.hero-text {
  max-width: 560px;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: .5em;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: 1.2rem;
  color: var(--comment);
  margin-bottom: 2rem;
  font-weight: 400;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  border-radius: 999px;
  transition: all var(--transition);
  cursor: pointer;
}
.hero-cta.primary {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--bg);
  border: none;
}
.hero-cta.primary:hover {
  box-shadow: 0 0 24px rgba(255,121,198,.45);
  transform: translateY(-2px);
}
.hero-cta.secondary {
  background: transparent;
  border: 1px solid var(--comment);
  color: var(--fg);
}
.hero-cta.secondary:hover {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 14px rgba(80,250,123,.25);
}

/* Tux art */
.hero-tux {
  position: relative;
  flex-shrink: 0;
  width: clamp(260px, 30vw, 420px);
}
.hero-tux img {
  width: 100%;
  height: auto;
  display: block;
  animation: tuxFloat 5s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 72%);
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 72%);
}
@keyframes tuxFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-14px) scale(1.02); }
}
@keyframes sparkGlow {
  0%   { filter: drop-shadow(0 0 40px rgba(189,147,249,.35)) drop-shadow(0 0 80px rgba(255,121,198,.18)); }
  100% { filter: drop-shadow(0 0 55px rgba(80,250,123,.4))   drop-shadow(0 0 90px rgba(189,147,249,.3)); }
}

/* ============================================
   HOMELAB SECTION
   ============================================ */
.homelab {
  position: relative;
  padding: 5rem 0;
}

.badge-group-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.badge-group-label.green  { color: var(--green); }
.badge-group-label.purple { color: var(--purple); }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.25rem;
  background: var(--current);
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  will-change: transform;
  cursor: default;
}
.badge .badge-icon {
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.badge .badge-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}
.badge .badge-icon img[alt="macOS"] {
  filter: brightness(0) invert(1);
}
.badge:hover {
  transform: translateY(-3px);
  border-color: var(--comment);
}
.badge.green:hover  { border-color: var(--green);  box-shadow: 0 0 16px rgba(80,250,123,.2); }
.badge.purple:hover { border-color: var(--purple); box-shadow: 0 0 16px rgba(189,147,249,.2); }

/* ============================================
   GAMING SECTION
   ============================================ */
.gaming {
  position: relative;
  padding: 5rem 0;
  background: var(--bg-darker);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* Animated gradient border angle */
@property --border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes borderRotate {
  to { --border-angle: 360deg; }
}

.game-card {
  position: relative;
  background: var(--current);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  border: 1px solid transparent;
  overflow: hidden;
  transition: all var(--transition);
  cursor: default;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.game-card.purple::before  { background: var(--purple); }
.game-card.pink::before    { background: var(--pink); }
.game-card.orange::before  { background: var(--orange); }
.game-card.cyan::before    { background: var(--cyan); }

/* Animated gradient border glow on hover */
.game-card::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
}
.game-card.purple::after { background: conic-gradient(from var(--border-angle), var(--purple), var(--pink), var(--purple)); }
.game-card.pink::after   { background: conic-gradient(from var(--border-angle), var(--pink), var(--purple), var(--pink)); }
.game-card.orange::after { background: conic-gradient(from var(--border-angle), var(--orange), var(--red), var(--orange)); }
.game-card.cyan::after   { background: conic-gradient(from var(--border-angle), var(--cyan), var(--green), var(--cyan)); }

.game-card:hover::after {
  opacity: 1;
  animation: borderRotate 3s linear infinite;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.game-card.purple:hover  { box-shadow: 0 8px 32px rgba(189,147,249,.2); }
.game-card.pink:hover    { box-shadow: 0 8px 32px rgba(255,121,198,.2); }
.game-card.orange:hover  { box-shadow: 0 8px 32px rgba(255,184,108,.2); }
.game-card.cyan:hover    { box-shadow: 0 8px 32px rgba(139,233,253,.2); }

.game-card .game-emoji {
  font-size: 2rem;
  margin-bottom: .75rem;
}
.game-card .game-logo {
  width: 100%;
  height: 80px;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-card .game-logo img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}
.game-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.game-card p {
  font-size: .88rem;
  color: var(--comment);
  line-height: 1.5;
}

/* ============================================
   LINKS / EXPLORE SECTION
   ============================================ */
.explore {
  position: relative;
  padding: 5rem 0;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: var(--radius);
  background: rgba(68,71,90,.3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(248,248,242,.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -1px 0 rgba(0,0,0,.15),
    0 4px 24px rgba(0,0,0,.2);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  will-change: transform;
  cursor: pointer;
  overflow: hidden;
}
/* Shimmer highlight along the top */
.link-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12) 40%, rgba(255,255,255,.12) 60%, transparent);
  pointer-events: none;
}
.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  opacity: 0;
  transition: opacity var(--transition);
}
.link-card.purple::before { background: radial-gradient(circle at center, rgba(189,147,249,.12), transparent 70%); }
.link-card.green::before  { background: radial-gradient(circle at center, rgba(80,250,123,.12), transparent 70%); }
.link-card.pink::before   { background: radial-gradient(circle at center, rgba(255,121,198,.12), transparent 70%); }

.link-card:hover::before { opacity: 1; }
.link-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248,248,242,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 16px 48px rgba(0,0,0,.45);
}
.link-card.purple:hover { border-color: rgba(189,147,249,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 16px 48px rgba(189,147,249,.18); }
.link-card.green:hover  { border-color: rgba(80,250,123,.35);  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 16px 48px rgba(80,250,123,.18); }
.link-card.pink:hover   { border-color: rgba(255,121,198,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 16px 48px rgba(255,121,198,.18); }

.link-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.link-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: .4rem;
}
.link-card p {
  font-size: .9rem;
  color: var(--comment);
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */
.section-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 5;
  pointer-events: none;
}
.section-divider svg {
  display: block;
  width: 100%;
  height: auto;
}
.section-divider.top {
  top: -1px;
  bottom: auto;
}

/* ============================================
   SPLASH OVERLAY
   ============================================ */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  animation: splashPulse 1.2s ease-in-out;
}
.splash-emoji {
  font-size: 4rem;
  animation: splashBounce 1s ease;
}
.splash-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: splashTextIn .6s ease .35s forwards;
}
@keyframes splashBounce {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  50%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes splashTextIn {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

/* ============================================
   TYPING CURSOR
   ============================================ */
.hero-tagline .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--pink);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink .7s step-end infinite;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ============================================
   RESPONSIVE — splash-page specific
   ============================================ */
@media (max-width: 768px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
  }
  .hero-tux {
    width: 200px;
    opacity: .7;
    order: -1;
  }
  .hero-cta-row { justify-content: center; }
  .game-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: 1fr; }
}
