@tailwind base;
@tailwind components;
@tailwind utilities;

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #bae7c1;
    color: #0c2e15;
}

:focus-visible {
    outline: 3px solid #0a8fc9;
    outline-offset: 3px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border-radius: 9999px;
    padding: .85rem 1.6rem;
    font-size: .975rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #ed1c24;
    color: #fff;
    box-shadow: 0 10px 24px -10px rgba(237, 28, 36, .6);
}

.btn-primary:hover {
    background: #d1141c;
}

.btn-green {
    background: #267b34;
    color: #fff;
}

.btn-green:hover {
    background: #21612c;
}

.btn-outline {
    border: 1.5px solid #267b34;
    color: #267b34;
    background: transparent;
}

.btn-outline:hover {
    background: #267b34;
    color: #fff;
}

.btn-light {
    background: #fff;
    color: #1b4f26;
}

.btn-light:hover {
    background: #f0faf1;
}

.btn-outline-light {
    border: 1.5px solid rgba(255, 255, 255, .55);
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #267b34;
}

.eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.eyebrow-light {
    color: #8dd599;
}

#site-header {
    transition: box-shadow .25s, border-color .25s;
}

#site-header.is-scrolled {
    box-shadow: 0 10px 30px -20px rgba(20, 35, 26, .4);
    border-color: rgba(20, 35, 26, .06);
}

.field {
    width: 100%;
    border-radius: .875rem;
    border: 1px solid rgba(20, 35, 26, .18);
    background: #fff;
    padding: .8rem 1rem;
    font-size: 1rem;
    color: #14231a;
    transition: border-color .2s, box-shadow .2s;
}

.field::placeholder {
    color: rgba(20, 35, 26, .45);
}

.field:focus {
    border-color: #3db54e;
    box-shadow: 0 0 0 4px rgba(61, 181, 78, .18);
    outline: none;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 9999px;
    border: 1px solid rgba(20, 35, 26, .15);
    background: #fff;
    padding: .35rem .85rem;
    font-size: .8125rem;
    font-weight: 600;
    color: #267b34;
    transition: all .2s;
    white-space: nowrap;
}

.copy-btn:hover {
    border-color: #3db54e;
    background: #f0faf1;
}

.copy-btn.is-copied {
    background: #267b34;
    border-color: #267b34;
    color: #fff;
}

.zoom-range {
    accent-color: #3db54e;
}

.zoom-range::-webkit-slider-runnable-track {
    height: .35rem;
    border-radius: 9999px;
    background: #d9f2dc;
}

.zoom-range::-webkit-slider-thumb {
    width: 1rem;
    height: 1rem;
    margin-top: -.325rem;
    border: 2px solid #fff;
    border-radius: 9999px;
    background: #3db54e;
    box-shadow: 0 1px 3px rgba(20, 35, 26, .25);
    appearance: none;
}

.zoom-range::-moz-range-track {
    height: .35rem;
    border-radius: 9999px;
    background: #d9f2dc;
}

.zoom-range::-moz-range-progress {
    height: .35rem;
    border-radius: 9999px;
    background: #8dd599;
}

.zoom-range::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border: 2px solid #fff;
    border-radius: 9999px;
    background: #3db54e;
    box-shadow: 0 1px 3px rgba(20, 35, 26, .25);
}

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s ease, transform .7s ease;
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.js .reveal[data-delay="1"] {
    transition-delay: .1s;
}

.js .reveal[data-delay="2"] {
    transition-delay: .2s;
}

.js .reveal[data-delay="3"] {
    transition-delay: .3s;
}

body.admin-layout {
    overflow: hidden;
}

body.selection-mode #sidebar,
body.selection-mode header {
    filter: grayscale(1);
    opacity: .55;
    pointer-events: none;
    user-select: none;
}

body.selection-mode #sidebar {
    cursor: not-allowed;
}

:root {
    --green: #3db54e;
    --red: #ed1c24;
    --blue: #00aeef;
    --purple: #a89899;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .btn,
    .btn:hover {
        transition: none;
        transform: none;
    }
}
