/*
Theme Name: Cosyup World Landing
Theme URI: https://cosyup.world/
Author: Cosyup
Description: Portail immersif et administrable de l'ecosysteme Cosyup World.
Version: 2.0.0
Text Domain: cosyup-world
*/

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Instrument+Sans:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap");

:root {
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--cw-bg, #0b0a09);
}

body.cosyup-landing {
  overflow: hidden;
  color: var(--cw-text, #f7f4ef);
  font-family: "Instrument Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cw-portal {
  --cw-serif: "Instrument Serif", serif;
  --cw-sans: "Instrument Sans", sans-serif;
  --cw-mono: "IBM Plex Mono", monospace;
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--cw-bg);
  perspective: 1150px;
  perspective-origin: 50% 45%;
}

body.admin-bar .cw-portal {
  height: calc(100dvh - 32px);
}

.cw-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transform: translateZ(-30px) scale(1.0261);
  transform-style: preserve-3d;
  will-change: transform;
}

.cw-panel {
  position: relative;
  min-width: 0;
  flex: 1 1 0;
  isolation: isolate;
  overflow: hidden;
  color: var(--cw-text);
  background: var(--cw-panel-bg, #0f0d0b);
  transform: rotateY(var(--cw-fold, 0deg));
  transition:
    transform 750ms cubic-bezier(.19, .79, .22, 1),
    flex-grow 750ms cubic-bezier(.19, .79, .22, 1),
    filter 550ms ease,
    box-shadow 550ms ease;
}

.cw-panel-link {
  position: absolute;
  inset: 0;
  color: inherit;
  text-decoration: none;
}

.cw-panel-media {
  position: absolute;
  z-index: -3;
  inset: -11%;
  display: block;
  transition: transform 180ms linear;
  will-change: transform;
}

.cw-panel-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.7) brightness(.6) contrast(1.1);
  transition: filter 550ms ease, opacity 400ms ease;
}

.cw-panel.is-active .cw-panel-media img {
  filter: saturate(.88) brightness(.69) contrast(1.06);
}

.cw-panel.is-image-missing .cw-panel-media {
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--cw-accent) 20%, transparent), transparent 38%),
    var(--cw-panel-bg);
}

.cw-panel-shade,
.cw-panel-texture {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
}

.cw-panel-shade {
  background: linear-gradient(to top, rgba(15, 13, 11, .96) 0%, rgba(15, 13, 11, .3) 46%, rgba(15, 13, 11, .68) 100%);
}

.cw-panel-texture {
  z-index: -1;
  opacity: .72;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 4px);
}

.cw-panel-number {
  position: absolute;
  top: 15%;
  left: clamp(24px, 3vw, 46px);
  color: var(--cw-accent);
  font: 400 11px/1 var(--cw-mono);
  letter-spacing: .24em;
  transition: transform 180ms linear;
}

.cw-panel-copy {
  position: absolute;
  right: clamp(24px, 3vw, 46px);
  bottom: 8%;
  left: clamp(24px, 3vw, 46px);
  color: var(--cw-text);
  transition: transform 180ms linear;
}

.cw-panel-title {
  display: block;
  margin: 0;
  font: 400 clamp(38px, 3.9vw, 62px)/1 var(--cw-serif);
  letter-spacing: -.015em;
}

.cw-panel-eyebrow {
  display: block;
  margin-top: 12px;
  color: var(--cw-accent);
  font: 400 10.5px/1 var(--cw-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
}

.cw-panel-description {
  max-width: 18em;
  margin: 14px 0 0;
  color: color-mix(in srgb, var(--cw-text) 74%, transparent);
  font: 400 14px/1.6 var(--cw-sans);
}

.cw-panel-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 15px;
  border-top: 1px solid color-mix(in srgb, var(--cw-text) 30%, transparent);
  color: color-mix(in srgb, var(--cw-text) 88%, transparent);
  font: 400 10.5px/1 var(--cw-mono);
  letter-spacing: .16em;
}

.cw-panel-arrow {
  color: var(--cw-accent);
  font-size: 15px;
  transition: transform 250ms ease;
}

.cw-panel:hover .cw-panel-arrow,
.cw-panel:focus-within .cw-panel-arrow {
  transform: translateX(5px);
}

