:root {
  /* color */
  --black: #191919;
  --black-transparent: rgba(0, 0, 0, 0.5);
  --white: #fff;
  --grey: #d8d8d8;
  --dark-grey: #b9b9b9;
  --dark-grey-2: #a6a6a6;
  --grey-transparent: rgba(217, 217, 217, 0.7);
  --grey-transparent-more: rgba(217, 217, 217, 0.2);
  --orange: #e8481d;
  /* font sizes */
  --font-size-s: 17px;
  --line-height-s: 21px;
  --font-size-m: 21.5px;
  --line-height-m: 24px;
  --font-size-l: 29px;
  --line-height-l: 32px;
  --font-size-xl: 32px;
  --line-height-xl: 34px;
  /* other */
  --border-radius: 10px;
  /* gallery */
  --g-height-active: 65vh;
  --g-height-inactive: 45vh;
  --g-gap: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-size: var(--font-size-m);
  line-height: var(--line-height-m);
}

body {
  font-family: "Neue Haas", sans-serif;
  letter-spacing: -0.01em;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

h2 {
  font-size: var(--font-size-xl);
  line-height: var(--line-height-xl);
}

h4 {
  text-transform: uppercase;
}

h5 {
  color: var(--grey);
}

figure {
  margin: 0;
}

video {
  width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

details > summary .folder-btn .close {
  display: none;
}

details > summary .folder-btn .open {
  display: block;
}

details:open > summary .folder-btn .open {
  display: none;
}

details:open > summary .folder-btn .close {
  display: block;
}

details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0;
}

/* details:open > summary {
  margin-bottom: 1rem;
} */
.folder-content {
  padding-top: 1rem;
}

details .arrow-btn {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

details > summary::-webkit-details-marker {
  display: none;
}

.nowrap {
  white-space: nowrap;
}

p {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

button {
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.mt {
  margin-top: 6rem;
}

.mobile {
  display: none;
}

/* functional */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.grid:not(:has(> :only-child)) {
  margin: 0 1rem;
}

.template-originals .grid {
  margin: 0 1rem;
}

.grid:not(:has(> :only-child)) figure img,
.grid:not(:has(> :only-child)) figure .hls-video-wrapper {
  border-radius: var(--border-radius);
}

.column:not([style*="--span:12"]) figure img {
  border-radius: var(--border-radius);
}

.grid:has(> :only-child) .text {
  margin: 0 1rem;
}

.column {
  grid-column: span var(--span);
}

.template-originals .grid,
.template-profile .grid {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.template-originals .grid .blocks,
.template-profile .grid .blocks {
  margin: 0;
}

/* fonts combined */

.combined {
  font-family: "Mincho", serif;
}

.combined mark {
  font-size: 1.1em;
  font-weight: normal;
  font-family: "Neue Haas", sans-serif;
  background-color: unset;
  color: inherit;
}

.combined figure {
  margin: 0;
  display: inline;
}

.reel .combined .logo-container img {
  max-width: unset !important;
  max-height: unset !important;
}

.combined img {
  max-width: 128px;
  max-height: 72px;
}

.combined p {
  display: inline;
}

.text strong {
  font-weight: inherit;
  color: var(--orange);
}

/* blocks */

.blocks {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.blocks figure + .text {
  margin-top: 0.75rem;
}

.blocks img {
  width: 100%;
  height: auto;
}

.text-size-small {
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
}

.text-size-large {
  font-size: var(--font-size-l);
  line-height: var(--line-height-l);
}

.blocks .text a {
  color: var(--orange);
}

.text h4 {
  color: var(--dark-grey);
  font-size: var(--font-size-m);
  text-transform: unset !important;
}

/* logos */

.logo-container {
  display: inline-block; /* Or flex, depending on parent */
  width: 100%;
  max-width: var(--logo-max-width);
  line-height: 0;
}

.logo-container .logo-wrapper {
  position: relative;
  width: 100%; /* Fills the max-width of the container */
  height: auto;
  display: block;
}

.logo-container .logo {
  width: 100%; /* Takes full width of the wrapper */
  height: auto; /* Maintains aspect ratio */
  display: block;
  object-fit: contain;
}

.logo-container .logo-lettering {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* Perfectly matches the base logo size */
  height: auto;

  /* transform: translateY(6.5%) scale(7); */
  /* transform: scale(6.25); */
  transform: translateY(-40.5%) scale(1.2);
  transform-origin: center center;

  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.logo-container:hover .logo-lettering {
  opacity: 1;
}

.logo-large {
  margin: 1rem;
}

.logo-large img {
  width: 100%;
  height: auto;
}

/* header */

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  z-index: 1;
  font-size: var(--font-size-s);
  font-weight: 500;
}

nav {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.menu-list {
  display: flex;
  gap: 0.25rem;
}

.menu-list-inner,
.menu-list-inner-selected {
  display: flex;
  align-items: center;
  border-radius: 0.25rem;
}

.menu-list-inner a,
.menu-list-inner-selected a {
  padding: 0 0.5rem;
}

.menu-list-inner-selected {
  background-color: var(--orange);
  color: var(--white);
}

.menu-list-inner {
  background-color: var(--grey-transparent);
  backdrop-filter: blur(24px);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav .active {
  background-color: var(--orange);
  color: var(--white);
  border-radius: 0.25rem;
}

nav .active + li {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  margin-left: 0.5rem;
}

/* 2. Target the element BEFORE .active */
nav li:has(+ .active) {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  margin-right: 0.5rem;
}

nav ul li,
.menu-button {
  background-color: var(--grey-transparent);
  backdrop-filter: blur(24px);
  padding: 0.2rem 0.5rem;
  flex: 1;
  align-self: flex-start;
}

.menu-open {
  display: none;
}
.menu-closed {
  display: inline;
}

/* When .open is added, swap them */
.menu-mobile.open .menu-open {
  display: inline;
}
.menu-mobile.open .menu-closed {
  display: none;
}

.menu-mobile.open .menu-content {
  opacity: 1;
  pointer-events: all;
}

.menu-button {
  border-radius: 0.25rem;
}

.menu-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--black-transparent);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  pointer-events: none; /* Allows clicking things behind it when closed */
  transition: opacity 0.3s ease; /* Smooth fade */
}

.menu-content ul {
  /* flex-direction: column; */
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
}

.menu-content ul li {
  align-self: flex-start;
  margin: 0 !important;
  border-radius: 0.25rem;
  flex: none;
  backdrop-filter: none;
}

.logo-header,
.menu-button {
  z-index: 9;
  position: relative;
}

nav ul li:first-child {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
  /* padding-left: 1rem; */
}

nav ul li:last-child {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  /* padding-right: 1rem; */
}

/* Search Animation Styles */
.search-wrapper {
  /* Keep your existing styles */
  background-color: var(--grey-transparent);
  backdrop-filter: blur(24px);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
}

.search-wrapper svg {
  width: 0.75rem;
}

.search-wrapper form {
  display: flex;
  align-items: center;
  margin: 0;
}

.search-wrapper input {
  /* Hidden state */
  width: 0;
  opacity: 0;
  padding: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;

  /* The sliding animation */
  transition:
    width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.3s ease,
    padding 0.3s ease;
}

.search-wrapper input::placeholder {
  color: inherit;
  opacity: 0.5;
}

/* input::placeholder {
  font-weight: bold;
  opacity: 0.5;
  color: red;
} */

.search-wrapper button {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: flex; /* Fixes SVG vertical alignment */
}

/* --- ACTIVE STATE (Triggered by JS) --- */

.search-wrapper.active svg line {
  stroke: var(--white);
}

.search-wrapper.active svg circle {
  stroke: var(--white);
}

.search-wrapper.active input {
  color: var(--white);
}

.search-wrapper.active input {
  width: 200px; /* Width when opened */
  opacity: 1;
  padding-right: 0.75rem; /* Space between text and icon */
}

.mobile .search-wrapper {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  width: 1.5rem;
  transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile .search-wrapper.active {
  width: calc(100% - 2rem);
}

.mobile .search-wrapper.active form,
.mobile .search-wrapper.active input {
  width: 100%; /* Width when opened */
}

/* logo */

header .logo {
  max-height: 1.5rem;
}

/* filters */

.filter-group-tags-list {
  display: none;
}

.filter-group-tags-list.active {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-group-title.active,
.filter-tag.active {
  opacity: 1;
}

.hide {
  display: none;
}

.work-filters {
  font-size: var(--font-size-s);
  font-weight: 500;
}

.filter-group-titles {
  display: flex;
  justify-content: center;
}

.filter-group-titles-inner {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 0.4rem;
  background-color: var(--grey);
  border-radius: 0.4rem;
}

.filter-group-title.active,
.filter-tag.active {
  background-color: var(--orange);
  color: var(--white);
}

.filter-group-title {
  border-radius: 0.25rem;
  padding: 0.2rem 0.5rem;
  color: var(--dark-grey-2);
}

.filter-group-tags-lists {
  margin: 1rem 0;
  display: flex;
  justify-content: center;
}

.filter-group-tags-list {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  display: none;
}

.filter-tag {
  border-radius: 0.25rem;
  padding: 0.2rem 0.5rem;
  background-color: var(--grey);
  color: var(--black);
}

/* home */

.reel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.reel video,
.reel img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.reel .hls-video-wrapper video {
  height: 100% !important;
}

.reel-caption {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 100%;
  transform: translateY(-50%);
  color: var(--white);
}

.statement,
.reel-caption {
  text-align: center;
  font-size: var(--font-size-l);
  line-height: var(--line-height-l);
}

.statement {
  margin-top: 4rem;
  margin-bottom: 5rem;
  margin-left: 1rem;
  margin-right: 1rem;
}

.reel + main .page-intro {
  margin-top: 8rem;
  margin-bottom: 8rem;
}

.page-intro {
  margin-top: 14rem;
  margin-bottom: 10rem;
  text-align: center;
}

.page-intro strong {
  font-weight: normal;
  color: var(--orange);
}

.page-intro .statement {
  margin-bottom: 1.5rem;
}

.page-intro .introduction {
  margin-left: 1rem;
  margin-right: 1rem;
}

/* .grid.projects:not(.filtered) .hls-video-wrapper video {
  aspect-ratio: var(--aspect-ratio);
} */

.aspect-ratio-enabled .hls-video-wrapper video {
  aspect-ratio: var(--aspect-ratio);
}

.projects {
  margin: 1rem !important;
}

/* project and product thumbnails */

.product-thumbnail,
.project-thumbnail {
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
}

.product-thumbnail-title,
.project-thumbnail-title {
  color: var(--white);
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  padding: 1rem;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(24px);
  opacity: 0;
  font-size: var(--font-size-s);
  line-height: var(--font-size-s);
  transition: opacity 0.2s;
}

.project-thumbnail.vertical-enabled .project-thumbnail-title {
  flex-direction: column;
  justify-content: space-around;
  /* padding: 2rem 1rem; */
}

.profile-thumbnail-title {
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
  font-weight: 600;
  margin-top: 0.5rem;
}

.product-thumbnail-title-line,
.project-thumbnail-title-line {
  text-align: center;
  display: flex;
  justify-content: center;
  column-gap: 0.25em;
  flex-wrap: wrap;
  transform: translateY(25%);
  transition: transform 0.2s;
}

.product-thumbnail:hover .product-thumbnail-title,
.project-thumbnail:hover .project-thumbnail-title {
  opacity: 1;
}

.product-thumbnail-title:hover .product-thumbnail-title-line,
.project-thumbnail-title:hover .project-thumbnail-title-line {
  transform: translateY(0%);
}

.project-thumbnail video,
.project-thumbnail img {
  aspect-ratio: 16/9;
  width: 100%;
  height: 100%;
}

.project-thumbnail img {
  object-fit: cover;
}

.project-thumbnail video {
  object-fit: contain;
}

.product-thumbnail video,
.product-thumbnail img {
  aspect-ratio: 1/1;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.profile-thumbnail-media {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.profile-thumbnail img,
.profile-thumbnail video {
  border-radius: var(--border-radius);
  aspect-ratio: 1/1;
  width: 100%;
  height: auto;
  object-fit: cover;
  transform: scale(1);
  transition: 0.8s transform;
}

.article-thumbnail {
}

.article-thumbnail-title {
  margin-top: 16px;
}

.profile-thumbnail,
.article-thumbnail-media {
  overflow: hidden;
}

.article-thumbnail video,
.article-thumbnail img {
  /* border-radius: var(--border-radius); */
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: 0.8s transform;
}

.profile-thumbnail:hover img,
.profile-thumbnail:hover video,
.article-thumbnail:hover img,
.article-thumbnail:hover video {
  transform: scale(1.1);
}

.article-thumbnail-tags {
  margin-top: 0.5rem;
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
  color: var(--dark-grey);
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  row-gap: 0.25rem;
}

/* project page */

.reel-video-margin video {
  padding: 5%;
}

.project-header,
.article-header {
  margin: 2rem 1rem 1rem 1rem !important;
}

.article-header {
  text-align: center;
}

.project-details {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: 4rem;
  row-gap: 1rem;
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
}

.project-services {
  display: flex;
  gap: 1rem;
}

.template-project .folder,
.template-about .folder {
  border-top: 1px solid var(--black);
  margin: 1rem;
  padding-top: 1rem;
  line-height: 1.3em;
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
}

.template-profile .folder summary {
  font-size: var(--font-size-l);
  line-height: var(--line-height-l);
}

.template-project .folder summary {
  font-size: var(--font-size-m);
  line-height: var(--line-height-m);
}

.folder .combined {
  margin-bottom: 8px;
}

.folder-content {
  margin: 0 !important;
}

.credits .role {
  color: var(--dark-grey);
}

.credits .column:nth-child(3n + 1) {
  margin-left: 4rem;
}

.credit {
  margin-bottom: 1rem;
}

/* profile */

.profile-header {
  margin-bottom: 4rem !important;
}

.profile-header .socials {
  margin-top: 1rem;
  font-size: var(--font-size-s);
  display: flex;
  gap: 2rem;
}

.profile-header .socials a {
  color: var(--dark-grey-2);
}

/* article page */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.tag {
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
  background-color: var(--dark-grey-2);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

/* search page */

.template-search main {
  margin-top: 4.75rem;
}

.template-search section {
  margin: 0 1rem;
}

/* hls */

.hls-video-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  /* height: 100%; */
  background-image: var(--bg-poster);
  /* background-size: cover; */
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

.hls-video-wrapper:hover .hls-video-controls {
  opacity: 1;
}

.hls-video-controls {
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  position: absolute;
  bottom: 0;
  width: 100%;
  left: 0;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.25), transparent);
  transition: opacity 0.3s;
}

.hls-video-wrapper:not(.is-playing) .hls-video-controls {
  opacity: 1;
}

.hls-video-controls svg {
  fill: white;
}

.hls-control-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.hls-control-btn svg {
  width: 2rem;
  height: 2rem;
}

.hls-video-wrapper video {
  width: 100%;
  /* height: 100%; */
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-roster .hls-video-wrapper video {
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    0.8s transform;
}

.hls-video-wrapper video.is-playing-visual {
  opacity: 1;
}

/* Show/hide play/pause icons */
.hls-icon-pause {
  display: none;
}
.is-playing .hls-icon-play {
  display: none;
}
.is-playing .hls-icon-pause {
  display: block;
}

/* Show/hide volume icons */
.hls-icon-muted {
  display: none;
}
.is-muted .hls-icon-volume {
  display: none;
}
.is-muted .hls-icon-muted {
  display: block;
}

/* Show/hide fullscreen icons */
.hls-icon-compress {
  display: none;
}
.is-fullscreen .hls-icon-expand {
  display: none;
}
.is-fullscreen .hls-icon-compress {
  display: block;
}

/* Timeline */
.hls-timeline {
  flex: 1;
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.hls-timeline-input {
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.hls-timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: white;
  pointer-events: none;
}

/* culture page */

.template-culture .articles {
  margin-top: 10rem;
}

/* legal */

/* .legal-content {
  margin: 6rem 1rem 2rem 1rem;
} */

.legal-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99;
  background-color: var(--grey-transparent);
  backdrop-filter: blur(20px);

  display: flex;
  justify-content: center;
  align-items: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* The Open State */
.legal-page.open {
  opacity: 1;
  pointer-events: all;
}

/* The White Box Content */
.legal-content {
  width: 100%;
  height: 100svh;
  padding: 0 1rem;
  overflow-y: scroll;
  position: relative;
}

.legal-content h2 {
  color: var(--orange);
  margin: 2rem 0;
  text-transform: uppercase;
}

/* Close Button */
.legal-page .close-legal {
  position: absolute;
  top: 2.5rem;
  right: 1rem;
  z-index: 10;
  cursor: pointer;
  transition: opacity 0.2s;
}

.legal-content .close-legal:hover {
  opacity: 0.5;
}

/* Ensure footer buttons look clickable */
.column.legal button {
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
  padding: 0;
}

.column.legal button:hover {
  text-decoration-color: currentColor;
}

/* goods */

.intro {
  text-align: center;
}

.intro u {
  text-decoration: none;
  color: var(--orange);
}

/* work */

.template-work main {
  margin-top: 4.75rem;
}

/* related */

.related-section {
  margin-bottom: 8rem;
}

.related-header {
  padding-top: 1rem;
  border-top: 1px solid var(--black);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  margin-left: 1rem;
  margin-right: 1rem;
}

.related-nav {
  display: flex;
  gap: 0.5rem;
}

/* Reusing your existing .arrow-btn style, just adding hover */
.related-nav .arrow-btn {
  cursor: pointer;
  background: transparent;
  border: 0;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.related-nav .arrow-btn:hover {
  opacity: 0.5;
}

.related-scroll-viewport {
  width: 100%;
  overflow-x: scroll; /* Allows JS to scroll it */
  overflow-y: hidden;
  -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
  scrollbar-width: none; /* Hide scrollbar Firefox */
}

/* Hide scrollbar Webkit */
.related-scroll-viewport::-webkit-scrollbar {
  display: none;
}

.related-scroll-track {
  display: flex;
  gap: 1rem;
  width: max-content;
}

.related-item {
  width: 560px;
  flex-shrink: 0;
}

/* Ensure images fill the item */
.related-item img,
.related-item video {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  display: block;
}

/* about */

.about-section {
  margin: 0 16px;
  padding: 1rem 0 4rem 0;
  border-top: 1px solid var(--black);
}

.services-content {
  margin-top: 1rem;
  font-size: var(--font-size-s);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.services-content > div {
  grid-column: span 2;
}

/* .services-content > div {
  break-inside: avoid;
  line-height: var(--line-height-s);
} */

/* values */

.values h4 {
  margin-bottom: 1rem;
}

.values .grid .blocks {
  margin: 0;
}

.values .grid {
  margin-left: 0;
  margin-left: 0;
  margin-bottom: 1rem;
}

.value {
  padding: 1.5rem;
  background-color: var(--grey-transparent);
  border-radius: var(--border-radius);
  height: 30vw;
  position: relative;
  transition: 0.2s background-color;
}

.value-title {
  color: var(--orange);
  margin-bottom: 1rem;
}

.value img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4rem;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  transition: filter 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.value:hover img {
  filter: blur(24px);
}

.value-description {
  opacity: 0;
  transform: translateY(5%);
  transition:
    0.2s opacity,
    0.2s transform;
}

.value:hover .value-description {
  transform: translateY(0%);
  opacity: 1;
}

.value:hover {
  background-color: var(--grey-transparent-more);
}

/* actionables */

.actionables {
  position: relative;
}

.actionables-list {
  margin-top: 1rem;
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
  column-count: 2;
  column-gap: 2rem;
  max-width: 50%;
}

.actionables-list > div {
  break-inside: avoid;
}

.actionable:hover .actionable-text {
  opacity: 1;
}

.actionable-title {
  cursor: pointer;
  transition: 0.2s color;
}

.actionable:hover .actionable-title {
  color: var(--orange);
}

.actionable-text {
  position: absolute;
  top: 0%;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--font-size-m);
  line-height: var(--font-size-m);
  color: var(--orange);
  transition: 0.2s opacity;
}

/* member */

.team {
  margin-top: 8rem;
}

.team .grid {
  row-gap: 4rem;
}

.member {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.member > img {
  width: 100%;
  /* height: 100%; */
  object-fit: cover;
}

.member-logo {
  margin-top: auto;
  width: 100%;
}

.member-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.member-content {
  background-color: var(--grey-transparent-more);
  backdrop-filter: blur(16px);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  padding: 1rem;
  font-size: var(--font-size-s);
  line-height: var(--font-size-s);
  font-weight: 600;
  border-radius: var(--border-radius);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.2s opacity;
}

.member:hover .member-content {
  opacity: 1;
}

.member-text {
  display: flex;
  gap: 4rem;
}

.member-socials {
  margin-top: 4rem;
}

.member-text a:hover {
  color: var(--orange);
}

/* clients */
.clients h4 {
  font-size: var(--font-size-m);
}

.client-images img {
  width: 100%;
  max-width: 128px;
}

/* representations */

.representations .grid {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--black);
}

.representations u {
  color: var(--dark-grey);
  text-decoration: none;
}

.addresses {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--black);
}

.addresses-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.addresses-socials > div {
  width: 17.5%;
}

.addresses-socials a {
  color: var(--black) !important;
}

.addresses-socials a:hover {
  color: var(--orange) !important;
}

/* contact */

.template-contact .grid:last-child .blocks {
  margin-bottom: 0;
}

.contact-background {
  position: relative;
}

.contact-background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  z-index: -1;
}

.contact-background-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-contact .baseline {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* footer */

footer {
  font-size: var(--font-size-s);
  line-height: var(--line-height-s);
  background-color: var(--grey);
  padding: 2rem 1rem 0rem 1rem;
  margin-top: 5rem;
}

.template-contact footer {
  margin-top: 0;
}

.template-roster footer {
  margin-top: 8rem;
}

footer img {
  border-radius: 0 !important;
}

footer .column {
  flex: 1 0 auto;
}

footer a:hover {
  color: var(--orange);
}

footer .copyright {
  color: var(--orange);
}

footer .contact {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

footer .socials,
footer .legal {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

footer .contact a {
  color: var(--orange);
}

footer .column:last-child {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  position: relative;
}

footer .column:last-child .logo-container {
  padding-right: 1rem;
  padding-left: 1rem;
  padding-top: 10rem;
  padding-bottom: 2rem;
  z-index: 0;
  overflow: hidden;
}

footer .column:last-child .column-wrapper {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.newsletter-button-wrapper {
  margin-top: 2rem;
}

/* newsletter */

.newsletter-wrapper {
  max-width: 20rem;
  width: 100%;
  z-index: 9;
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 9999;
  overflow: hidden;
}

.newsletter-wrapper .newsletter-modal {
  transform: translateY(100%);
  transition: 0.4s transform;
}

.newsletter-wrapper.open .newsletter-modal {
  transform: translateY(0%);
}

.newsletter-wrapper.permanently-closed {
  display: none !important;
}

.newsletter-logo img {
  width: 100%;
}

.newsletter-modal {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  background-color: var(--orange);
  color: var(--white);
  padding: 1rem;
}

.newsletter-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6rem;
}

.newsletter-header svg {
  width: 0.75rem;
  height: 0.75rem;
  object-fit: contain;
}

.newsletter-form {
  margin: 1.5rem 0;
}

.newsletter-form input {
  width: 100%;
  background: none;
  border: 0;
  border-top: 1px solid var(--white);
  font-family: inherit;
  font-size: inherit;
  color: var(--white);
  padding: 0.2rem;
}

.newsletter-form input::placeholder {
  opacity: 0.5;
  color: var(--white);
}

.newsletter-form div:last-child input {
  border-bottom: 1px solid var(--white);
}

/* footer .logo-container .logo-lettering {
  opacity: 1;
} */

.gallery-wrapper {
  position: relative;
  width: 100%;
  padding: 5vh 0;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: white;
}

/* --- ÁREA SCROLLABLE --- */
.gallery-scroll {
  display: flex;
  align-items: center;
  gap: var(--g-gap);
  overflow-x: auto;
  scroll-behavior: auto !important;
  scroll-snap-type: x mandatory;
  padding: 0 50vw;

  width: 100%;
  height: var(--g-height-active);

  margin: 0;
  list-style: none;
  scrollbar-width: none;
}
.gallery-scroll::-webkit-scrollbar {
  display: none;
}

/* --- ITEMS --- */
.gallery-item {
  flex-shrink: 0;
  position: relative;
  scroll-snap-align: center;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* IMÁGENES Y VIDEO */
.gallery-item img,
.gallery-item .video-wrapper {
  display: block;
  object-fit: contain;
  width: auto;
  border-radius: var(--border-radius);
  height: var(--g-height-inactive);
  transition: height 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- CLASE ACTIVA (JS la pone) --- */
.gallery-item.active {
  opacity: 1;
  z-index: 2;
}

/* Cuando es activo, la imagen crece FÍSICAMENTE */
.gallery-item.active img,
.gallery-item.active .video-wrapper {
  height: var(--g-height-active);
}

/* --- FLECHAS DE NAVEGACIÓN --- */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  border: none;
  width: 50px;
  height: 50px;
  color: #ffffff;
  mix-blend-mode: difference;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.gallery-nav svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.5; /* Un poco más gordas para mejor visibilidad */
  stroke: currentColor; /* Hereda el blanco */
}

.gallery-nav:hover {
  opacity: 1;
}
.gallery-nav.prev {
  left: 20px;
}
.gallery-nav.next {
  right: 20px;
}

/* --- MÓVIL --- */
@media (max-width: 768px) {
  .gallery-wrapper {
    height: 55dvh;
    width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    margin: 2vh 0;
  }

  /* 2. EL TRACK */
  .gallery-scroll {
    height: 100%;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: auto !important;
    gap: 0.5rem;
    padding: 0 50vw;
  }

  /* 3. EL ITEM */
  .gallery-item {
    height: 100%;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* 4. LAS IMÁGENES (Ahora llenan más el escenario) */
  .gallery-item img,
  .gallery-item .video-wrapper {
    display: block;
    border-radius: 8px;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    object-fit: contain;
  }

  /* --- REGLAS PORTRAIT (Verticales) --- */
  .gallery-item.portrait img,
  .gallery-item.portrait .video-wrapper {
    height: 85%;
    width: auto;
    max-width: 80vw;
  }

  /* Portrait Activo */
  .gallery-item.portrait.active img,
  .gallery-item.portrait.active .video-wrapper {
    height: 100%;
  }

  /* --- REGLAS LANDSCAPE (Horizontales) --- */
  .gallery-item.landscape img,
  .gallery-item.landscape .video-wrapper {
    width: 80vw;
    height: auto;
    max-height: 85%;
  }

  /* Landscape Activa */
  .gallery-item.landscape.active img,
  .gallery-item.landscape.active .video-wrapper {
    width: 95vw;
    max-height: 100%;
  }
}

@media (max-width: 1300px) {
  .template-roster .grid.articles .column {
    grid-column: span 4;
  }
}

@media (max-width: 860px) {
  :root {
    /* font sizes */
    --font-size-s: 16px;
    --line-height-s: 20px;
    --font-size-m: 19px;
    --line-height-m: 23px;
    --font-size-l: 22px;
    --line-height-l: 26px;
    --font-size-xl: 28px;
    --line-height-xl: 32px;
  }

  /* reel */
  .reel-video {
    height: 100%;
  }

  .reel-video .hls-video-wrapper {
    height: 100%;
  }

  .reel-caption,
  .statement {
    font-size: var(--font-size-m);
    line-height: var(--line-height-m);
    padding: 0 1rem;
  }

  .reel .logo-container {
    max-width: 5.5rem;
  }

  .reel .hls-video-wrapper video {
    height: 100svh;
  }

  .hls-video-wrapper video {
    height: auto;
  }

  .column {
    grid-column: span 12;
  }

  .column:not(:has(*)) {
    display: none;
  }

  .blocks .text:first-child p:first-child {
    margin-top: 0;
  }

  .combined br,
  .introduction br {
    display: none;
  }
  .desktop {
    display: none;
  }

  .mobile {
    display: unset;
  }

  .value {
    height: auto;
  }

  .value img {
    padding: 1rem;
  }

  .actionables-list {
    max-width: 100%;
    column-count: unset;
  }

  .actionable-title {
    margin-bottom: 0.5rem;
  }

  .actionable {
    margin-bottom: 1rem;
  }

  .actionable-text {
    position: unset;
    top: unset;
    left: unset;
    height: auto;
    opacity: 1;
  }

  .credits .column:nth-child(3n + 1) {
    margin-left: 0;
  }

  .related-item {
    width: 85vw !important;
    height: auto;
  }

  .team .grid {
    row-gap: 1rem;
  }

  .blocks:empty {
    display: none !important;
  }

  .services-content > div {
    grid-column: span 6;
  }

  .page-intro {
    margin-top: 10rem;
    margin-bottom: 8rem;
  }

  .product-thumbnail video,
  .product-thumbnail img,
  .project-thumbnail video,
  .project-thumbnail img {
    height: auto;
  }

  .template-culture .articles {
    margin-top: 1rem;
  }

  .credits .column .credit:last-child {
    margin-bottom: 0;
  }

  /* .project-thumbnail-title .project-thumbnail-title-line:first-child,
  .project-thumbnail-title .project-thumbnail-title-line:last-child {
    display: none;
  } */
}
