/* Gemz coming soon page (resources/views/coming-soon.blade.php) and private preview password page.
   Light theme by default; [data-theme="dark"] on <html> switches the tokens below. */

:root {
    --cs-bg: #f5f5f5;
    --cs-text: #151515;
    --cs-logo: #000;
    --cs-muted: #646464;
    --cs-subtle: #707070;
    --cs-accent: #737373;
    --cs-meta: #676767;
    --cs-categories: #303030;
    --cs-line: #e5e5e5;
    --cs-divider: #d2d2d2;
    --cs-hover: #0000000a;
    --cs-field-bg: #fff;
    --cs-field-border: #ddd;
    --cs-placeholder: #777;
    --cs-button-bg: #101010;
    --cs-button-text: #fff;
    --cs-button-size: 14px;
    --cs-button-shadow: rgba(0, 0, 0, .18);
    --cs-error: #b42318;
    --cs-card-bg: radial-gradient(ellipse at 75% 0%, #454545 0%, #242424 35%, #101010 78%);
    --cs-card-border: #494949;
    --cs-card-text: #aaa;
    --cs-wordmark-opacity: .8;
    --cs-seal-border: #626262;
    --cs-seal-text: #eee;
    color-scheme: light;
}

/* Dark palette sampled from the original Gemz theme */
:root[data-theme="dark"] {
    --cs-bg: #151515;
    --cs-text: #fff;
    --cs-logo: #fff;
    --cs-muted: rgba(255, 255, 255, .7);
    --cs-subtle: rgba(255, 255, 255, .7);
    --cs-accent: #fff;
    --cs-meta: rgba(255, 255, 255, .7);
    --cs-categories: rgba(255, 255, 255, .7);
    --cs-line: rgba(255, 255, 255, .12);
    --cs-divider: rgba(255, 255, 255, .12);
    --cs-hover: #ffffff12;
    --cs-field-bg: linear-gradient(180deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, .08) 70%), rgba(255, 255, 255, .02);
    --cs-field-border: transparent;
    --cs-placeholder: rgba(255, 255, 255, .7);
    --cs-button-bg: #fff;
    --cs-button-text: #000;
    --cs-button-size: 16px;
    --cs-button-shadow: rgba(255, 255, 255, .16);
    --cs-error: #ff8a80;
    --cs-card-bg: linear-gradient(180deg, rgba(255, 255, 255, .03) 0%, rgba(255, 255, 255, .1) 100%);
    --cs-card-border: transparent;
    --cs-card-text: rgba(255, 255, 255, .7);
    --cs-wordmark-opacity: 1;
    --cs-seal-border: rgba(255, 255, 255, .2);
    --cs-seal-text: #fff;
    color-scheme: dark;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--cs-bg);
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
    background: var(--cs-bg);
    color: var(--cs-text);
    font-family: 'Raleway', sans-serif;
    line-height: 1.5;
}

h1,
p {
    margin: 0;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    display: block;
    flex-shrink: 0;
}

.cs-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Header (sticky on every screen size) */
.cs-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 79px;
    padding: 0 max(42px, calc((100% - 1356px) / 2));
    border-bottom: 1px solid var(--cs-line);
    background: var(--cs-bg);
}

.cs-header.is-scrolled {
    box-shadow: 0 3px 12px #00000008;
}

.cs-logo {
    width: auto;
    height: 18px;
    aspect-ratio: 82 / 19;
    color: var(--cs-logo);
}

.cs-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cs-header-note {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cs-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: cs-pulse 2.4s ease-out infinite;
}

.cs-theme-toggle {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    transition: background-color .2s ease, transform .2s ease;
}

.cs-theme-toggle:active {
    transform: scale(.92);
}

.cs-theme-toggle svg {
    width: 22px;
    height: 22px;
}

.cs-theme-toggle .cs-moon,
[data-theme="dark"] .cs-theme-toggle .cs-sun {
    display: none;
}

[data-theme="dark"] .cs-theme-toggle .cs-moon {
    display: block;
}

@media (hover: hover) {
    .cs-theme-toggle:hover {
        background: var(--cs-hover);
    }
}

/* Hero */
.cs-vault {
    padding: 73px max(56px, calc((100% - 1328px) / 2)) 38px;
}

.cs-hero-grid {
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    gap: 24px;
    align-items: center;
    min-height: 493px;
}

.cs-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.cs-copy h1 {
    margin: 25px 0 23px;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
}

.cs-copy h1 span {
    color: var(--cs-accent);
}

.cs-description {
    max-width: 355px;
    color: var(--cs-muted);
    font-size: 18px;
    line-height: 1.6;
}