.cw-atmosphere,
.cw-vignette,
.cw-frame,
.cw-masthead,
.cw-footerline {
  position: absolute;
  pointer-events: none;
}

.cw-atmosphere {
  z-index: 4;
  inset: 0;
  background: radial-gradient(700px 540px at 50% 44%, color-mix(in srgb, var(--cw-accent) 17%, transparent), transparent 68%);
}

.cw-vignette {
  z-index: 8;
  inset: 0;
  background: radial-gradient(122% 100% at 50% 45%, transparent 40%, rgba(0, 0, 0, .6) 100%);
}

.cw-frame {
  z-index: 9;
  inset: 26px;
  border: 1px solid color-mix(in srgb, var(--cw-accent) 30%, transparent);
}

.cw-masthead {
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 44px 38px 34px;
  background: linear-gradient(to bottom, rgba(11, 10, 9, .86), rgba(11, 10, 9, 0));
}

.cw-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--cw-text);
}

.cw-brand-main {
  font: 500 18px/1 var(--cw-sans);
  letter-spacing: .15em;
}

.cw-brand-dot {
  width: 4px;
  height: 4px;
  display: block;
  margin-bottom: 2px;
  border-radius: 50%;
  background: var(--cw-accent);
}

.cw-brand-sub {
  color: color-mix(in srgb, var(--cw-text) 76%, transparent);
  font: italic 400 18px/1 var(--cw-serif);
  letter-spacing: .02em;
}

.cw-tagline {
  margin-left: auto;
  color: color-mix(in srgb, var(--cw-text) 74%, transparent);
  font: 400 13px/1 var(--cw-sans);
}

.cw-language {
  position: absolute;
  z-index: 15;
  top: 26px;
  right: 26px;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--cw-text) 10%, transparent);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.cw-language button {
  position: relative;
  min-width: 44px;
  padding: 7px 14px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--cw-text);
  cursor: pointer;
  font: 500 11px/1 var(--cw-mono);
  letter-spacing: .1em;
}

.cw-language button::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: color-mix(in srgb, var(--cw-accent) 85%, transparent);
  opacity: 0;
  transform: scale(.82);
  transition: opacity 220ms ease, transform 220ms ease;
}

.cw-language button.is-active::before {
  opacity: 1;
  transform: scale(1);
}

.cw-footerline {
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 0 38px 32px;
  color: color-mix(in srgb, var(--cw-text) 50%, transparent);
  font: 400 10.5px/1 var(--cw-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.cw-footerline a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
  transition: color 200ms ease;
}

.cw-footerline a:hover { color: var(--cw-accent); }

.cw-mobile-header,
.cw-mobile-footer,
.cw-mobile-nav {
  display: none;
}

.cw-panel,
.cw-masthead,
.cw-footerline,
.cw-frame {
  opacity: 0;
}

.cw-portal.is-ready .cw-panel,
.cw-portal.is-ready .cw-masthead,
.cw-portal.is-ready .cw-footerline,
.cw-portal.is-ready .cw-frame {
  animation: cw-reveal 900ms both cubic-bezier(.2, .8, .2, 1);
}

.cw-portal.is-ready .cw-panel:nth-child(2) { animation-delay: 90ms; }
.cw-portal.is-ready .cw-panel:nth-child(3) { animation-delay: 180ms; }
.cw-portal.is-ready .cw-masthead { animation-delay: 270ms; }
.cw-portal.is-ready .cw-footerline,
.cw-portal.is-ready .cw-frame { animation-delay: 360ms; }

@keyframes cw-reveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; }
}

@media (max-width: 782px) {
  body.admin-bar .cw-portal { height: calc(100dvh - 46px); }
}

