/* ═══════════════════════════════════════
   MONADE — One-Pager Layout Styles
   style-onepage.css
═══════════════════════════════════════ */

/* ── Global background canvas ── */
#bg-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: -3 !important;
  pointer-events: none !important;
}

/* ── Body & Main ── */
body {
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: transparent !important;
  height: auto !important;
  animation: none !important;
}

html {
  background: transparent !important;
  height: auto !important;
  overflow-y: auto !important;
}

#ALL {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

@media (max-width: 768px) {
  #ALL {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
}

/* ── Sections ── */
.op-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* ── Hero ── */
#home {
  background: transparent;
}

/* Crossfading project images behind the hero card */
#index-background {
  position: fixed !important;
  inset: 0 !important;
  overflow: hidden !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

#index-background img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 0 !important;
  transition: opacity 2s ease !important;
}

#index-background img.visible {
  opacity: 1 !important;
}

.hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8vw;
  padding-top: 10vh;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.hero-content {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 48px 56px;
  max-width: 100%;
  animation: fadeInSmooth 1s cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
}
.hero-content::before {
  content: '';
  position: absolute;
  inset: -200px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 25%, transparent 50%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: -1;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-content:hover::before {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hname-o {
  position: relative;
  display: inline-block;
}

.dot-anim {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
}

.hname-o {
  position: relative;
  display: inline-block;
}

.hname {
  font-family: 'Virginia', serif;
  font-size: clamp(6rem, 28vw, 22rem);
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

.hname-link {
  text-decoration: none;
  color: inherit;
  display: block;
  outline: none !important;
}

.hname-link:focus {
  outline: none !important;
  box-shadow: none !important;
}

.value-prop-static {
  font-family: 'Host Grotesk', sans-serif;
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  margin: 0 0 0;
}

.hero-expand {
  overflow: hidden;
  margin-bottom: 0;
}

.hero-text-zone {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease 0.1s, margin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 0;
}

.hero-extra {
  overflow: hidden;
}

.hero-extra-zone {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s, opacity 0.4s ease 0.25s, margin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 30px;
}

.hero-text {
  font-family: 'Host Grotesk', sans-serif;
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

.hero-text-extra {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  letter-spacing: 0.5px;
}

.hero-text-group:hover .hero-text-zone {
  max-height: 100px;
  opacity: 1;
  margin-bottom: 8px;
}

.hero-text-group:hover .hero-extra-zone {
  max-height: 300px;
  opacity: 1;
  margin-bottom: 60px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Works section ── */
.op-works {
  align-items: flex-start;
  padding-top: 100px;
  padding-bottom: 60px;
  background: transparent !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
  line-height: normal !important;
  font-size: 16px !important;
  font-family: 'Host Grotesk', sans-serif !important;
  height: auto !important;
  text-decoration: none !important;
}

/* Override legacy black colour from style.css */
.op-works .travaux,
.op-works .travaux h1,
.op-works .travaux h2,
.op-works .travaux h3,
.op-works .travaux p,
.op-works .travaux span,
.op-works .travaux a,
.op-works .travaux .year-title,
.op-works .travaux .discipline-name h1 {
  color: #ffffff !important;
}

  #travaux {
    width: 100%;
    padding: 0;
    margin-top: 6vh;
    position: relative;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

/* ── Works grid ── */
#workpage,
.Works,
#workpage.Works,
#travaux .Works {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 8px 8px 0 8px !important;
  margin-top: 30px !important;
  height: auto !important;
  box-sizing: border-box !important;
}

/* Date/name simple grid */
#workpage:not(.grouped),
.Works:not(.grouped) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
  gap: 0 !important;
  padding: 0 40px;
}

#workpage:not(.grouped) .project,
.Works:not(.grouped) .project {
  width: auto !important;
}

.group-wrapper {
  display: inline-flex;
  flex-direction: column;
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow: visible;
  vertical-align: top;
}

.group-wrapper:last-child {
  border-right: none;
}

.group-grid {
  display: grid;
  gap: 12px;
  overflow: visible;
  width: 100%;
}

.group-title {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0 0 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.op-works .project {
  max-width: none !important;
  width: auto !important;
  min-width: 200px !important;
  height: auto !important;
  margin: 0 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  background: rgba(15, 15, 15, 0.7) !important;
  opacity: 1 !important;
  color: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  transition: border-color 0.25s ease, background-color 0.25s ease !important;
  position: relative !important;
}

/* Subtle non-disruptive hover on cards */
.op-works .project:hover,
.Works .project:hover,
#workpage .project:hover {
  border-color: rgba(255,255,255,0.4) !important;
  background: rgba(25, 25, 25, 0.85) !important;
  transform: none !important;
}

/* Disable all legacy timeline hover height/width expansions */
#timeline .project,
#timeline .project:hover,
#timeline .project .content,
#timeline .project:hover .content,
.case:hover .project,
.case:hover .project:hover,
.case:hover .project .content,
.case:hover .project:hover .content {
  height: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  opacity: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.op-works .project-link {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  height: 100% !important;
  text-decoration: none !important;
  color: #fff !important;
  position: relative !important;
}

.op-works .project-header {
  padding: 18px 20px 12px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  position: relative !important;
  z-index: 2 !important;
  overflow: hidden !important;
}

.op-works .project-header h2 {
  font-size: clamp(1rem, 1.5vw, 1.35rem) !important;
  color: #fff !important;
  margin: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
  min-width: 0 !important;
  line-height: 1.3 !important;
}

.op-works .project-meta {
  font-size: 0.73rem !important;
  color: rgba(255,255,255,0.45) !important;
  white-space: nowrap !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex-shrink: 0 !important;
  position: relative !important;
  top: -2px !important;
}

.op-works .project .content {
  position: relative !important;
  overflow: hidden !important;
  flex-grow: 1 !important;
}

.op-works .project .img-container {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  z-index: 0 !important;
}

.op-works .project .img-content {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  opacity: 0 !important;
  transition: opacity 0.5s ease !important;
}

.op-works .project .img-content.active {
  opacity: 1 !important;
  z-index: 1 !important;
}

/* Hide the old AV-IMG and img wrappers' extra overhead */
.op-works .AV-IMG { display: contents !important; }
.op-works .img    { display: contents !important; }

.op-works .project-info {
  padding: 18px 20px !important;
  position: relative !important;
  z-index: 2 !important;
}

.op-works .texte_travaux {
  display: none !important;
}

.op-works .project-tech {
  margin-top: 8px !important;
  font-size: 0.72rem !important;
  color: rgba(255,255,255,0.4) !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}

.op-works .project-highlight {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
}

/* ── Sorting & Filtering controls ── */
.sorting-controls {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
  font-size: 16px !important;
  line-height: normal !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  position: relative !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  background: rgba(0,0,0,0.3) !important;
}

.sort-group, .filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.sort-group span, .filter-group span {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.control-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.sorting-controls button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-family: 'Host Grotesk', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  width: auto;
  min-width: auto;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1.2 !important;
  margin: 0 !important;
}

.sorting-controls button:hover,
.sorting-controls button.active,
.sorting-controls button[aria-pressed="true"] {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

/* ── Contact bar ── */
.contact-bar {
  position: fixed;
  bottom: 24px;
  right: 28px;
  z-index: 100;
}

.index-contact-link {
  font-family: 'Host Grotesk', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.25s;
}

.index-contact-link:hover { color: #fff; }

/* ── Footer ── */
footer {
  position: sticky !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  background: rgba(0,0,0,0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  text-align: center;
  padding: 8px 20px;
  font-family: 'Host Grotesk', sans-serif;
  font-size: 0.7rem !important;
  color: rgba(255,255,255,0.3);
  z-index: 99999 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}

.footer-sep {
  color: rgba(255,255,255,0.15);
}

.footer-legal {
  color: rgba(255,255,255,0.3);
}

/* ── Nav active state for scroll spy ── */
.nav-links a.is-active {
  color: #fff !important;
  filter: none !important;
  opacity: 1 !important;
}

.nav-logo {
  font-family: 'Virginia', Arial, sans-serif;
  font-size: 2rem;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s ease;
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 20px;
  white-space: nowrap;
}

.nav-name {
  font-family: 'Host Grotesk', Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Hamburger menu ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 100002;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  html, body {
    overflow: hidden !important;
  }

  #ALL {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 100vh;
  }

  .hero-content {
    padding: 30px 24px;
    max-width: 100%;
  }

  .hero-wrapper {
    padding: 0 5vw;
    align-items: flex-end;
    padding-bottom: 49vh;
  }

  #home {
    align-items: flex-end;
    min-width: 100vw;
    flex-shrink: 0;
  }

  .op-works {
    min-width: 100vw;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 96px;
    box-sizing: border-box;
  }

  .op-works .sorting-controls {
    position: sticky;
    top: 6vh;
    z-index: 10;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
  }

  .op-works .Works {
    flex: 1;
    min-height: 0;
  }

  .op-works .project {
    height: 280px !important;
  }

  .op-works .project .content {
    height: 200px !important;
  }

  .op-works .project .img-content {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .op-section:not(.op-works) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
  }

  #travaux {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .Works {
    grid-template-columns: 1fr;
  }

  .contact-bar {
    display: none;
  }

  .sorting-controls {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 6px;
    padding: 10px 12px;
  }

  .sort-group, .filter-group {
    gap: 5px;
    flex-wrap: wrap;
  }

  .control-divider {
    display: none;
  }

  .sorting-controls button {
    padding: 4px 8px;
    font-size: 0.62rem;
    margin: 0;
  }

  .sort-group span, .filter-group span {
    font-size: 0.55rem;
    letter-spacing: 1px;
  }

  .op-works .project-meta {
    white-space: normal !important;
    text-overflow: unset !important;
  }

  .op-works .project-header {
    flex-direction: row !important;
    align-items: center !important;
    overflow: hidden !important;
  }

  .op-works .project-meta {
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    position: relative !important;
    top: -2px !important;
  }

  #workpage:not(.grouped),
  .Works:not(.grouped) {
    grid-template-columns: 1fr !important;
    padding: 0 16px !important;
    gap: 10px !important;
    justify-items: center;
  }

  #workpage,
  .Works,
  #workpage.Works,
  #travaux .Works {
    padding-top: 3vh !important;
  }

  .group-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 12px;
    overflow: hidden;
    height: 530px;
  }

  .op-works .project {
    height: 500px !important;
  }

  .group-grid {
    display: flex !important;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    height: 600px;
  }

  .group-grid::-webkit-scrollbar {
    display: none;
  }

  .group-grid .project {
    min-width: 78vw !important;
    width: 78vw !important;
    max-width: 78vw !important;
    height: auto !important;
  }

  #workpage:not(.grouped) .project,
  .Works:not(.grouped) .project {
    min-width: 78vw !important;
    width: 78vw !important;
    max-width: 78vw !important;
    aspect-ratio: 2 / 3 !important;
  }

  .group-grid::-webkit-scrollbar {
    display: none;
  }

  .group-wrapper {
    padding: 12px;
    overflow: hidden;
  }

  .group-title {
    font-size: 0.65rem;
    padding: 16px 0 8px;
  }

  .hname {
    font-size: clamp(3rem, 22vw, 8rem);
    white-space: nowrap;
  }

  /* Nav responsive */
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 6vh;
    left: 0;
    width: 100%;
    height: calc(100vh - 6vh);
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1.5rem;
    padding: 10px 20px;
  }

  .nav-name {
    display: none;
  }

  .nav-logo {
    padding-left: 0;
  }

  .bio-fixed-title {
    bottom: 20px;
    left: 20px;
  }

  .bio-title-main {
    font-size: 2.5rem;
  }

  .bio-title-sub {
    font-size: 0.8rem;
  }

  .contact-fixed-title {
    bottom: 20px;
    left: 20px;
  }

  .contact-title-main {
    font-size: 2.5rem;
  }

  .contact-title-sub {
    font-size: 0.8rem;
  }

  .contact-side {
    flex-direction: column;
    gap: 12px;
  }

  .contact-side .email-line a {
    font-size: 0.75rem;
  }

  .contact-side .insta-handle {
    font-size: 0.8rem;
  }

  .footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.5rem;
  }

  .footer .footer-sep {
    display: none;
  }

  .footer .index-contact-link {
    font-size: 0.5rem;
  }

  .footer .footer-legal {
    font-size: 0.45rem;
  }

  .hero-content {
    padding: 20px;
  }

  .value-prop-static {
    font-size: 0.8rem;
  }

  .hero-text-extra {
    font-size: 0.8rem;
  }

  .hero-cta .btn {
    font-size: 0.75rem;
    padding: 8px 16px;
  }
}