/* ============================================================
   MAIN.CSS — Production Build
   ============================================================ */

/* FONTS */
@font-face {
  font-family: HostGrotesk;
  src: url(/css/hg.ttf);
  font-display: swap;
}

/* ANIMATIONS */
@keyframes scaleFadeIn {
  from { transform: scale(.95) translateY(100px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);     opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .scaleFadeIn-anim,
  .scaleFadeInRev-anim { animation: none; }
}

.scaleFadeIn-anim    { animation: scaleFadeIn .5s cubic-bezier(0, .65, .25, 1) both; }
.scaleFadeInRev-anim { animation: scaleFadeIn .1s cubic-bezier(0, .65, .25, 1) reverse both; }

/* ============================================================
   THEMES
   ============================================================ */
.theme-light {
  --primary:  #fff;
  --secondary: #d9d9d9;
  --theme:    #0d1bff;
  --font:     #333;
  --font2:    #5c5c5c;
  --shadow:   rgba(0, 6, 117, .2);
  --trans:    rgba(255, 255, 255, .8);
}

.theme-dark {
  --primary:  #000;
  --secondary: #262626;
  --theme:    #3158f9;
  --font:     #efefef;
  --font2:    #c6c6c6;
  --shadow:   rgba(171, 173, 220, .2);
  --trans:    rgba(0, 0, 0, .8);
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
#cursor {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  z-index: 9999;
  backdrop-filter: invert(1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s;
  will-change: transform;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

input, fieldset, button, h1, h2, h3, textarea, frame { all: unset; }

/* ============================================================
   CORE ELEMENTS
   ============================================================ */
html, button {
  font-family: HostGrotesk, sans-serif;
  font-size: 16px;
  --header-height: 76px;
}

body {
    width:100vw;
  width: 100dvw;
  height:100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--primary);
  color: var(--font);
  scrollbar-color: var(--secondary) rgba(0, 0, 0, 0);
}

h1 {
  display: block;
  padding: 16px 0;
  font-size: 36px;
  color: var(--font);
  text-transform: uppercase;
  font-weight: 900;
}

h2 {
  display: block;
  font-size: 24px !important;
}

h3 { color: var(--font2); }

p {
  font-size: 18px;
  margin: 24px 0;
}

button {
  border-radius: 100vmax;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor:pointer;
}

a {
  text-decoration: none;
  border-radius: 100vmax;
  color: var(--theme);
}

svg {
  display: flex;
  width: 32px;
  height: 32px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg.stroke {
  stroke-width: 4px;
  stroke: var(--font2);
  fill: none;
}

svg.fill {
  stroke: none;
  fill: var(--font2);
}

img {
  opacity: 0;
  transition: opacity .5s;
}

img.loaded { opacity: 1 !important; }

/* ============================================================
   INTERACTIVE ELEMENTS
   ============================================================ */
button, a, input, label, textarea {
  transition: filter .2s, transform .2s;
}

input, textarea {
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 16px;
  background: var(--secondary);
  border-radius: 12px;
  font-size: 16px;
  color: var(--font);
  font-family: HostGrotesk, sans-serif;
  border: 2px solid transparent;
  cursor:text;
}

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 5px var(--theme);
}

button:active,
a:active,
input:active,
textarea:active {
  transform: scale(.95);
  filter: brightness(.9);
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 5px var(--theme);
  transition: none;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.flex-row     { display: flex; flex-flow: row; gap: 16px; }
.flex-col     { display: flex; flex-direction: column; }
.flex-center  { align-items: center; justify-content: center; align-self: center; justify-self: center; }
.flex-between { align-items: center; justify-content: space-between; }
.pill         { border-radius: 2rem; }
.glass        { background: var(--trans); backdrop-filter: blur(3px); }
.abs-fill     { position: absolute; width: 100%; height: 100%; }
.grid-center  { display: grid; place-items: center; }
.icon-sm svg  { width: 16px; height: 16px; }
.icon-lg svg  { width: 48px; height: 48px; }
.gap-sm       { gap: 8px; }
.gap-md       { gap: 16px; }
.gap-lg       { gap: 32px; }

/* ============================================================
   LAYOUT
   ============================================================ */
#scroll-container {
  width: 100vw;
  width:100dvw;
  height: 100vh;
  height:100dvh;
  overflow: hidden scroll;
}

header {
  width: 100%;
  height: var(--header-height);
  padding: 8px 16px;
  position: sticky;
  top: 0;
  display: flex;
  border-bottom: 1px solid var(--secondary);
  z-index: 999;
}

footer {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  padding: 8vh 16px 16px;
}

.footer-copyright {
  font-size: 12px;
  text-transform: uppercase;
}

/* ============================================================
   MAIN ARTICLE
   ============================================================ */
.main-pad {
  padding: 5vh 32px 32px;
  display: flex;
  flex-flow: column;
  width: 100%;
  min-height:calc(100vh - var(--header-height));
  min-height:calc(100dvh - var(--header-height));
  position: relative;
  height: auto;
  overflow: visible;
}

.main-pad p { margin: 8px 0; }

#main-content {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-flow: column;
  flex-grow: 1;
}

/* ============================================================
   NAV
   ============================================================ */
.nav-container { display: flex; }

.logo {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 4px;
  font-size: 24px;
  color: var(--font);
}

.logo svg {
  width: 100%;
  height: 100%;
  fill: var(--font);
  stroke: none;
}

.logo .tm {
  height: 32px;
  font-size: 14px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-banner {
  width: 100%;
  height: calc(100vh - 184px);
  height: calc(100dvh - 184px);
  border-radius: 32px;
  display: flex;
  flex-flow: column;
  gap: 32px;
  align-items: center;
  justify-content: center;
  font-size: calc(3vw + 3vh);
  z-index: 0;
}

.hero-title {
  text-align: center;
  text-wrap: balance;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--font);
}

#hero-media { object-fit: cover; }

#ripple-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

#mute-button[data-muted="true"]  .icon-unmuted { display: none; }
#mute-button[data-muted="false"] .icon-muted   { display: none; }

.hero-container {
  width: 100%;
  display: flex;
  flex-flow: column;
  gap: 16px;
  justify-content: center;
  transition: opacity .5s, filter .5s;
}

/* ============================================================
   CARD
   ============================================================ */
.card {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-self: center;
  align-self: center;
  overflow: hidden;
  background: var(--secondary);
  border-radius: 16px;
  border: 1px solid var(--secondary);
}

.card.square-ratio img { aspect-ratio: 1 / 1; }
.card.rect-ratio   img { aspect-ratio: 16 / 9; }

.card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-header {
  text-align: center;
  z-index: 1;
  font-size: 28px;
  color: var(--font);
  padding: 16px 24px;
}

.card-header {
  padding: 16px 24px;
  color: var(--font);
  font-size: 20px;
  text-align: start;
  width: 100%;
}

/* CTA buttons */
button.cta, a.cta, input.cta {
  background: var(--theme) !important;
  color: var(--primary);
  padding: 12px 16px;
  border-radius: 100vmax;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  fill: var(--primary);
  font-size: 20px;
  justify-content: center;
  align-self: center;
}

.cta-2 {
  background: var(--trans);
  color: var(--font);
  border: 2px solid var(--secondary);
  backdrop-filter: blur(3px);
  padding: 12px 16px;
  border-radius: 100vmax;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  fill: var(--font);
  font-size: 16px;
}

/* ============================================================
   CARDS GRID
   ============================================================ */
.cards-container {
  display: grid;
  align-content: start;
  justify-content: center;
  gap: 16px;
}

.cards-container.grid-fit  { grid-template-columns: repeat(auto-fit,  minmax(350px, 1fr)); }
.cards-container.grid-fill { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }

/* ============================================================
   ARTICLE IMAGES
   ============================================================ */
.article-img-container {
  max-height: 100vh;
  width: 100%;
  padding: 16px;
  display: grid;
  justify-content: center;
}

.article-img {
  max-height: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

/* ============================================================
   404
   ============================================================ */
.container-404 {
  width: 100%;
  height: 100%;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
}

#play-button {
  width: 32px;
  height: 32px;
  overflow: hidden;
  opacity: .05;
}

/* ============================================================
   NOW PLAYING BAR
   ============================================================ */
#master-now-playing {
  width: 25vw;
  min-width: max-content;
  position: fixed;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-flow: row;
  visibility: hidden;
  padding: 8px;
  gap: 16px;
  background: var(--secondary);
  justify-self: center;
}

