/* Color and typography -redken */
:root {
  --white: #e3ded2;
  /* primary background */
  --black: #252120;
  /* primary text       */
  --grey: #8c8c8c;
  /* secondary text     */
  --green: #49e16f;
  /* accent             */

  --mono: "Roboto Mono", monospace;
  --sans: "Roboto", sans-serif;
}


/* Page reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--mono);
  color: var(--black);
  background-color: var(--white);
  overflow-x: hidden;
}

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


/* Splash screen
 *  Covers the page on load, fades out after the glitch.
 *  Timing is controlled in app.js
 */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Hidden SVG filter definitions */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Logo wrapper */
.splash__wrap {
  position: relative;
  width: clamp(250px, 100vw, 500px);
  will-change: transform;
}

.splash__logo {
  display: block;
  width: 100%;
  height: auto;
  will-change: filter;
}

/* RGB channel ghosts */
.splash__ch-r,
.splash__ch-b {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity, clip-path;
}

.splash__ch-r {
  filter: url(#to-red);
  mix-blend-mode: multiply;
}

.splash__ch-b {
  filter: url(#to-blue);
  mix-blend-mode: multiply;
}


/* Background icons
 *  Two decorative corner icons set by JS based on the page.
 */
.bg-icon {
  position: fixed;
  width: 40vw;
  height: auto;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

.bg-icon--tl {
  top: 8%;
  left: -10%;
}

.bg-icon--br {
  bottom: -5%;
  right: -10%;
}
/* About + index pages: bg icons sit above the drawing canvas */
[data-icon-set="stone"] .bg-icon,
[data-icon-set="tech"] .bg-icon {
  z-index: 13;
}


/* Page wrapper */
.page {
  position: relative;
  z-index: 13;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}


/* Shared container
 *  All full-width sections share this padding / max-width.
 *  Tweak padding values here to adjust side margins.
 */
.topbar,
.main,
.address-wrap,
.credits-section,
.footer {
  padding-left: 1.875rem;
  padding-right: 1.875rem;
  max-width: 111.5rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}


/* Topbar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background-color: var(--white);
}

/* Push page content below the fixed topbar (logo 2.6rem + 2×1.25rem padding) */
.page {
  padding-top: 5.1rem;
}

.topbar__logo {
  display: block;
  flex-shrink: 0;
}

.topbar__logo-img {
  display: block;
  height: 2.6rem;
  /* tweak: nav logo size */
  width: auto;
}


/* Nav */
.topnav {
  display: flex;
  align-items: center;
}

.nav-item {
  margin: 0 0.875rem;
  padding: 0.35rem 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  white-space: nowrap;
  transition: color 120ms ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--black);
  outline: none;
}

/* Active page — black, not clickable */
.nav-item.is-active {
  color: var(--black);
  pointer-events: none;
}

.nav-insta {
  display: flex;
  align-items: center;
  margin-left: 0.875rem;
  color: var(--black);
}

.nav-insta__icon {
  display: block;
  width: 1rem;
  height: 1rem;
}


/* Circuit canvas 
 *  Fixed behind everything. Only present on pages that
 *  include <canvas id="circuit-canvas">.
*/
#circuit-canvas {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}


/* Main section of index*/
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Scrollable variant used on content pages */
.main--scroll {
  justify-content: flex-start;
  align-items: stretch;
  padding-top: 5rem;
  padding-bottom: 5rem;
  gap: 5rem;
}


/* Type scale
 *  Based on brand guidelines. All use Roboto (var(--sans)).
 *  Add these classes to any element to apply the style.
*/

/* Home — definition text */
.definition__text {
  font-family: var(--sans);
  font-size: 2rem;
  /* tweak: hero text size — 24pt */
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  text-align: center;
}

/* Location of teh exhibition*/
.location-ack {
  font-family: var(--sans);
  font-size: 0.67rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  text-align: center;
  margin-top: 1.5rem;
  opacity: 0.6;
}


/* Coming soon (catalogue / media) */
.coming-soon {
  font-family: var(--sans);
  font-size: 1.17rem;
  /* 14pt */
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: center;
}


/* About page */
.page-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 42.5rem;
}

.page-section--right {
  margin-left: auto;
  padding-right: 6.25rem;
}

.page-section--center {
  margin-left: auto;
  margin-right: auto;
}

.section-label,
.credits-role {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black);
}

.credits-role {
  display: block;
}

.section-body {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--black);
}

.section-body--large {
  font-size: 1.3rem;
  line-height: 1.4;
}

/* External link below a section */
.section-link {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  transition: opacity 120ms ease;
  align-self: flex-start;
}

.section-link:hover {
  opacity: 0.7;
}


/* Sponsors carousel 
 *  Logos are duplicated by JS (initSponsorsMarquee) so the
 *  -50% animation loops without a visible jump.
 *  Speed:  adjust --marquee-duration
 *  Height: adjust --logo-h
*/
.sponsors-section {
  --marquee-duration: 30s;
  --logo-h: 6rem;

  width: 100%;
  background-color: var(--white);
  padding: calc(var(--logo-h) * 1.5) 0;
  position: relative;
  opacity: 0.80;
  z-index: 14;
  overflow: hidden;
}

