/*
Theme Name: TT4 Anh Child
Template: twentytwentyfour
Version: 1.1
*/

/* =========================================================
   BASE — FULL BLEED RESET
========================================================= */

html,
body {
  height: 100%;
  margin: 0;
  background: #000;
}

/* Kill TT4 layout constraints */
.wp-site-blocks,
.wp-site-blocks > *,
main.wp-block-group {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

/* Hide default TT4 header/footer */
header.wp-block-template-part,
footer.wp-block-template-part {
  display: none !important;
}

/* =========================================================
   FILM EXPERIENCE WRAPPER + TYPE
========================================================= */

#filmExperience {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  line-height: 1.45;
  letter-spacing: 0.015em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* small UI type */
#uiLayer,
#uiLayer button,
#uiLayer a {
  font-size: 16px;
  letter-spacing: 0.06em;
  font-weight: 300;
  text-transform: none;
}

/* Keep inputs/selectors usable */
#filmExperience input,
#filmExperience textarea,
#filmExperience select,
#filmExperience button,
#filmExperience a {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

/* Optional: block tap highlight */
#filmExperience * {
  -webkit-tap-highlight-color: transparent;
}

/* Global typography */
#filmExperience {
  font-family: "Cormorant Garamond", serif;
  font-style: normal;
}

/* =========================================================
   VIDEO BACKGROUND
========================================================= */

#videoLayer {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: filter 1000ms ease, transform 1000ms ease;
}

#vimeoPlayer {
  position: absolute;
  inset: 0;
}

#vimeoPlayer iframe {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 100vw !important;
  height: 56.25vw !important;
  min-width: 177.78vh !important;
  min-height: 100vh !important;
  pointer-events: none !important;
}

/* Dim layer (credits/browse) */
#dimLayer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 950ms ease;
  pointer-events: none;
  z-index: 1;
}

/* When UI is visible (NOT ui-hidden), apply subtle dim */
#filmExperience:not(.ui-hidden) #dimLayer {
  background: rgba(0, 0, 0, 0.2);
}

/* =========================================================
   UI OVERLAY
========================================================= */

#uiLayer {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 22px;
  padding-top: 10px !important;
  pointer-events: none;
  overflow: visible;
}

/* Top bar */
#uiLayer .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative !important;
  min-height: 56px !important;
  opacity: 1;
  transition: opacity 950ms ease;
}

/* Bottom bar */
#uiLayer .bottom {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 13px;
  height: 40px;
  overflow: visible;
  opacity: 1;
  transition: opacity 950ms ease;
}

/* Buttons & links */
#uiLayer a,
#uiLayer button {
  pointer-events: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px 8px;
  line-height: 1;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 300;
}

#uiLayer a:hover,
#uiLayer button:hover {
  opacity: 0.7;
}

#uiLayer a:focus-visible,
#uiLayer button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

/* =========================================================
   TOP LAYOUT — CURRENT EFFECTIVE STATE
========================================================= */

/* Neutralize legacy .left wrapper positioning */
#uiLayer .top .left {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-transform: none !important;
}

/* Top-left title */
#filmTitle {
  position: absolute !important;
  left: 22px !important;
  top: 6px !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;

  font-family: inherit !important;
  font-size: 13px !important;
  letter-spacing: 0.06em !important;
  text-transform: none !important;
  font-weight: 300 !important;

  opacity: 0.92;
  white-space: nowrap;
  max-width: 45vw;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 6;
}

/* Top-center logo */
#siteTitle {
  position: absolute !important;
  left: 50% !important;
  top: 0 !important;
  transform: translateX(-50%) !important;
  z-index: 7;
}

#siteLogo {
  height: 64px !important;
  width: auto !important;
  display: block;
}

/* Top-right Vimeo container */
#uiLayer .top .right {
  position: absolute !important;
  right: 22px !important;
  top: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* =========================================================
   VIEW ON VIMEO — HOVER UNDERLINE
========================================================= */

#uiLayer a.viewOnVimeo,
#uiLayer a#viewOnVimeo,
#uiLayer .top .right a {
  position: relative;
  display: inline-block !important;
  text-decoration: none !important;
  margin: 0 !important;
  padding: 0 0 6px 0 !important;
  line-height: 1 !important;
  vertical-align: top !important;
}

