/*
 * Hashtag Media Group — Project Showcase page styles.
 *
 * Ported verbatim from the source's HGP_CSS string (project-showcase.js).
 * The source injected these rules from JS to work around a widget sanitiser
 * that stripped the leading <style> tag. In the theme the section template
 * owns the DOM, so the rules ship here as normal CSS instead.
 *
 * Scoped to #hgpRoot exactly as the source authored them.
 * No class renames, no rule consolidation, no "improvements".
 */

/* ── reset inside the component ─────────────────────────── */
#hgpRoot,
#hgpRoot *,
#hgpRoot *::before,
#hgpRoot *::after { box-sizing: border-box }

#hgpRoot button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: none;
}
#hgpRoot button::before,
#hgpRoot button::after { content: none }

#hgpRoot svg {
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  max-width: none;
  width: auto;
  height: auto;
}

/* ── root section ────────────────────────────────────────── */
#hgpRoot {
  --cyan:     #66FCF1;
  --ink:      #1A1717;
  --sage:     #052926;
  --glass:    rgba(255,255,255,.08);
  --glass-bd: rgba(255,255,255,.16);
  --dim:      rgba(255,255,255,.70);
  --faint:    rgba(255,255,255,.46);
  --gut:      clamp(24px, 5.2vw, 96px);
  --ease:     cubic-bezier(.22,.61,.36,1);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow-x: hidden;
  max-width: 100vw;
  /* full-bleed breakout identical to source */
  width: 100vw;
  margin-left:  calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: clamp(60px, 7vw, 116px) 0;
  background:
    radial-gradient(120% 82% at 50% -8%, rgba(102,252,241,.18) 0%, rgba(102,252,241,0) 46%),
    linear-gradient(180deg, #0a514b 0%, #052926 38%, #062120 66%, #14201e 100%);
}

#hgpRoot::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(30% 24% at 82% 14%, rgba(102,252,241,.10), transparent 70%),
    radial-gradient(34% 26% at 10% 76%, rgba(11,42,58,.55), transparent 70%);
  animation: hgpDrift 26s ease-in-out infinite alternate;
}

#hgpRoot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .45;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,.25), transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,.30), transparent),
    radial-gradient(1.5px 1.5px at 85% 80%, rgba(255,255,255,.20), transparent),
    radial-gradient(1.5px 1.5px at 55% 50%, rgba(255,255,255,.22), transparent),
    radial-gradient(1.5px 1.5px at 10% 85%, rgba(255,255,255,.20), transparent);
  background-size: 600px 600px;
  animation: hgpRise 42s linear infinite;
}

@keyframes hgpDrift {
  0%   { transform: translate3d(0,0,0) }
  100% { transform: translate3d(-3%,2%,0) scale(1.06) }
}
@keyframes hgpRise {
  from { background-position: 0 0 }
  to   { background-position: 0 -600px }
}

/* ── WebGL canvas overlay (octopus) ──────────────────────── */
.hgp-octo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

/* ── inner wrapper ───────────────────────────────────────── */
.hgp-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ── section header ──────────────────────────────────────── */
.hgp-head {
  padding: 0 var(--gut);
  margin: 0 0 40px;
  max-width: 1500px;
}

.hgp-eyebrow {
  display: block;
  margin: 0 0 20px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: .85;
}

.hgp-title {
  margin: 0;
  padding: 0;
  text-indent: 0;
  font-weight: 800;
  font-size: clamp(38px, 6vw, 76px);
  letter-spacing: -.04em;
  line-height: 1.02;
  color: #fff;
}
.hgp-title .dot { color: var(--cyan) }

.hgp-sub {
  margin: 24px 0 0;
  padding: 0;
  text-indent: 0;
  font-weight: 300;
  color: var(--dim);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.7;
  max-width: 58ch;
}

/* ── category nav chips ──────────────────────────────────── */
.hgp-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 32px 0 0;
  padding: 0 var(--gut);
}

