:root {
  /* Space the toolbar above the footer box on mobile.
     JS below will update this value to match the real footer height. */
  --footer-offset: 140px; /* fallback */
  --toolbar-gap: 16px; /* space between toolbar and footer box */
}

/* General */
body {
  padding-bottom: 160px;
}

#background {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100vh;
  background-size: cover;
  background-position: center center;
  z-index: -1;
}

/* Hero Section */
#hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100vh;
}

/* Make the hero container the positioning context */
#hero .hero-container {
  position: relative;
  width: 100%;
  height: 100%;
  padding-inline: clamp(16px, 5vw, 48px); /* side guard-rails for phones */
  box-sizing: border-box;
}

.hero-header {
  position: fixed;
  top: 25%;
  left: 28%;
  transform: translate(-50%, -50%);
  font-family: Arial, Helvetica, sans-serif;
}

.site-title {
  margin: 0;
  /* ↓ Shrinks more on phones: lower the MIN in clamp */
  font-size: clamp(3.2rem, 14vw, 6rem);
  line-height: 1.3;
  max-inline-size: min(14ch, 92vw); /* keep to two lines, never spill */
  font-family: Arial, Helvetica, sans-serif;
  word-wrap: break-word;
}

.site-title mark {
  background-color: #f4c430;
  padding: 0.05em 0.15em; /* tiny breathing room without bloating line-height */
}

/* CTA Button */
.cta-btn {
  margin: 16px;
  font-size: 40px;
  color: #ccc;
  text-transform: uppercase;
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  display: inline-block;
  overflow: hidden;
  transition: color 1s ease-in-out;
}

.cta-btn::before {
  content: attr(data-item);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: #f4c430;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
  opacity: 0;
  transition: clip-path 1s ease-in-out, opacity 0.5s ease-in-out;
}

.cta-btn:hover::before {
  clip-path: inset(0 0 0 0);
  opacity: 1;
}

/* Toolbar */
.toolbar {
  position: fixed;
  top: 90%;
  left: 12%;
  transform: translate(0, -50%);
  display: flex;
  justify-content: center;
  width: auto;
  z-index: 100;
}