#uiLayer a.viewOnVimeo::after,
#uiLayer a#viewOnVimeo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms ease;
}

#uiLayer a.viewOnVimeo:hover::after,
#uiLayer a#viewOnVimeo:hover::after {
  transform: scaleX(1);
}

/* =========================================================
   CENTER BROWSE BUTTON
========================================================= */

#browseBtn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 1.2s ease, transform 250ms ease;
}

#browseBtn:focus {
  outline: none;
}

#browseBtn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: 3px;
}

#browseBtn:hover {
  transform: translate(-50%, -50%) scale(1.18);
}

#browseBtn .browseIcon {
  width: 28px;
  height: 28px;
  display: block;
  pointer-events: none;
  transform-origin: center;
}

#browseBtn:hover .browseIcon {
  animation: browseSpin 1.2s linear infinite;
}

#browseBtn {
  overflow: visible;
}

#browseTooltip {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(10px, 14px);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;

  color: #fff;
  font-family: 'Inter', Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  font-weight: 400;
  font-size: 9px;
  line-height: 1;

  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;

  border: 1px solid rgba(255, 255, 255, 0.6);

  z-index: 999;
  transition: opacity 120ms ease;
}

#browseBtn:hover + #browseTooltip,
#browseBtn:focus-visible + #browseTooltip {
  opacity: 0.92;
}

@keyframes browseSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   BOTTOM BUTTON POSITIONS
========================================================= */

#creditsBtn {
  position: absolute;
  left: 0;
  bottom: 0;
}

/* =========================================================
   FLAT MINIMAL MENU BUTTON (About)
========================================================= */

#menuBtn {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 32px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.8) !important;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  color: #1a1a1a !important;
  transition: opacity 300ms ease, transform 200ms ease;
}

#menuBtn:hover {
  opacity: 0.85;
  transform: translateX(-50%) scale(1.04);
}

/* Two flat lines */
.menuFlatIcon {
  position: relative;
  width: 10px;
  height: 5px;
}

.menuFlatIcon::before,
.menuFlatIcon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 1) 50%,
    rgba(0, 0, 0, 0.15) 100%
  );
  background-size: 200% 100%;
  background-position: 0% 0%;
}

.menuFlatIcon::before {
  top: 0;
}

.menuFlatIcon::after {
  bottom: 0;
}

@keyframes menuScanLR {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

#menuBtn:hover .menuFlatIcon::before {
  animation: menuScanLR 900ms linear infinite;
}

#menuBtn:hover .menuFlatIcon::after {
  animation: menuScanLR 900ms linear infinite;
  animation-delay: -450ms;
}

/* =========================================================
   BROWSE OVERLAY
========================================================= */

#browseOverlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 0 90px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  transition: opacity 500ms ease, visibility 0s linear 500ms;
}

#browseOverlay::-webkit-scrollbar {
  display: none;
}

#browseOverlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 1200ms ease, visibility 0s;
}

#thumbRow {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  width: max-content;
  margin: 0 auto;
  overflow: visible;
  padding: 0;
}

#thumbRow::-webkit-scrollbar {
  display: none;
}

/* =========================================================
   THUMB HOVER EFFECT — DESATURATE → COLOR + PLAY ICON
========================================================= */

.thumbItem {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
}

.thumbItem:hover {
  z-index: 5;
}

.thumb {
  position: relative;
  width: 310px;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 1px solid #cecccc;
  box-sizing: border-box;
  filter: grayscale(100%) brightness(1.1) contrast(0.9);
  transition: transform 220ms ease, filter 350ms ease;
}

.thumbItem:hover .thumb {
  filter: grayscale(0%) brightness(1) contrast(1);
  transform: scale(1.05);
}

.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 250ms ease;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05),
    rgba(0, 0, 0, 0.25)
  );
}

.thumbItem:hover .thumb::after {
  opacity: 1;
}

.thumb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-left: 18px solid #ffffff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  opacity: 0;
  transition: opacity 250ms ease;
}

.thumbItem:hover .thumb::before {
  opacity: 0.95;
}

/* =========================================================
   THUMB META
========================================================= */

.thumbMeta {
  margin-bottom: 14px;
}