@media (max-width: 720px) {
  body.cosyup-landing {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .cw-portal {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    perspective: none;
  }

  body.admin-bar .cw-portal {
    height: calc(100dvh - 46px);
  }

  .cw-scene {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: stretch;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 84px 24px 126px;
    scroll-padding-inline: 24px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    transform: none !important;
  }

  .cw-scene::-webkit-scrollbar { display: none; }

  .cw-panel {
    min-width: calc(100vw - 60px);
    height: 100%;
    flex: 0 0 calc(100vw - 60px) !important;
    border: 1px solid color-mix(in srgb, var(--cw-accent) 24%, transparent);
    border-radius: 2px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transform: none !important;
    filter: none !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32) !important;
    opacity: .62;
    transition: opacity 360ms ease, transform 360ms ease !important;
  }

  .cw-panel.is-mobile-active {
    opacity: 1;
    transform: translateY(-3px) !important;
  }

  .cw-panel-media,
  .cw-panel-number,
  .cw-panel-copy {
    transform: none !important;
  }

  .cw-panel-media { inset: -7%; }
  .cw-panel-media img { filter: saturate(.75) brightness(.61) contrast(1.08); }
  .cw-panel-number { top: 28px; left: 25px; font-size: 9px; }
  .cw-panel-copy { right: 25px; bottom: 26px; left: 25px; }
  .cw-panel-title { font-size: clamp(42px, 13vw, 58px); }
  .cw-panel-eyebrow { margin-top: 10px; font-size: 8.5px; }
  .cw-panel-description { max-width: 25em; margin-top: 12px; font-size: 12.5px; line-height: 1.52; }
  .cw-panel-cta { margin-top: 17px; padding-top: 13px; font-size: 8.5px; }

  .cw-masthead,
  .cw-footerline {
    display: none;
  }

  .cw-mobile-header {
    position: fixed;
    z-index: 12;
    top: 0;
    right: 0;
    left: 0;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 23px;
    border-bottom: 1px solid color-mix(in srgb, var(--cw-accent) 18%, transparent);
    background: color-mix(in srgb, var(--cw-bg) 92%, transparent);
    backdrop-filter: blur(18px);
  }

  body.admin-bar .cw-mobile-header { top: 46px; }

  .cw-brand-main { font-size: 15px; }
  .cw-brand-sub { font-size: 16px; }
  .cw-tagline { display: none; }
  .cw-language { position: fixed; top: 16px; right: 18px; }
  .cw-language button { min-width: 38px; padding: 7px 10px; font-size: 9px; }
  body.admin-bar .cw-language { top: 62px; }

  .cw-mobile-footer {
    position: fixed;
    z-index: 12;
    right: 0;
    bottom: 57px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 0 24px 13px;
    color: color-mix(in srgb, var(--cw-text) 48%, transparent);
    font-family: var(--cw-mono);
    font-size: 7px;
    line-height: 1.35;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .cw-mobile-footer > span {
    max-width: 29ch;
  }

  .cw-mobile-footer a {
    color: color-mix(in srgb, var(--cw-text) 68%, transparent);
    text-decoration: none;
  }

  .cw-mobile-nav {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    height: 58px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 0 22px;
    border-top: 1px solid color-mix(in srgb, var(--cw-accent) 22%, transparent);
    background: color-mix(in srgb, var(--cw-bg) 94%, transparent);
    backdrop-filter: blur(18px);
    color: color-mix(in srgb, var(--cw-text) 58%, transparent);
    font: 400 8px/1 var(--cw-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .cw-mobile-progress {
    display: flex;
    align-items: center;
    gap: 7px;
    color: color-mix(in srgb, var(--cw-text) 76%, transparent);
  }

  .cw-mobile-progress-line {
    width: 18px;
    height: 1px;
    background: color-mix(in srgb, var(--cw-accent) 48%, transparent);
  }

  .cw-mobile-dots {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .cw-mobile-dots button {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--cw-accent) 52%, transparent);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: width 250ms ease, border-radius 250ms ease, background 250ms ease;
  }

  .cw-mobile-dots button.is-active {
    width: 18px;
    border-radius: 10px;
    background: var(--cw-accent);
  }

  .cw-frame { display: none; }
  .cw-atmosphere, .cw-vignette { position: fixed; }
  .cw-vignette { background: linear-gradient(to right, rgba(0, 0, 0, .3), transparent 14%, transparent 86%, rgba(0, 0, 0, .46)); }
}

@media (max-width: 380px) {
  .cw-scene { padding-inline: 18px; scroll-padding-inline: 18px; }
  .cw-panel { min-width: calc(100vw - 46px); flex-basis: calc(100vw - 46px) !important; }
  .cw-mobile-hint { display: none; }
  .cw-mobile-nav { grid-template-columns: 1fr auto; }
  .cw-mobile-footer { padding-inline: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
