/* ============================================================
   Cold North Entertainment — hub styles
   Palette derived from the logo.
   ============================================================ */
:root {
  --frost:    #EAF6FC;
  --ice:      #BCE6F6;
  --cyan:     #3FC4ED;   /* primary */
  --arctic:   #1E93D8;
  --deep:     #1656A8;
  --indigo:   #3A3A8C;   /* accent */
  --ink:      #0A0D12;   /* background / outlines */
  --ink-2:    #11161F;   /* raised panels */
  --ink-3:    #0d1117;

  --grad: linear-gradient(180deg, var(--ice) 0%, var(--cyan) 38%, var(--arctic) 70%, var(--deep) 100%);
  --grad-h: linear-gradient(90deg, var(--cyan), var(--indigo));

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Always reserve the scrollbar gutter so the layout width never changes
     when content height shifts or the lightbox locks scrolling.
     (overflow-y: scroll is the broad-support fallback for scrollbar-gutter.) */
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--frost);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Frozen aurora glow behind everything ---------------------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 45% at 20% 12%, rgba(63,196,237,0.18), transparent 70%),
    radial-gradient(55% 50% at 85% 20%, rgba(58,58,140,0.22), transparent 70%),
    radial-gradient(70% 60% at 50% 110%, rgba(22,86,168,0.20), transparent 70%);
  pointer-events: none;
}

/* Layout ---------------------------------------------------- */
.hub {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) clamp(1.25rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
}

/* Brand / hero ---------------------------------------------- */
.brand { text-align: center; }

.logo {
  width: min(620px, 86vw);
  height: auto;
  filter: drop-shadow(0 8px 26px rgba(63,196,237,0.28));
}

.logo-fallback {
  display: none;          /* shown only if the image fails to load */
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 0 rgba(0,0,0,0.4);
}
.logo-fallback span {
  display: block;
  font-size: 0.3em;
  letter-spacing: 0.42em;
  margin-top: 0.35em;
  margin-left: 0.42em;
}

.tagline {
  margin-top: 1.25rem;
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ice);
  opacity: 0.82;
}

/* Division grid --------------------------------------------- */
.divisions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.9rem, 1.8vw, 1.4rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--ink-2), var(--ink-3));
  border: 1px solid rgba(63,196,237,0.16);
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Gradient accent bar along the top */
.card__tiles {
  display: block;
  height: 8px;
  width: 100%;
  background: var(--grad-h);
  opacity: 0.95;
  /* round the top corners since the card no longer clips them */
  border-top-left-radius: 13px;
  border-top-right-radius: 13px;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.4rem 1.6rem;
  flex: 1;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card__desc {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ice);
  opacity: 0.72;
}

.card__cta {
  margin-top: auto;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* Card subtitle (e.g. Tattoo credential) -------------------- */
.card__subtitle {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
  opacity: 0.8;
  margin-top: -0.15rem;
}

/* Two-link card body (Tattoo) ------------------------------- */
.card__links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.4rem;
}
.card__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cyan);
  text-decoration: none;
  line-height: 1.3;
  transition: color 0.2s ease;
}
.card__links a:hover,
.card__links a:focus-visible {
  color: var(--frost);
  text-decoration: underline;
  outline: none;
}
.card__linklabel {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ice);
  opacity: 0.6;
  margin-bottom: 0.15rem;
}
/* Icon links (Music) ---------------------------------------- */
.card__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.7rem;
}
.icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(63, 196, 237, 0.08);
  border: 1px solid rgba(63, 196, 237, 0.18);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.icon-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.icon-link:hover,
.icon-link:focus-visible {
  color: var(--frost);
  background: rgba(63, 196, 237, 0.16);
  border-color: var(--cyan);
  transform: translateY(-2px);
  outline: none;
}