.thumbNum {
  margin-bottom: 6px;
  opacity: 0.55;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.thumbTitle {
  font-size: 15px;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

/* =========================================================
   CREDITS OVERLAY
========================================================= */

#creditsOverlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  transition: opacity 500ms ease, visibility 0s linear 500ms;
}

#creditsOverlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
  transition: opacity 1200ms ease, visibility 0s;
}

#creditsContent {
  max-width: 720px;
  max-height: 70vh;
  overflow: auto;
  padding: 0 0 80px 0;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1.35;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 300;
  letter-spacing: 0.02em;
  pointer-events: auto;
}

#creditsContent p {
  margin: 0 0 5px 0;
  opacity: 0.92;
}

#creditsContent p:last-child {
  margin-bottom: 0;
}

/* Credits headings */
#filmExperience h1,
#filmExperience h2,
#filmExperience h3,
#filmExperience h4,
#filmExperience h5,
#filmExperience h6 {
  color: #ffffff !important;
  font-weight: 700;
}

/* Credits button underline */
#uiLayer button#creditsBtn {
  position: relative;
  display: inline-block;
  text-decoration: none !important;
  padding-bottom: 6px;
}

#uiLayer button#creditsBtn::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms ease;
}

#uiLayer button#creditsBtn:hover::after {
  transform: scaleX(1);
}

/* =========================================================
   CREDITS CLOSE BUTTON
========================================================= */

#closeCredits {
  position: absolute;
  left: 50%;
  bottom: 31px;
  transform: translateX(-50%);
  width: 32px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: opacity 300ms ease, transform 200ms ease;
}

#closeCredits:hover {
  opacity: 0.85 !important;
  transform: translateX(-50%) scale(1.04) !important;
}

#closeCredits .closeIcon {
  position: relative;
  width: 10px;
  height: 10px;
}

#closeCredits .closeIcon::before,
#closeCredits .closeIcon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 0.75px;
  background: #1a1a1a;
  transform-origin: center;
}

#closeCredits .closeIcon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

#closeCredits .closeIcon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* =========================================================
   SOUND — MINIMAL, FLAT, PRO
========================================================= */

#soundWrap {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46px;
  height: 260px;
  pointer-events: auto;
  z-index: 10;
}

#soundBtn {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: none;
  border: none;
  color: #fff;
  opacity: 0.9;
}

#soundBtn:hover {
  opacity: 0.7;
}

#soundBtn svg {
  width: 28px;
  height: 28px;
  display: block;
}

#volumeRail {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-70%);
  width: 22px;
  height: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

#soundWrap:hover #volumeRail {
  opacity: 1;
  pointer-events: auto;
}

#volumeSlider {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  width: 120px;
  height: 16px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

#volumeSlider::-webkit-slider-runnable-track {
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
}

#volumeSlider::-moz-range-track {
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  margin-top: -4.5px;
}

#volumeSlider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  border: 0;
}

/* =========================================================
   UI AUTO-HIDE / CREDITS MODE
========================================================= */

#filmExperience.ui-hidden #uiLayer .top,
#filmExperience.ui-hidden #uiLayer .bottom {
  opacity: 0;
  pointer-events: none;
}

#filmExperience.credits-open #videoLayer {
  filter: blur(10px);
  transform: scale(1.03);
}

#filmExperience.credits-open #uiLayer .top,
#filmExperience.credits-open #uiLayer .bottom,
#filmExperience.credits-open #browseBtn {
  opacity: 0 !important;
  pointer-events: none !important;
}

#filmExperience.credits-open #browseBtn {
  transition: opacity 1000ms ease, transform 250ms ease;
}

/* =========================================================
   ABOUT — BOTTOM SHEET
========================================================= */

#aboutOverlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 1;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
}

#aboutOverlay.active {
  pointer-events: auto;
}

#aboutPanel {
  width: min(60vw, 1200px);
  height: 66vh;
  max-height: 66vh;
  transform: translateY(100%);
  transition: transform 1500ms cubic-bezier(0.22, 1, 0.36, 1);
  background-color: #0c0c0c;
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.35);
}

#aboutPanel {
  position: relative;
  isolation: isolate;
}

