/* screenwriting.css — Screenwriting page (script cards + request form) */

.sw-page,
.sw-page * {
    font-family: 'Catamaran', 'Helvetica Neue', Arial, sans-serif;
}

/* Keep the site's nav and page heading in the site font */
.sw-page .navbar,
.sw-page .navbar *,
.sw-page .grid-header h1 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.sw-scripts {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 16px 24px;
}

/* ─── DECK ─────────────────────────────────────────────── */

.deck {
    --card-w: 520px;
    --ox: 110px;          /* how far each neighbouring card peeks out to the side */
    position: relative;
    width: min(100%, calc(var(--card-w) + 4 * var(--ox)));
    min-height: 420px;
    margin: 0 auto;
    touch-action: pan-y;
    isolation: isolate;   /* keeps lifted cards under the site menu */
}

.deck-loading {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: 0;
    width: min(100%, var(--card-w));
    height: 520px;
    border-radius: 28px;
    background: linear-gradient(90deg, #1c1c1c 25%, #262626 50%, #1c1c1c 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}

.deck-empty {
    text-align: center;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    padding: 120px 0;
}

.script-card {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    bottom: 0;
    width: min(100%, var(--card-w));
    box-sizing: border-box;
    padding: 56px 44px 48px;
    border-radius: 28px;
    background: linear-gradient(180deg, #2c2c2c 0%, #232323 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: 50% 50%;
    transition: transform 0.55s cubic-bezier(.2, .8, .2, 1),
                filter 0.55s ease,
                opacity 0.4s ease;
    will-change: transform;
    -webkit-user-select: none;
    user-select: none;
}

.script-card.is-back {
    cursor: pointer;
}

.script-card.is-back:hover,
.script-card.is-back:focus-visible {
    filter: brightness(0.85) !important;
    outline: none;
}

.script-card.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.script-card.pop {
    animation: card-pop 0.55s cubic-bezier(.2, .8, .2, 1);
}

@keyframes card-pop {
    0%   { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
    45%  { box-shadow: 0 40px 90px rgba(0, 0, 0, 0.75); }
    100% { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); }
}

.script-card .sc-icon {
    width: 76px;
    height: 76px;
    margin-bottom: 26px;
    color: #fff;
}

.script-card .sc-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.script-card .sc-writer {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d6d6d6;
    margin-bottom: 14px;
}

.script-card .sc-title {
    font-size: clamp(30px, 6vw, 44px);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin-bottom: 40px;
    overflow-wrap: anywhere;
}

.script-card .sc-logline {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.65;
    color: #e2e2e2;
    margin-bottom: 40px;
    max-width: 440px;
}

.script-card .sc-meta {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #d6d6d6;
    margin-bottom: 18px;
    margin-top: auto;
}

.script-card .sc-meta .dot {
    margin: 0 10px;
}

.script-card .sc-genres {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.script-card .sc-genre {
    border: 2px solid #fff;
    border-radius: 999px;
    padding: 8px 18px 7px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

/* ─── DECK CONTROLS ────────────────────────────────────── */

.deck-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 28px;
}

.deck-controls[hidden],
.sw-link[hidden] {
    display: none;
}

.deck-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.deck-arrow:hover,
.deck-arrow:focus-visible {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    outline: none;
}

.deck-arrow:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

.deck-count {
    font-size: 13px;
    letter-spacing: 0.14em;
    color: var(--text-secondary);
    min-width: 56px;
    text-align: center;
}

.deck-request {
    text-align: center;
    margin-top: 18px;
}

.sw-link {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.sw-link:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* ─── REQUEST FORM ─────────────────────────────────────── */

.sw-contact {
    display: flex;
    justify-content: center;
    padding: 56px 16px 96px;
    scroll-margin-top: 72px;
}

.sw-contact-card {
    width: 100%;
    max-width: 560px;
    box-sizing: border-box;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 44px 40px 36px;
}

.sw-contact-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
}

.sw-contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 32px;
}

.sw-field {
    margin-bottom: 20px;
}

.sw-field label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.sw-field input,
.sw-field select,
.sw-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: #0e0e0e;
    color: var(--text-primary);
    border: 1px solid #333;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sw-field textarea {
    resize: vertical;
    min-height: 130px;
}

.sw-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #888 50%),
                      linear-gradient(135deg, #888 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

.sw-field input::placeholder,
.sw-field textarea::placeholder {
    color: #666;
}

.sw-field input:focus,
.sw-field select:focus,
.sw-field textarea:focus {
    outline: none;
    border-color: #9a9a9a;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.sw-field.has-error input,
.sw-field.has-error textarea {
    border-color: #c0605a;
}

.sw-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sw-submit {
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    border: none;
    border-radius: 6px;
    background: #f0f0f0;
    color: #0a0a0a;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.sw-submit:hover {
    background: #fff;
}

.sw-submit:disabled {
    opacity: 0.55;
    cursor: default;
}

.sw-status {
    min-height: 24px;
    margin-top: 16px;
    text-align: center;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.sw-status.ok    { color: #8fd19e; }
.sw-status.error { color: #e38d86; }

/* ─── SMALL SCREENS ────────────────────────────────────── */

@media (max-width: 700px) {
    .deck {
        --card-w: 100%;
        --ox: 14px;
    }
    .script-card {
        width: calc(100% - 2 * var(--k, 2) * var(--ox));
        padding: 44px 24px 36px;
        border-radius: 22px;
    }
    .deck-loading {
        width: calc(100% - 2 * var(--k, 2) * var(--ox));
    }
    .script-card .sc-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    .script-card .sc-title,
    .script-card .sc-logline {
        margin-bottom: 28px;
    }
    .script-card .sc-logline,
    .script-card .sc-meta,
    .script-card .sc-genre {
        font-size: 15px;
    }
    .sw-contact-card {
        padding: 32px 20px 28px;
    }
    .sw-contact-title {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .script-card { transition-duration: 0.3s; }
}