/* Custom fast tooltip (replaces the slow native title tooltip) */
.icon-link[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: var(--ink-2);
  color: var(--frost);
  border: 1px solid rgba(63, 196, 237, 0.30);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease, transform 0.1s ease;
  z-index: 5;
}
.icon-link[data-tip]:hover::after,
.icon-link[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* The whole card lifts on hover, but only the inner links are clickable */
.card--links { cursor: default; }

/* Live cards (clickable) ------------------------------------ */
.card--live { cursor: pointer; }

.card--live:hover,
.card--live:focus-visible {
  transform: translateY(-6px);
  border-color: var(--cyan);
  box-shadow: 0 14px 40px rgba(63,196,237,0.22);
  outline: none;
}
.card--live:hover .card__cta { color: var(--frost); }

/* Coming-soon cards (inert) --------------------------------- */
.card--soon {
  opacity: 0.62;
  cursor: default;
}
.card--soon .card__tiles { filter: grayscale(0.4); opacity: 0.5; }
.card--soon .card__cta {
  color: var(--ice);
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.card--soon .card__cta::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 8px var(--indigo);
}

/* Footer ---------------------------------------------------- */
.foot {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--ice);
  opacity: 0.5;
}

/* Responsive ------------------------------------------------ */
@media (max-width: 860px) {
  .divisions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .divisions { grid-template-columns: 1fr; }
  .card { min-height: 0; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .card--live:hover, .card--live:focus-visible { transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Design gallery page (carousel + lightbox)
   ============================================================ */
/* Full-width top bar — anchored to the window edges, independent of the
   centered content band below it. */
.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: clamp(1.1rem, 3vw, 1.9rem) clamp(1.5rem, 5vw, 3.5rem);
}
.topbar .home {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--cyan);
  text-decoration: none;
}
.topbar .home:hover { color: var(--frost); }
.topbar img { height: 84px; width: auto; display: block; }

.page {
  position: relative;
  z-index: 1;
  width: 100%;            /* fill the viewport width instead of shrinking to content */
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(0.5rem, 2vw, 1.5rem) clamp(1.25rem, 4vw, 3rem) 4rem;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3rem);
  text-align: center;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.3rem;
}
.page-sub {
  text-align: center;
  color: var(--ice);
  opacity: 0.7;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

/* Carousel */
.carousel { width: 100%; }
.carousel__frame {
  position: relative;
  width: 100%;
  height: clamp(320px, 58vh, 640px);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-3));
  border: 1px solid rgba(63, 196, 237, 0.16);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.carousel__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.carousel__img.is-ready { opacity: 1; }

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 13, 18, 0.55);
  color: var(--frost);
  border: 1px solid rgba(63, 196, 237, 0.30);
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}
.carousel__btn:hover { background: rgba(63, 196, 237, 0.2); border-color: var(--cyan); }
.carousel__btn svg { width: 24px; height: 24px; fill: currentColor; }
.carousel__btn--prev { left: 14px; }
.carousel__btn--next { right: 14px; }

.carousel__counter {
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  color: var(--ice);
  opacity: 0.75;
  font-size: 0.9rem;
}

.carousel__thumbs {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.carousel__thumb {
  width: 72px;
  height: 54px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--ink-2);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.carousel__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel__thumb:hover { opacity: 1; }
.carousel__thumb.is-active { opacity: 1; border-color: var(--cyan); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 10, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }

/* natural size, OR fit to window — whichever is smaller (no upscaling) */
.lightbox__img {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 13, 18, 0.6);
  border: 1px solid rgba(63, 196, 237, 0.30);
  color: var(--frost);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox__btn:hover { background: rgba(63, 196, 237, 0.2); border-color: var(--cyan); }
.lightbox__btn svg { width: 26px; height: 26px; fill: currentColor; }
.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 13, 18, 0.6);
  border: 1px solid rgba(63, 196, 237, 0.30);
  color: var(--frost);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox__close:hover { background: rgba(63, 196, 237, 0.2); border-color: var(--cyan); }

.lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ice);
  opacity: 0.8;
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  .lightbox__btn { width: 44px; height: 44px; }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
}