#master-now-playing.np-visible { visibility: visible; }

.np-nav         { display: flex; }
.np-nav button  { padding: 8px; }

#npRippleCanvas { width: 48px; height: 48px; }

#npScrubTrack {
  position: relative;
  width: 100%;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#npScrubLine {
  position: relative;
  width: 100%;
  height: 4px;
  background: var(--primary);
  pointer-events: none;
}

#npScrubFill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--theme);
  pointer-events: none;
}

#npScrubDot {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--font);
  cursor: grab;
}

#npScrubDot:active { cursor: grabbing; }

.np-scrub    { display: flex; }
.scrubControls { width: 100%; }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrapper {
  display: flex;
  flex-flow: row;
  align-items: center;
  gap: 8px;
  padding: 4px;
  padding-left: 12px;
}

.wire-search-btn {
  padding: 10px !important;
  border-radius: 50% !important;
}

.wire-search-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--font);
  stroke: none;
}

.wire-search-btn[data-active="true"] { background: var(--theme) !important; }

#wire-search-island {
  visibility: hidden;
  position: fixed;
  bottom: 16px;
  margin-inline: auto;
  display: flex;
  justify-self: center;
  align-items: center;
  padding-right: 16px;
  background: var(--trans);
  backdrop-filter: blur(12px);
  border: 1px solid var(--secondary);
  border-radius: 100vmax;
  z-index: 1000;
}

#wire-search-canvas { width: 56px; height: 56px; }

#wire-search {
  height: 100%;
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 500px) {
  .main-pad {
    padding: 5vh 15vw !important;
  }
  .cards-container {
    gap: 2vw 3vh;
  }
  #site-search {
    display: revert;
  }
}

@media (max-width: 500px) {
  #site-search { display: none; }
}