.hgp-chip {
  margin: 0;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--glass) !important;
  color: #fff !important;
  border: 1px solid var(--glass-bd) !important;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px !important;
  cursor: pointer;
  line-height: 1;
  text-transform: none !important;
  letter-spacing: normal;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-appearance: none;
  appearance: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: .25s var(--ease);
  white-space: nowrap;
}
.hgp-chip::before,
.hgp-chip::after { content: none !important; display: none !important }
.hgp-chip:hover  { border-color: var(--cyan) !important; color: var(--cyan) !important; transform: translateY(-1px) }
.hgp-chip--on    { background: var(--cyan) !important; color: var(--ink) !important; border-color: var(--cyan) !important }

/* ── rows container ──────────────────────────────────────── */
.hgp-rows {
  margin: 38px 0 0;
  display: flex;
  flex-direction: column;
  gap: clamp(42px, 4.6vw, 68px);
}

/* row reveal — js class added by IntersectionObserver */
html.js .hgp-row    { opacity: 0; transform: translateY(30px); transition: opacity .85s var(--ease), transform .85s var(--ease) }
html.js .hgp-row.hgp-in { opacity: 1; transform: none }

/* ── row header ──────────────────────────────────────────── */
.hgp-rowhead {
  padding: 0 var(--gut);
  margin: 0 0 22px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.hgp-rowtitle {
  margin: 0;
  padding: 0;
  text-indent: 0;
  font-weight: 700;
  font-size: clamp(21px, 2.5vw, 30px);
  letter-spacing: -.02em;
  color: #fff;
}

.hgp-rowcount {
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--faint);
}

/* ── scrollable track ────────────────────────────────────── */
.hgp-rowscroll { position: relative }

.hgp-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px var(--gut) 20px;
  scroll-snap-type: x proximity;
  scroll-padding-inline-start: var(--gut);
  scroll-padding-left: var(--gut);
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  /* hand vertical scroll back to the page on touch — exact source rule */
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.hgp-track::-webkit-scrollbar { display: none }
.hgp-track.hgp-drag { cursor: grabbing; scroll-snap-type: none }

/* ── project cards ───────────────────────────────────────── */
.hgp-cardwrap {
  flex: 0 0 auto;
  width: clamp(198px, 23vw, 274px);
  scroll-snap-align: start;
}

html.js .hgp-cardwrap {
  opacity: 0;
  transform: translateY(22px) scale(.97);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
html.js .hgp-row.hgp-in .hgp-cardwrap {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i,0) * 60ms);
}

.hgp-card {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--glass-bd);
  background: linear-gradient(140deg, #0a302d, #05201e);
  box-shadow: 0 16px 34px rgba(0,0,0,.36);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
  -webkit-user-drag: none;
}

.hgp-card__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .7s var(--ease);
  transform: scale(1.02);
}

.hgp-card__grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,9,9,.92) 0%, rgba(2,9,9,.4) 34%, rgba(2,9,9,0) 62%);
}

.hgp-card__tags {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

/* ink on cyan — source note: changed from white-on-cyan */
.hgp-tag {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink) !important;
  background: rgba(102,252,241,.94);
  padding: 4px 9px;
  border-radius: 6px;
  line-height: 1.3;
}

.hgp-card__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 0 18px 18px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
  text-shadow: 0 2px 12px rgba(0,0,0,.65);
  transition: transform .4s var(--ease);
}