#aboutPanel .aboutBaseImage {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  overflow: hidden;
}

#aboutPanel .aboutBaseImage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #0a0a0a;
}

#aboutPanel .aboutBaseImage img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
}

#aboutPanel .aboutGrain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

#aboutPanel .aboutGrain video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.32;
  mix-blend-mode: overlay;
  filter: brightness(1.35);
}

#aboutPanel .aboutGrid,
#aboutPanel .aboutContacts {
  position: relative;
  z-index: 2;
}

#aboutPanel .linksCol {
  position: absolute;
  top: 40px;     /* adjust spacing from top */
  left: 40px;    /* adjust spacing from left */
  right: auto;   /* important: cancel previous right positioning */
  transform: none; /* remove vertical centering */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

#aboutPanel .aboutPrompt {
  margin: 0 0 18px 0;
  color: #fff;
  font-family: Arial, "Arial Narrow", sans-serif !important;
  font-style: normal !important;
  font-weight: 700;
  font-stretch: condensed;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0;
}

#aboutPanel .aboutButtons.vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

#aboutPanel .aboutBtn {
  position: relative;
  display: inline-block;
  padding: 2px 6px;
  overflow: hidden;
  text-decoration: none;
  color: #000;
  background: transparent;

  font-family: "Arial Narrow", Arial, sans-serif !important;
  font-style: normal !important;
  font-weight: 700 !important;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;

  transition: color 320ms cubic-bezier(0.65, 0, 0.35, 1);
}

#aboutPanel .aboutBtn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: brightness(1.25) contrast(1.15);
  backdrop-filter: brightness(1.25) contrast(1.15);

  transform: translateX(0%);
  transition: transform 320ms cubic-bezier(0.65, 0, 0.35, 1);
}

#aboutPanel .aboutBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.32) 0%,
      rgba(255,255,255,0.10) 100%
    );
  mix-blend-mode: screen;

  transform: translateX(0%);
  transition: transform 320ms cubic-bezier(0.65, 0, 0.35, 1);
}

#aboutPanel .aboutBtn span {
  position: relative;
  z-index: 2;
  display: inline-block;
}

#aboutPanel .aboutBtn:hover,
#aboutPanel .aboutBtn:focus-visible {
  color: #fff;
}

#aboutPanel .aboutBtn:hover::before,
#aboutPanel .aboutBtn:hover::after,
#aboutPanel .aboutBtn:focus-visible::before,
#aboutPanel .aboutBtn:focus-visible::after {
  transform: translateX(102%);
}

#aboutPanel .aboutBtn:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
}

#aboutOverlay.active #aboutPanel {
  transform: translateY(0);
}

#aboutPanel .aboutGrid {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

#aboutPanel .aboutContacts {
  display: block;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 820px) {
  #aboutPanel {
    height: 72vh;
    max-height: 72vh;
  }
}

/* =========================================================
   ABOUT SOCIAL ICONS
========================================================= */

#aboutPanel .aboutSocials {
  position: absolute;
  right: 34px;
  bottom: 28px;
  z-index: 3;

  display: flex;
  align-items: center;
  gap: 14px;
}

#aboutPanel .socialLink {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  opacity: 0.92;
  transition: opacity 220ms ease, transform 220ms ease;
}

#aboutPanel .socialLink:hover,
#aboutPanel .socialLink:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

#aboutPanel .socialLink:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
}

/* Use SVGs as masks so they always render white */
#aboutPanel .socialLink::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #fff;

  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

#aboutPanel .social-email::before {
  -webkit-mask-image: url("assets/icons/envelope-simple.svg");
  mask-image: url("assets/icons/envelope-simple.svg");
}

#aboutPanel .social-linkedin::before {
  -webkit-mask-image: url("assets/icons/linkedin-logo.svg");
  mask-image: url("assets/icons/linkedin-logo.svg");
}

#aboutPanel .social-youtube::before {
  -webkit-mask-image: url("assets/icons/youtube-logo.svg");
  mask-image: url("assets/icons/youtube-logo.svg");
}

#aboutPanel .social-instagram::before {
  -webkit-mask-image: url("assets/icons/instagram-logo.svg");
  mask-image: url("assets/icons/instagram-logo.svg");
}