/* Signup form */
.cs-signup {
    max-width: 420px;
    margin-top: 32px;
}

.cs-signup-label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

.cs-form {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px;
    border: 1px solid var(--cs-field-border);
    border-radius: 50px;
    background: var(--cs-field-bg);
    color: var(--cs-text);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.cs-form:focus-within {
    border-color: var(--cs-text);
    box-shadow: 0 0 0 4px var(--cs-hover);
}

.cs-form:has(input[aria-invalid="true"]) {
    border-color: var(--cs-error);
}

.cs-form.is-shaking {
    animation: cs-shake .4s ease;
}

.cs-form[aria-busy="true"] input {
    opacity: .6;
}

.cs-form input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 30px;
    background: transparent;
    color: inherit;
    font-size: 16px;
    line-height: 1.6;
    transition: opacity .2s ease;
}

.cs-form input::placeholder {
    color: var(--cs-placeholder);
    opacity: 1;
}

.cs-form button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 18px;
    border: 0;
    border-radius: 40px;
    background: var(--cs-button-bg);
    color: var(--cs-button-text);
    font-size: var(--cs-button-size);
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cs-button-label {
    display: flex;
    align-items: center;
    gap: 14px;
    transition: opacity .15s ease;
}

.cs-form button svg {
    width: 16px;
    height: 16px;
    transition: transform .25s ease;
}

@media (hover: hover) {
    .cs-form button:not(:disabled):hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px var(--cs-button-shadow);
    }

    .cs-form button:not(:disabled):hover svg {
        transform: translate(2px, -2px);
    }
}

.cs-form button:not(:disabled):active {
    transform: scale(.97);
    box-shadow: none;
}

.cs-form button:disabled {
    cursor: progress;
}

/* Loading state: the label hides (keeping the button's width) and a spinner takes its place */
.cs-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    opacity: 0;
    animation: cs-spin .7s linear infinite;
    transition: opacity .15s ease;
}

.cs-form button.is-loading .cs-button-label {
    opacity: 0;
}

.cs-form button.is-loading .cs-spinner {
    opacity: 1;
}

.cs-theme-toggle:focus-visible,
.cs-form button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* The whole pill shows focus (see .cs-form:focus-within) */
.cs-form input:focus-visible {
    outline: none;
}

.cs-note {
    margin-top: 11px;
    color: var(--cs-subtle);
    font-size: 12px;
    line-height: 1.6;
}

.cs-feedback {
    margin-top: 12px;
    color: var(--cs-error);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    animation: cs-fade-up .3s ease both;
}

/* Success message (replaces the form once subscribed) */
.cs-success {
    display: none;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--cs-field-border);
    border-radius: 22px;
    background: var(--cs-field-bg);
}

.cs-success:focus {
    outline: none;
}

.cs-subscribed .cs-signup-form {
    display: none;
}

.cs-subscribed .cs-success {
    display: flex;
}

.cs-success-icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cs-button-bg);
    color: var(--cs-button-text);
}

.cs-success-icon svg {
    width: 20px;
    height: 20px;
}

.cs-success-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.cs-success-text {
    margin-top: 4px;
    color: var(--cs-muted);
    font-size: 14px;
    line-height: 1.6;
}

.cs-success-email {
    margin-top: 2px;
    color: var(--cs-subtle);
    font-size: 13px;
    line-height: 1.6;
}

.cs-success-reset {
    display: inline-block;
    margin-top: 10px;
    color: inherit;
    font-size: 13px;
    font-weight: 500;
    text-underline-offset: 3px;
    transition: opacity .2s ease;
}

.cs-success-reset:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

@media (hover: hover) {
    .cs-success-reset:hover {
        opacity: .65;
    }
}

/* Played only when the success message replaces the form, not when it is restored on page load */
.cs-success.is-entering {
    animation: cs-fade-up .45s cubic-bezier(.2, .7, .2, 1) both;
}

.cs-success.is-entering .cs-success-icon {
    animation: cs-pop .5s cubic-bezier(.2, 1.4, .4, 1) .1s both;
}

.cs-success.is-entering .cs-success-icon path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: cs-draw .35s ease-out .35s forwards;
}

/* Brand card */
.cs-art {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    height: 480px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--cs-card-border);
    border-radius: 22px;
    background: var(--cs-card-bg);
}

.cs-brand-top {
    color: var(--cs-card-text);
    font-size: 10px;
    letter-spacing: .19em;
    text-transform: uppercase;
}

.cs-brand-word {
    align-self: center;
    width: 82%;
    max-width: 330px;
    height: auto;
    aspect-ratio: 82 / 19;
    color: #fff;
    opacity: var(--cs-wordmark-opacity);
}

