/* ==========================================================
   NORTH SCOTT GEMSTONES
   BUTTONS
========================================================== */


/* ==========================================================
   BUTTON GROUP
========================================================== */

.buttons{

    display:grid;

    grid-template-columns:repeat(2,220px);

    justify-content:center;

    gap:20px;

    margin-top:40px;

}


.buttons .primary{

    grid-column:1 / 3;

    justify-self:center;

}


/* ==========================================================
   BASE BUTTON
========================================================== */

.button{

    position:relative;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    min-height:58px;

    padding:0 34px;

    overflow:hidden;

    border:1px solid transparent;

    border-radius:var(--radius-pill);

    font-family:var(--font-main);

    font-size:1rem;

    font-weight:var(--weight-medium);

    line-height:1;

    text-align:center;

    cursor:pointer;

    box-shadow:
        0 8px 24px rgba(47,49,51,.055);

    transition:
        transform .4s ease,
        box-shadow .4s ease,
        background-color .4s ease,
        border-color .4s ease,
        color .4s ease;

}


/*
   Button text must remain above the shimmer layer.
*/

.button > *{

    position:relative;

    z-index:2;

}


/* ==========================================================
   PRIMARY BUTTON
========================================================== */

.button-primary{

    background:var(--button-primary);

    color:var(--charcoal);

}


/*
   Soft white-light reflection for sage buttons.
*/

.button-primary::before{

    content:"";

    position:absolute;

    z-index:1;

    top:-20%;

    left:-85%;

    width:52%;

    height:140%;

    pointer-events:none;

    opacity:0;

    transform:skewX(-18deg);

    background:

        linear-gradient(
            110deg,
            transparent 0%,
            rgba(255,255,255,.12) 28%,
            rgba(255,255,255,.58) 50%,
            rgba(255,255,255,.16) 72%,
            transparent 100%
        );

}


/* ==========================================================
   SECONDARY BUTTON
========================================================== */

.button-secondary{

    background:rgba(252,251,248,.88);

    border-color:rgba(214,216,219,.92);

    color:var(--charcoal);

    backdrop-filter:blur(10px);

}


/*
   A soft prism-light reflection for cream buttons.

   The colours remain low-opacity so the effect looks like
   refracted light rather than a rainbow graphic.
*/

.button-secondary::before{

    content:"";

    position:absolute;

    z-index:1;

    top:-16%;

    left:-92%;

    width:38%;

    height:132%;

    pointer-events:none;

    opacity:0;

    transform:skewX(-18deg);

    filter:blur(1px);

    background:

        linear-gradient(
            110deg,

            transparent 0%,

            rgba(167,137,205,0) 14%,
            rgba(167,137,205,.20) 28%,

            rgba(124,183,214,.18) 42%,

            rgba(150,201,145,.19) 56%,

            rgba(226,190,112,.18) 70%,

            rgba(184,143,210,.19) 84%,
            rgba(184,143,210,0) 94%,

            transparent 100%

        );

}

/*
   A soft highlight above the colour refraction keeps the
   shimmer feeling like light passing over a polished surface.
*/

.button-secondary::after{

    content:"";

    position:absolute;

    z-index:1;

    top:0;

    left:-85%;

    width:34%;

    height:100%;

    pointer-events:none;

    opacity:0;

    transform:skewX(-18deg);

    background:

        linear-gradient(
            110deg,
            transparent 0%,
            rgba(255,255,255,.03) 28%,
            rgba(255,255,255,.10) 50%,
            rgba(255,255,255,.03) 72%,
            transparent 100%
        );

}


/* ==========================================================
   HOVER
========================================================== */

.button:hover{

    transform:translateY(-3px);

    box-shadow:
        0 16px 38px rgba(47,49,51,.095);

}


.button-primary:hover{

    background:var(--button-hover);

    color:var(--charcoal);

}


.button-secondary:hover{

    background:rgba(252,251,248,.96);

    border-color:rgba(141,137,196,.34);

    color:var(--charcoal);

}


/* ==========================================================
   SHIMMER MOVEMENT
========================================================== */

.button-primary:hover::before{

    opacity:1;

    animation:
        primaryButtonShimmer .95s ease-out forwards;

}


.button-secondary:hover::before{

    opacity:1;

    animation:
        prismButtonShimmer 1.15s ease-out forwards;

}


.button-secondary:hover::after{

    opacity:1;

    animation:
        secondaryButtonHighlight 1.05s ease-out forwards;

}


/* ==========================================================
   ACTIVE
========================================================== */

.button:active{

    transform:translateY(0);

    box-shadow:
        0 7px 18px rgba(47,49,51,.07);

}


/* ==========================================================
   FOCUS
========================================================== */

.button:focus-visible{

    outline:2px solid var(--lavender);

    outline-offset:5px;

}


/* ==========================================================
   DISABLED
========================================================== */

.button:disabled,
.button[aria-disabled="true"]{

    opacity:.5;

    pointer-events:none;

    box-shadow:none;

}


/* ==========================================================
   ANIMATIONS
========================================================== */

@keyframes primaryButtonShimmer{

    0%{

        left:-85%;

        opacity:0;

    }

    18%{

        opacity:1;

    }

    100%{

        left:145%;

        opacity:0;

    }

}


@keyframes prismButtonShimmer{

    0%{

        left:-105%;

        opacity:0;

    }

    16%{

        opacity:.85;

    }

    100%{

        left:145%;

        opacity:0;

    }

}


@keyframes secondaryButtonHighlight{

    0%{

        left:-85%;

        opacity:0;

    }

    18%{

        opacity:.7;

    }

    100%{

        left:145%;

        opacity:0;

    }

}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:700px){

    .buttons{

        width:100%;

        grid-template-columns:1fr;

        gap:14px;

    }


    .buttons .primary{

        grid-column:auto;

        width:100%;

    }


    .buttons .button{

        width:100%;

    }

}


/* ==========================================================
   REDUCED MOTION
========================================================== */

@media(prefers-reduced-motion:reduce){

    .button:hover{

        transform:none;

    }


    .button-primary:hover::before,
    .button-secondary:hover::before,
    .button-secondary:hover::after{

        animation:none;

        opacity:0;

    }

}