#aboutPanel .social-twitch::before {
  -webkit-mask-image: url("assets/icons/twitch-logo.svg");
  mask-image: url("assets/icons/twitch-logo.svg");
}

#aboutPanel .social-x::before {
  -webkit-mask-image: url("assets/icons/x-logo.svg");
  mask-image: url("assets/icons/x-logo.svg");
}

/* =========================================================
   ILLUSTRATIONS PAGE — CUSTOM STANDALONE
========================================================= */

body.illustrations-template {
  margin: 0;
  background: #050505;
  color: #fff;
  overflow-x: hidden;
}

body.illustrations-template * {
  box-sizing: border-box;
}

.illustrationsPage {
  min-height: 100vh;
  width: 100%;
  background: #050505;
  color: #fff;
  padding: 0 34px 90px;

  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  line-height: 1.35;
  letter-spacing: 0.015em;
}

/* Same top placement logic as landing page */
.illustrationsTopBar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 84px;
  z-index: 50;
  pointer-events: none;
}


/* Logo: same visual position as landing page #siteTitle / #siteLogo */
.illustrationsLogoLink {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 51;

  pointer-events: auto;
  display: block;
  text-decoration: none;
}

.illustrationsLogo {
  height: 64px;
  width: auto;
  display: block;
}

/* Hero */
.illustrationsHero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 110px 0 56px;
}

.illustrationsKicker {
  margin: 0 0 14px;

  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.48);
}

.illustrationsHero h1 {
  margin: 0;

  color: #fff !important;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 0.015em;
}

/* Gallery */
.illustrationsGallery {
  width: min(1480px, 100%);
  margin: 0 auto;

  columns: 4 240px;
  column-gap: 22px;

  animation: illustrationsFadeIn 900ms ease both;
  animation-delay: 120ms;
}

.illustrationItem {
  position: relative;
  break-inside: avoid;

  margin: 0 0 22px;
  overflow: hidden;

  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.illustrationItem img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;

  filter: grayscale(100%) brightness(0.88) contrast(1.05);
  transform: scale(1);
  transition:
    filter 420ms ease,
    transform 420ms ease;
}

.illustrationItem:hover img {
  filter: grayscale(0%) brightness(1) contrast(1);
  transform: scale(1.025);
}

.illustrationItem figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 42px 16px 14px;

  color: rgba(255, 255, 255, 0.9);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0)
  );

  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.illustrationItem:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.illustrationsHero,
.illustrationsGallery {
  animation: illustrationsFadeIn 900ms ease both;
}

@keyframes illustrationsFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 760px) {
  .illustrationsPage {
    padding: 0 20px 70px;
  }

  .illustrationsTopBar {
    height: 68px;
  }

  .illustrationsLogo {
    height: 58px;
  }

  .illustrationsHero {
    min-height: 34vh;
    padding: 100px 0 42px;
  }

  .illustrationsHero h1 {
    font-size: clamp(48px, 15vw, 76px);
  }

  .illustrationsGallery {
    columns: 1;
    column-gap: 0;
  }

  .illustrationItem {
    margin-bottom: 20px;
  }

  .illustrationItem img {
    filter: grayscale(0%) brightness(1) contrast(1);
  }

  .illustrationItem figcaption {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   ILLUSTRATIONS PAGE — FLOATING ABOUT BUTTON + ABOUT OVERLAY
========================================================= */

/* Place the About button like the landing page bottom-center menu button */
body.illustrations-template #menuBtn.illustrationsMenuBtn {
  position: fixed !important;
  left: 50% !important;
  bottom: 31px !important;
  top: auto !important;
  right: auto !important;

  transform: translateX(-50%) !important;
  z-index: 120;

  width: 32px;
  height: 22px;
  padding: 0;

  pointer-events: auto;
}

body.illustrations-template #menuBtn.illustrationsMenuBtn:hover {
  transform: translateX(-50%) scale(1.04) !important;
}

/* Make the About overlay cover the viewport on the illustrations page */
body.illustrations-template #aboutOverlay.illustrationsAboutOverlay {
  position: fixed;
  inset: 0;
  z-index: 110;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  opacity: 1;
  visibility: visible;

  background: rgba(0, 0, 0, 0);
  pointer-events: none;

  transition: background 950ms ease;
}