.cs-brand-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: var(--cs-card-text);
    font-size: 10px;
    letter-spacing: .13em;
    line-height: 1.7;
    text-transform: uppercase;
}

.cs-brand-seal {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border: 1px solid var(--cs-seal-border);
    border-radius: 50%;
    color: var(--cs-seal-text);
    text-align: center;
    transform: rotate(-12deg);
}

/* Vault bottom + footer */
.cs-vault-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 38px;
    padding-top: 21px;
    border-top: 1px solid var(--cs-divider);
    color: var(--cs-meta);
    font-size: 11px;
    letter-spacing: .06em;
}

.cs-categories {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--cs-categories);
}

.cs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px max(42px, calc((100% - 1356px) / 2)) calc(28px + env(safe-area-inset-bottom));
    color: var(--cs-subtle);
    font-size: 11px;
}

/* Private preview password page (resources/views/preview-gate.blade.php) */
.cs-logo-link {
    display: block;
    color: inherit;
}

.cs-logo-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 6px;
    border-radius: 2px;
}

.cs-gate {
    display: grid;
    place-items: center;
    min-height: calc(100svh - 79px - 80px);
    padding: 56px 16px;
}

.cs-gate-box {
    width: 100%;
    max-width: 440px;
    text-align: center;
    animation: cs-rise .8s cubic-bezier(.2, .7, .2, 1) both;
}

.cs-gate-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: var(--cs-button-bg);
    color: var(--cs-button-text);
}

.cs-gate-icon svg {
    width: 22px;
    height: 22px;
}

.cs-gate h1 {
    margin: 14px 0 12px;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.cs-gate .cs-description {
    margin: 0 auto 28px;
    font-size: 16px;
}

.cs-gate .cs-form {
    text-align: left;
}

.cs-form-button,
.cs-form-button:focus-within {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.cs-form-button + .cs-success-reset {
    display: block;
    margin-top: 18px;
}

/* Page entrance */
.cs-copy > *,
.cs-art,
.cs-vault-bottom {
    animation: cs-rise .8s cubic-bezier(.2, .7, .2, 1) both;
}

.cs-copy > :nth-child(2) { animation-delay: .08s; }
.cs-copy > :nth-child(3) { animation-delay: .16s; }
.cs-copy > :nth-child(4) { animation-delay: .24s; }
.cs-art { animation-delay: .2s; }
.cs-vault-bottom { animation-delay: .36s; }

/* Animations */
@keyframes cs-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

@keyframes cs-fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

@keyframes cs-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cs-pop {
    from {
        transform: scale(.4);
        opacity: 0;
    }
}

@keyframes cs-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes cs-shake {
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

@keyframes cs-pulse {
    0% { box-shadow: 0 0 0 0 currentColor; }
    70%, 100% { box-shadow: 0 0 0 6px transparent; }
}

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

    /* The loader still needs to show that something is happening */
    .cs-spinner {
        animation-duration: 1.4s !important;
        animation-iteration-count: infinite !important;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .cs-header {
        height: 67px;
    }
}

@media (max-width: 760px) {
    .cs-header {
        padding: 0 12px;
    }

    .cs-header-note {
        display: none;
    }

    .cs-vault {
        padding: 30px 12px 23px;
    }

    .cs-hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .cs-copy {
        justify-self: center;
        width: 100%;
        max-width: 530px;
    }

    .cs-eyebrow,
    .cs-copy h1,
    .cs-description {
        text-align: center;
    }

    .cs-copy h1 {
        font-size: clamp(44px, 14.36vw, 56px);
    }

    .cs-description {
        max-width: 480px;
        margin-inline: auto;
        padding: 0 12px;
    }

    .cs-signup {
        max-width: 480px;
        margin-inline: auto;
        padding: 0 12px;
    }

    .cs-art {
        justify-self: center;
        width: 100%;
        max-width: 510px;
        height: 400px;
    }

    .cs-vault-bottom {
        flex-wrap: wrap;
        margin-top: 28px;
    }

    .cs-footer {
        flex-wrap: wrap;
        padding: 23px 12px calc(24px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 450px) {
    .cs-form {
        flex-direction: column;
        gap: 3px;
        padding: 7px;
        border-radius: 22px;
    }

    .cs-form input {
        padding: 13px 12px;
    }

    .cs-form button {
        width: 100%;
        padding: 13px;
    }

    .cs-success {
        padding: 18px;
    }

    .cs-art {
        height: 340px;
        padding: 23px;
    }

    .cs-vault-bottom {
        font-size: 10px;
        line-height: 1.6;
    }

    .cs-categories {
        gap: 14px;
        font-size: 11px;
    }
}