.hgp-card__go {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.hgp-card__go svg {
  width: 14px !important;
  height: 14px !important;
  display: inline-block !important;
  fill: none !important;
  stroke: currentColor !important;
  max-width: none !important;
}

/* colour overrides — source used !important throughout to win over theme */
#hgpRoot a.hgp-card,
#hgpRoot a.hgp-card:link,
#hgpRoot a.hgp-card:visited,
#hgpRoot a.hgp-card:hover,
#hgpRoot a.hgp-card:focus,
#hgpRoot a.hgp-card:active    { color: #fff !important }
#hgpRoot .hgp-card .hgp-card__label { color: #fff !important; -webkit-text-fill-color: #fff !important }
#hgpRoot .hgp-card .hgp-card__go   { color: var(--cyan) !important; -webkit-text-fill-color: var(--cyan) !important }

/* hover / focus state */
.hgp-card:hover,
.hgp-card:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(102,252,241,.6);
  box-shadow: 0 26px 52px rgba(0,0,0,.52), 0 0 0 1px rgba(102,252,241,.4);
}
.hgp-card:hover .hgp-card__img,
.hgp-card:focus-visible .hgp-card__img  { transform: scale(1.08) }
.hgp-card:hover .hgp-card__tags,
.hgp-card:focus-visible .hgp-card__tags { opacity: 1; transform: none }
.hgp-card:hover .hgp-card__label,
.hgp-card:focus-visible .hgp-card__label { transform: translateY(-26px) }
.hgp-card:hover .hgp-card__go,
.hgp-card:focus-visible .hgp-card__go   { opacity: 1; transform: translateY(0) }

/* ── prev/next arrows ────────────────────────────────────── */
.hgp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  margin: 0;
  padding: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  max-height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  line-height: 0;
  user-select: none;
  background: rgba(4,20,18,.5);
  border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
  transition:
    opacity .25s var(--ease),
    background .25s var(--ease),
    border-color .25s var(--ease),
    transform .25s var(--ease);
  opacity: 0;
}
.hgp-rowscroll:hover .hgp-arrow { opacity: .9 }
.hgp-arrow:hover  { opacity: 1; background: rgba(102,252,241,.92); color: var(--ink); border-color: var(--cyan) }
.hgp-arrow:active { transform: translateY(-50%) scale(.94) }
.hgp-arrow svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  max-width: none !important;
}
.hgp-arrow::before,
.hgp-arrow::after { content: none !important; display: none !important }
.hgp-prev { left:  max(10px, calc(var(--gut) - 22px)) }
.hgp-next { right: max(10px, calc(var(--gut) - 22px)) }
.hgp-arrow.hgp-hide         { opacity: 0 !important; pointer-events: none }
.hgp-row.hgp-noflow .hgp-arrow { display: none }

/* ── focus rings ─────────────────────────────────────────── */
.hgp-card:focus-visible,
.hgp-chip:focus-visible,
.hgp-arrow:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px }

/* ── no-JS fallback list ─────────────────────────────────── */
.hgp-fallback { padding: 0 var(--gut); margin: 38px 0 0 }
.hgp-fallback h3 {
  margin: 0 0 18px;
  font-weight: 700;
  font-size: clamp(21px, 2.5vw, 30px);
  letter-spacing: -.02em;
  color: #fff;
}
.hgp-fallback ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.hgp-fallback li { margin: 0 }
.hgp-fallback a {
  display: block;
  padding: 16px 18px;
  border-radius: 14px;
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--glass-bd);
  color: #fff !important;
  font-weight: 600;
  font-size: 16px;
  transition: .25s var(--ease);
}
.hgp-fallback a:hover { border-color: var(--cyan); color: var(--cyan) !important }
.hgp-fallback span   { display: block; margin-top: 5px; font-weight: 400; font-size: 12.5px; color: var(--faint) }

/* ── responsive ──────────────────────────────────────────── */
/* touch: hide arrows (source: @media (hover:none)) */
@media (hover: none) { .hgp-arrow { display: none } }

/* narrow cards */
@media (max-width: 560px) { .hgp-cardwrap { width: 56vw } }

/* <861px: hide WebGL overlay, drop backdrops, kill star animation */
@media (max-width: 860px) {
  .hgp-octo { display: none !important }
  .hgp-chip,
  .hgp-arrow { -webkit-backdrop-filter: none !important; backdrop-filter: none !important }
  #hgpRoot::after  { display: none }
  #hgpRoot::before { animation: none }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  #hgpRoot::before,
  #hgpRoot::after { animation: none }
  html.js .hgp-row,
  html.js .hgp-cardwrap { opacity: 1; transform: none; transition: none }
  .hgp-card,
  .hgp-card__img,
  .hgp-card__label,
  .hgp-card__go,
  .hgp-card__tags { transition: none }
}