body.illustrations-template #aboutOverlay.illustrationsAboutOverlay.active {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
}

/* Keep the same bottom-sheet panel behavior */
body.illustrations-template #aboutOverlay.illustrationsAboutOverlay #aboutPanel {
  width: min(60vw, 1200px);
  height: 66vh;
  max-height: 66vh;

  transform: translateY(100%);
  transition: transform 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.illustrations-template #aboutOverlay.illustrationsAboutOverlay.active #aboutPanel {
  transform: translateY(0);
}

/* Optional: dim the gallery a little while About is open */
body.illustrations-template.illustrations-about-open .illustrationsHero,
body.illustrations-template.illustrations-about-open .illustrationsGallery,
body.illustrations-template.illustrations-about-open .illustrationsTopBar {
  filter: brightness(0.72);
  transition: filter 950ms ease;
}

/* Keep the menu button visible above the dim, unless the panel is open */
body.illustrations-template.illustrations-about-open #menuBtn.illustrationsMenuBtn {
  opacity: 0;
  pointer-events: none;
}

/* Mobile match */
@media (max-width: 820px) {
  body.illustrations-template #aboutOverlay.illustrationsAboutOverlay #aboutPanel {
    width: min(92vw, 1200px);
    height: 72vh;
    max-height: 72vh;
  }

  body.illustrations-template #menuBtn.illustrationsMenuBtn {
    bottom: 24px !important;
  }
}

/* =========================================================
   AWR — THE RED CAT PAGE
========================================================= */

body.awr-template {
  margin: 0;
  background: #050505;
  color: #fff;
  overflow-x: hidden;
}

body.awr-template * {
  box-sizing: border-box;
}

.awrPage {
  min-height: 100vh;
  width: 100%;
  background: #050505;
  color: #fff;
  padding: 0 34px 90px;

  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  line-height: 1.35;
  letter-spacing: 0.015em;
}

/* Top bar */
.awrTopBar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 84px;
  z-index: 50;
  pointer-events: none;
}

.awrLogoLink {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 51;

  pointer-events: auto;
  display: block;
  text-decoration: none;
}

.awrLogo {
  height: 64px;
  width: auto;
  display: block;
}

/* Top-right GIPHY link */
.awrGiphyLink {
  position: absolute !important;
  right: 34px !important;
  top: 30px !important;
  z-index: 52;

  pointer-events: auto;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;

  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.06em;

  margin: 0 !important;
  padding: 0 0 6px 0 !important;

  display: inline-block;
}

.awrGiphyLink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 1px;
  background: currentColor;
  opacity: 0.85;

  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms ease;
}

.awrGiphyLink:hover::after {
  transform: scaleX(1);
}

.awrGiphyLink:hover {
  opacity: 0.75;
}

/* Hero */
.awrHero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 110px 0 56px;
}

.awrKicker {
  margin: 0 0 14px;

  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.48);
}

.awrHero h1 {
  margin: 0;

  color: #fff !important;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: 0.015em;
}

/* GIF / sticker archive grid */
.awrGallery {
  width: min(1180px, 100%);
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;

  animation: awrFadeIn 900ms ease both;
  animation-delay: 120ms;
}

.awrItem {
  position: relative;
  margin: 0;
  overflow: hidden;

  aspect-ratio: 1 / 1;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    #101010;

  border: 1px solid rgba(255, 255, 255, 0.14);
}

.awrItem img {
  display: block;
  width: 82%;
  height: 82%;
  object-fit: contain;

  filter: grayscale(100%) brightness(0.92) contrast(1.05);
  transform: scale(1);
  transition:
    filter 420ms ease,
    transform 420ms ease;
}

.awrItem:hover img {
  filter: grayscale(0%) brightness(1) contrast(1);
  transform: scale(1.06);
}

.awrItem figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 42px 14px 13px;

  color: rgba(255, 255, 255, 0.9);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78),
    rgba(0, 0, 0, 0)
  );

  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.awrItem:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.awrHero,
.awrGallery {
  animation: awrFadeIn 900ms ease both;
}