.sponsors__canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sponsors__track {
  display: flex;
  align-items: center;
  gap: 6rem;
  width: max-content;
  will-change: transform;
  animation: sponsors-marquee var(--marquee-duration) linear infinite;
}


@keyframes sponsors-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.sponsors__track a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.sponsors__track img,
.sponsors__track svg {
  height: var(--logo-h);
  width: auto;
  flex-shrink: 0;
  display: block;
  filter: grayscale(100%);
  opacity: 0.5;
  transition: filter 300ms ease, opacity 300ms ease;
}

.sponsors__track a:hover img,
.sponsors__track a:hover svg {
  filter: grayscale(0%);
  opacity: 1;
}


/* Credits grid 
 *  Auto-fills columns. Add names as <li> inside
 *  each .credits-names list.
*/
.credits-section {
  margin-left: auto;
  margin-right: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(3, 12.5rem);
  gap: 4rem;
}

.credits-col {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.credits-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.credits-names {
  list-style: none;
  font-family: var(--sans);
  font-size: 0.71rem;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--black);
}


/* Address block */
.address-wrap {
  padding: 2.5rem;
}

.address-block {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  line-height: 1.9;
  text-align: center;
}


/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

/* FR / EN language toggle button */
.footer__lang {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  padding: 0;
  transition: color 120ms ease;
}

.footer__lang:hover {
  color: var(--black);
}


/* Custom cursor 
 *  Only active on mouse devices (JS adds .has-cursor).
 *  Two full-screen hairlines + a small square at the tip.
 *  Position is driven by --cx / --cy CSS custom properties.
*/
body.has-cursor,
body.has-cursor a,
body.has-cursor button {
  cursor: none;
}

.cur-h,
.cur-v {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(37, 33, 32, 0.28);
  pointer-events: none;
  z-index: 9998;
}

.cur-h {
  width: 100vw;
  height: 1px;
  transform: translateY(var(--cy, -100px));
}

.cur-v {
  width: 1px;
  height: 100vh;
  transform: translateX(var(--cx, -100px));
}


/* cross hair */
.cur-dot {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(var(--cx, -100px), var(--cy, -100px)) translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
}

.cur-dot::before,
.cur-dot::after {
  content: "";
  position: absolute;
  background: var(--black);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cur-dot::before {
  width: 14px;
  height: 2px;
}

/* horizontal arm */
.cur-dot::after {
  width: 2px;
  height: 14px;
}

/* vertical arm   */

/* Green square: rotates to diamond over interactive elements */
.cur-square {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 25px;
  border: 1.5px solid var(--green);
  transform: translate(-50%, -50%);
  /* tweak: size in width/height above */
  transition: transform 300ms ease;
}

.cur-dot.is-hovering .cur-square {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.4);
}

@media (prefers-reduced-motion: reduce) {
  .splash {
    display: none;
  }

  .sponsors__track {
    animation: none;
  }
}


/* Hamburger button (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 1.4rem;
  height: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: var(--black);
  transition: transform 200ms ease, opacity 200ms ease;
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Instagram icon next to hamburger (mobile only) */
.topbar__mobile-actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

.topbar__insta-mobile img {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  background-color: var(--white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav__item {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey);
}

.mobile-nav__item.is-active {
  color: var(--black);
  pointer-events: none;
}


/* Mobile */
@media (max-width: 768px) {

  /* Smaller glitch logo on mobile */
  .splash__wrap {
    width: clamp(180px, 65vw, 320px);
  }

  /* Sand-light background image — always one fixed icon at 20% opacity */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url('./assets/icons/Icons-Sand/Sand[LIGHT]/artefacts-01-sand[LIGHT].png');
    background-size: 85vw auto;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
  }

  /* Hide circuit canvas and corner icons */
  #circuit-canvas {
    display: none !important;
  }

  .bg-icon {
    display: none !important;
  }

  /* Show mobile logo and actions */
  .topbar__logo {
    margin: 0 auto 0 0;
  }

  .topbar__logo-img {
    height: 1.8rem;
  }

  /* Hide desktop nav, show hamburger + insta */
  .topnav {
    display: none;
  }

  .topbar__mobile-actions {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  /* Shrink topbar offset */
  .page {
    padding-top: 4rem;
  }

  /* Hero text */
  .definition__text {
    font-size: 1.25rem;
  }

  .location-ack {
    font-size: 0.55rem;
  }

  /* About sections: no right-align offset, less padding */
  .page-section--right {
    padding-right: 1.5rem;
  }

  .page-section--center {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .page-section {
    max-width: 100%;
  }

  .main--scroll {
    gap: 2.5rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  /* About body text */
  .section-body--large {
    font-size: 1rem;
  }

  /* Sponsors: smaller logos */
  .sponsors-section {
    --logo-h: 3.5rem;
  }

  .sponsors__track {
    gap: 3rem;
  }

  /* Credits: single column, no left margin */
  .credits-section {
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
  }

  .credits-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .credits-col {
    width: 100%;
  }

  /* Address */
  .address-wrap {
    padding: 1.5rem;
  }

  .address-block {
    font-size: 0.55rem;
  }
}