/**
 * Fichier  : /features/on-off/assets/css/style.css
 * Fonction : écran plein écran et logo animé en continu
 */

/* ==================================================
   FONTS
================================================== */

@font-face {
    font-family: 'on-off-bold';

    src: url('../../../fonts/all-fonts/Nexa-Heavy.ttf') format('truetype');

    font-display: swap;
}

@font-face {
    font-family: 'on-off-content';

    src: url('../../../fonts/all-fonts/Roboto-Light.ttf') format('truetype');

    font-display: swap;
}

/* ==================================================
   GLOBAL
================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html,
body {
    margin: 0;
}

html,
body {
    background: #090909;
}

body {
    color: #f3f1eb;
}

body {
    font-family: 'on-off-content', Arial, sans-serif;
}

/* ==================================================
   ON-OFF
================================================== */

#on-off {
    position: relative;
}

#on-off {
    min-height: 100svh;
}

#on-off {
    padding: 90px 24px 105px;
}

#on-off {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#on-off {
    overflow-wrap: anywhere;
}

#on-off {
    text-align: center;
}

#on-off .inner {
    width: 100%;
    max-width: 800px;
}

/* ==================================================
   LOGO
================================================== */

#on-off .logo {
    width: min(62vw, 340px);
}

#on-off .logo {
    margin: 0 auto 48px;
}

#on-off .logo {
    animation: on-off-breathe 4s ease-in-out infinite;
}

#on-off .logo svg {
    width: 100%;
    height: auto;
}

#on-off .logo svg {
    display: block;
}

#on-off .logo svg {
    overflow: visible;
}

#on-off .logo .site-loader__letter {
    animation: on-off-letter 4s ease-in-out infinite;
}

#on-off .logo .site-loader__letter--w {
    animation-delay: .12s;
}

#on-off .logo .site-loader__letter--p {
    animation-delay: .24s;
}

#on-off .logo .site-loader__letter--l {
    animation-delay: .36s;
}

#on-off .logo .site-loader__ring {
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
}

#on-off .logo .site-loader__ring {
    animation: on-off-ring 4s cubic-bezier(.45,0,.25,1) infinite;
}

#on-off .logo .site-loader__ring--silver {
    animation-delay: .3s;
}

/* ==================================================
   EYEBROW
================================================== */

#on-off .eyebrow {
    margin: 0 0 20px;
}

#on-off .eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#on-off .eyebrow {
    color: #e5cf91;
}

#on-off .eyebrow {
    font-family: 'on-off-bold',Arial,sans-serif;
    font-size: 10px;
    line-height: 1.6;
    text-transform: uppercase;
    letter-spacing: .18em;
}

#on-off .eyebrow > span {
    width: 6px;
    height: 6px;
}

#on-off .eyebrow > span {
    border-radius: 50%;
    background: #e5cf91;
}

/* ==================================================
   TITLE
================================================== */

#on-off h1 {
    max-width: 760px;
}

#on-off h1 {
    margin: 0 auto;
}

#on-off h1 {
    font-family: 'on-off-bold',Arial,sans-serif;
    font-weight: 400;
    font-size: clamp(30px,4.5vw,54px);
    line-height: 1.08;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

/* ==================================================
   MESSAGE
================================================== */

#on-off .message {
    max-width: 560px;
}

#on-off .message {
    margin: 25px auto 0;
}

#on-off .message {
    white-space: pre-line;
}

#on-off .message {
    color: #aaa9a4;
}

#on-off .message {
    font-size: 15px;
    line-height: 1.85;
}

/* ==================================================
   MOTION
================================================== */

#on-off .motion {
    margin-top: 35px;
}

#on-off .motion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

#on-off .motion span {
    width: 4px;
    height: 4px;
}

#on-off .motion span {
    border-radius: 50%;
    background: #e5cf91;
}

#on-off .motion span {
    animation: on-off-dot 1.8s ease-in-out infinite;
}

#on-off .motion span:nth-child(2) {
    animation-delay: .2s;
}

#on-off .motion span:nth-child(3) {
    animation-delay: .4s;
}

/* ==================================================
   PREVIEW
================================================== */

#on-off .preview {
    position: absolute;
    inset: 0 0 auto;
}

#on-off .preview {
    padding: 12px 20px;
}

#on-off .preview {
    background: #e5cf9110;
    color: #e5cf91;
}

#on-off .preview {
    font-size: 12px;
    line-height: 1.6;
}

#on-off .preview a {
    color: inherit;
}

#on-off .preview a {
    text-underline-offset: 3px;
}

/* ==================================================
   ANIMATIONS
================================================== */

@keyframes on-off-ring {
    0% {
        stroke-dashoffset: 100;
        opacity: .35;
    }

    38%,
    62% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: -100;
        opacity: .35;
    }
}

@keyframes on-off-breathe {
    0%,
    100% {
        transform: scale(.99);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes on-off-letter {
    0%,
    100% {
        opacity: .8;
    }

    50% {
        opacity: 1;
    }
}

@keyframes on-off-dot {
    0%,
    80%,
    100% {
        opacity: .3;
    }

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        opacity: 1;
    }

    40% {
        transform: translateY(-3px);
    }
}

/* ==================================================
   MOBILE
================================================== */

@media (max-width:600px) {
    #on-off {
        padding-top: 75px;
        padding-bottom: 95px;
    }

    #on-off .logo {
        margin-bottom: 38px;
    }

    #on-off .message {
        font-size: 14px;
    }
}

/* ==================================================
   REDUCED MOTION
================================================== */

@media (prefers-reduced-motion: reduce) {
    #on-off .logo,
    #on-off .logo .site-loader__letter,
    #on-off .logo .site-loader__ring,
    #on-off .motion span {
        animation: none;
    }

    #on-off .logo .site-loader__ring {
        stroke-dashoffset: 0;
    }
}