@keyframes awrFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 760px) {
  .awrPage {
    padding: 0 20px 70px;
  }

  .awrTopBar {
    height: 68px;
  }

  .awrLogo {
    height: 58px;
  }

  .awrGiphyLink {
    right: 16px;
    top: 19px;
    font-size: 14px;
  }

  .awrHero {
    min-height: 34vh;
    padding: 100px 0 42px;
  }

  .awrHero h1 {
    font-size: clamp(44px, 13vw, 72px);
  }

  .awrGallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .awrItem img {
    filter: grayscale(0%) brightness(1) contrast(1);
  }

  .awrItem figcaption {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   AWR PAGE — FLOATING ABOUT BUTTON + ABOUT OVERLAY
========================================================= */

/* Place the About button like the landing page bottom-center menu button */
body.awr-template #menuBtn.awrMenuBtn {
  position: fixed !important;
  left: 50% !important;
  bottom: 31px !important;
  top: auto !important;
  right: auto !important;

  transform: translateX(-50%) !important;
  z-index: 120;

  width: 32px;
  height: 22px;
  padding: 0;

  pointer-events: auto;
}

body.awr-template #menuBtn.awrMenuBtn:hover {
  transform: translateX(-50%) scale(1.04) !important;
}

/* Make the About overlay cover the viewport on the Awr page */
body.awr-template #aboutOverlay.awrAboutOverlay {
  position: fixed;
  inset: 0;
  z-index: 110;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  opacity: 1;
  visibility: visible;

  background: rgba(0, 0, 0, 0);
  pointer-events: none;

  transition: background 950ms ease;
}

body.awr-template #aboutOverlay.awrAboutOverlay.active {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.45);
}

/* Keep the same bottom-sheet panel behavior */
body.awr-template #aboutOverlay.awrAboutOverlay #aboutPanel {
  width: min(60vw, 1200px);
  height: 66vh;
  max-height: 66vh;

  transform: translateY(100%);
  transition: transform 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.awr-template #aboutOverlay.awrAboutOverlay.active #aboutPanel {
  transform: translateY(0);
}

/* Dim the page while About is open */
body.awr-template.awr-about-open .awrHero,
body.awr-template.awr-about-open .awrGallery,
body.awr-template.awr-about-open .awrTopBar {
  filter: brightness(0.72);
  transition: filter 950ms ease;
}

/* Hide the menu button while the panel is open */
body.awr-template.awr-about-open #menuBtn.awrMenuBtn {
  opacity: 0;
  pointer-events: none;
}

/* Mobile match */
@media (max-width: 820px) {
  body.awr-template #aboutOverlay.awrAboutOverlay #aboutPanel {
    width: min(92vw, 1200px);
    height: 72vh;
    max-height: 72vh;
  }

  body.awr-template #menuBtn.awrMenuBtn {
    bottom: 24px !important;
  }
}

/* =========================================================
   ILLUSTRATIONS + AWR — TOP CENTER LOGO HOVER
========================================================= */

body.illustrations-template .illustrationsLogoLink,
body.awr-template .awrLogoLink {
  transform: translateX(-50%) scale(1);
  transform-origin: center center;
  transition:
    transform 220ms ease,
    opacity 220ms ease,
    filter 220ms ease;
  cursor: pointer;
}

body.illustrations-template .illustrationsLogoLink:hover,
body.illustrations-template .illustrationsLogoLink:focus-visible,
body.awr-template .awrLogoLink:hover,
body.awr-template .awrLogoLink:focus-visible {
  transform: translateX(-50%) scale(1.08);
  opacity: 0.92;
  filter: brightness(1.12);
}

body.illustrations-template .illustrationsLogoLink:focus-visible,
body.awr-template .awrLogoLink:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: 5px;
}

/* =========================================================
   ILLUSTRATIONS + AWR — DARK GRID PAPER BACKGROUND
========================================================= */

body.illustrations-template,
body.awr-template {
  background-color: #050505;
}

body.illustrations-template .illustrationsPage,
body.awr-template .awrPage {
  background-color: #050505;

  background-image:
    linear-gradient(
      rgba(0, 0, 0, 0.18),
      rgba(0, 0, 0, 0.18)
    ),
    url("assets/BG_Image.png");

  background-size: 50% auto;
background-position: center top;
background-repeat: repeat;
background-attachment: fixed;
}