.wrapper {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 50px;
  padding: 6px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.start-here,
.icon-group {
  display: flex;
  align-items: center;
}

.start-here p {
  font-weight: 600;
  font-size: 16px;
  padding: 5px;
  border-radius: 25px;
  white-space: nowrap;
}

.icon-group {
  gap: 6px;
}

/* Toolbar Icons */
.wrapper .icon,
.fab {
  margin: 0;
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  background: none;
  transition: 0.3s ease;
}

.wrapper .icon span,
.fab span {
  height: 45px;
  width: 45px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: black;
  transition: 0.3s ease;
}

.wrapper .icon:hover span,
.fab:hover span {
  background-color: rgba(0, 0, 0, 0.15);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
}

/* Icon hover colors */
.icon.gallery:hover ion-icon {
  color: #ff4081;
}
.icon.projects:hover ion-icon {
  color: #00aeef;
}
.icon.explore:hover ion-icon {
  color: #7d5fff;
}
.icon.email:hover ion-icon {
  color: #00c896;
}
.icon.fab:hover ion-icon {
  color: #f49f30;
}

/* HUB MODAL CONTAINER */
.hub-box {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 10px 10px 20px;
  border-radius: 22px;
  width: 320px;
  text-align: center;
  position: relative;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Title */
.hub-box h3 {
  margin-bottom: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* GRID (ICON MODE) */
.hub-grid.icon-mode {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 8px 0 14px;
}

/* ICON BUTTONS */
.hub-item {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s ease;
}

/* Entrance animation */
.hub-item:nth-child(2) { animation-delay: .05s; }
.hub-item:nth-child(3) { animation-delay: .1s; }

@keyframes hubPop {
  from { opacity: 0; transform: translateY(8px) scale(.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Icon */
.hub-item ion-icon {
  font-size: 20px;
  color: #333;
  transition: all 0.2s ease;
}

/* Hover lift */
.hub-item:hover {
  transform: translateY(-3px) scale(1.06);
  background: rgba(0,0,0,0.05);
}

/* TOOLBAR-STYLE COLOUR SYSTEM */

/* Dashboard */
.hub-item.dashboard:hover,
.hub-item.dashboard:hover ion-icon {
  color: #6C5CE7;
}

/* Games Hub */
.hub-item.games-hub:hover,
.hub-item.games-hub:hover ion-icon {
  color: #FF4ECD;
}

/* TOOLTIP LABEL (HOVER TEXT) */
.hub-label {
  position: absolute;
  top: -26px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.18s ease;
  color: #444;
  background: rgba(255,255,255,0.9);
  padding: 3px 8px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

/* Show label on hover */
.hub-item:hover .hub-label {
  opacity: 1;
  transform: translateY(0);
}

/* DISABLED STATE */
.hub-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.hub-item.disabled ion-icon {
  color: #777;
}

.hub-item.disabled .hub-label {
  opacity: 0.7;
}

/* Top-right close button */
.hub-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.06);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
}

.hub-close:hover {
  background: darkred;
  color: white;
}

/* Tooltip */
.tooltip {
  position: absolute;
  top: 0;
  background: #fff;
  color: black;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.icon:hover .tooltip,
.fab:hover .tooltip {
  opacity: 1;
  pointer-events: auto;
  top: -50px;
}

.tooltip::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: inherit;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

/* FAB & Social */
.fab-wrapper {
  position: relative;
}

.fab-checkbox {
  display: none;
}

.fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: black;
  font-size: 18px;
  border-radius: 50%;
  padding: 17px;
  z-index: 2;
  transition: all 0.3s ease;
  margin-left: 6px;
}

.fab::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: white;
  z-index: -1;
}

.fab-checkbox:checked + .fab {
  background: #f4c430;
  color: black;
}

.fab-checkbox:checked + .fab::before {
  width: 90%;
  height: 90%;
  background-color: rgba(255, 255, 255, 0.2);
}

.fab-wheel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7rem;
  height: 12rem;
  transform: scale(0) translateX(2rem);
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.fab-checkbox:checked ~ .fab-wheel {
  transform: scale(1) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.fab-action {
  position: absolute;
  background: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: black;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.fab-action .icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.fab-checkbox:checked ~ .fab-wheel .fab-action {
  opacity: 1;
  pointer-events: auto;
}

.fab-action ion-icon {
  font-size: 20px;
  line-height: 1;
}

/* Social icon hover colors */
.fab-action:hover ion-icon[name="logo-instagram"] {
  color: #e1306c;
}
.fab-action:hover ion-icon[name="logo-youtube"] {
  color: #ff0000;
}
.fab-action:hover ion-icon[name="logo-linkedin"] {
  color: #0077b5;
}

/* FAB actions positioning */
.fab-action-1 {
  top: -80px;
  left: 20px;
}
.fab-action-2 {
  top: -25px;
  left: 50px;
}
.fab-action-3 {
  top: 30px;
  left: 20px;
}

/* Footer */
.hero-content {
  position: fixed;
  bottom: 10px;
  right: 20px;
  max-width: 300px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: black;
  font: 16px Helvetica, sans-serif;
  letter-spacing: 1.2px;
  line-height: 1.8;
  z-index: 99;
}

/* Tablet & Mobile Adjustments */
@media screen and (max-width: 1024px) {
  .toolbar {
    top: 65%;
    left: 50%;
    transform: translate(-50%, 0);
  }

  .hero-content {
    /* layout & placement */
    position: fixed;
    bottom: calc(7vh + env(safe-area-inset-bottom));
    left: 50%;
    transform: translate(-50%, 0); /* center horizontally */
    width: 80%;
    max-width: 400px;
    padding: 20px;

    /* structure */
    display: flex; /* enable gap */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;

    /* style */
    color: #000;
    line-height: 1.45;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);

    /* fallback frost (no blur support) */
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.55);

    /* shimmer plumbing */
    overflow: hidden; /* clip shimmer to rounded corners */
    isolation: isolate;
    transition: background 0.25s ease, border-color 0.25s ease;
  }

  /* True frosted look (slightly less frosted) */
  @supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
    .hero-content {
      background: rgba(255, 255, 255, 0.45);
      -webkit-backdrop-filter: saturate(130%) blur(6px);
      backdrop-filter: saturate(130%) blur(6px);
      border: 1px solid rgba(255, 255, 255, 0.5);
      transition: background 0.25s ease, border-color 0.25s ease,
        -webkit-backdrop-filter 0.25s ease, backdrop-filter 0.25s ease;
    }
  }

  /* Typography inside the box */
  .hero-content p {
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.35px;
  }
  .hero-content .copyright {
    line-height: 1.8;
  }
  #footer-message {
    line-height: 1.35;
    min-height: calc(1em * 1.35); /* prevents height jump when rotating */
  }

  /* — Full-width shimmer across the entire card — */
  .hero-content > * {
    position: relative;
    z-index: 1;
  } /* keep text above */

  .hero-content::after {
    content: "";
    position: absolute;
    inset: 0; /* cover whole card */
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
      120deg,
      rgba(255, 255, 255, 0) 45%,
      rgba(255, 255, 255, 0.35) 50%,
      rgba(255, 255, 255, 0) 55%
    );
    background-size: 300% 100%;
    background-position: -150% 0; /* start off-left */
    transition: opacity 0.15s ease;
    z-index: 0;
  }

  .hero-content:hover::after,
  .hero-content:active::after,
  .hero-content:focus-within::after {
    opacity: 1;
    animation: cardShimmer 1.8s linear infinite;
  }

  @keyframes cardShimmer {
    to {
      background-position: 150% 0;
    } /* sweep to right edge */
  }

  /* Slight frost bump on interaction */
  .hero-content:hover,
  .hero-content:active,
  .hero-content:focus-within {
    background: rgba(255, 255, 255, 0.48);
    border-color: rgba(255, 255, 255, 0.58);
  }
  @supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))) {
    .hero-content:hover,
    .hero-content:active,
    .hero-content:focus-within {
      -webkit-backdrop-filter: saturate(140%) blur(7px);
      backdrop-filter: saturate(140%) blur(7px);
    }
  }

  /* Respect reduced motion */
  @media (prefers-reduced-motion: reduce) {
    .hero-content::after {
      animation: none !important;
      opacity: 0 !important;
    }
    .hero-content,
    .hero-content:hover,
    .hero-content:active,
    .hero-content:focus-within {
      transition: none;
    }
  }
}

@media screen and (max-width: 768px) {
  .tooltip {
    font-size: 11px;
    padding: 6px 10px;
    top: 60px;
  }

  .tooltip::before {
    width: 8px;
    height: 8px;
    bottom: -4px;
  }

  .fab-wheel {
    bottom: 65px; /* distance above FAB */
    top: auto; /* disable top if previously set */
    left: 10%;
    transform: scale(0) translateY(0);
    transform-origin: bottom center;
    flex-direction: column;
    align-items: center;
    width: auto;
    height: auto;
    opacity: 0;
    pointer-events: none;
    position: absolute; /* important for relative positioning */
  }

  .fab-checkbox:checked ~ .fab-wheel {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  /* Reset individual actions to stack vertically */
  .fab-action {
    position: static;
    margin: 6px 0;
    opacity: 1;
    pointer-events: auto;
    width: 2.5rem;
    height: 2.5rem;
  }

  .fab-action .icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }

  .fab-action ion-icon {
    font-size: 18px;
  }
}

@media screen and (max-width: 375px) {
  .hero-header {
    top: 25%;
    left: 30%;
  }

  .site-title {
    font-size: clamp(3.4rem, 16vw, 5.2rem);
    margin-left: clamp(8px, 3vw, 22px);
  }

  .toolbar {
    top: 63%;
  }

  .wrapper {
    padding: 9px 12px;
    border-radius: 25px;
  }

  .wrapper .icon span,
  .fab span {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .tooltip {
    font-size: 12px;
    padding: 7px 10px;
  }
}

@media screen and (max-width: 320px) {
  .hero-header {
    top: 25%;
    left: 35%;
  }

  .site-title {
    font-size: clamp(3.6rem, 17vw, 5rem);
    margin-left: clamp(8px, 3vw, 22px);
  }

  .wrapper {
    padding: 9px 12px;
    border-radius: 25px;
  }

  .wrapper .icon span,
  .fab span {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .tooltip {
    font-size: 12px;
    padding: 7px 10px;
  }
}
