/* Guided brief controls and measured motion. */
.jdi-brief [hidden] { display: none !important; }
.jdi-brief .jdi-form-progress {
    list-style: none; padding: 0; margin: 0 0 30px;
    display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px;
}
.jdi-form-progress li { padding: 10px 0; border-top: 3px solid var(--jdi-line); font: 600 .73rem/1.5 Inter, sans-serif; }
.jdi-form-progress [aria-current="step"] { border-color: var(--jdi-ink); }
.jdi-form-progress .is-complete { border-color: var(--cerulean); }
.jdi-form-step { min-width: 0; }
.jdi-form-step > h3 { font: 400 1.9rem/1.15 var(--jdi-display); letter-spacing: -.02em; margin: 0 0 12px; }
.jdi-form-step > h3:focus { outline: none; }
.jdi-brief .jdi-form-help { display: block; font: 400 .82rem/1.6 Inter, sans-serif; color: var(--jdi-ink); margin: 8px 0 18px; }
.jdi-required { font: 400 .72rem/1.5 Inter, sans-serif; }
.jdi-brief .jdi-options { min-width: 0; padding: 0; margin: 26px 0; border: 0; }
.jdi-options legend { padding: 0; font: 600 .9rem/1.5 Inter,sans-serif; margin-bottom: 10px; max-width: 100%; }
.jdi-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.jdi-brief label.jdi-choice {
    display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 13px 12px;
    border: 1px solid var(--jdi-line); background: var(--jdi-paper); cursor: pointer;
    font: 400 .84rem/1.5 Inter,sans-serif;
}
.jdi-brief label.jdi-choice:has(input:checked) { background: var(--jdi-blue); border-color: var(--jdi-ink); }
.jdi-brief label.jdi-choice:focus-within { outline: 2px solid var(--cerulean); outline-offset: 2px; }
.jdi-brief .jdi-choice input[type="checkbox"], .jdi-brief .jdi-choice input[type="radio"] {
    appearance: auto; flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; padding: 0;
    accent-color: var(--jdi-ink); cursor: pointer;
}
.jdi-brief input[aria-invalid="true"], .jdi-brief textarea[aria-invalid="true"], .jdi-brief select[aria-invalid="true"] { border: 2px solid #9b2634; }
.jdi-field-error { display: block; font: 400 .8rem/1.5 Inter,sans-serif; color: #9b2634; margin-top: 5px; }
.jdi-field-error:empty { display: none; }
.jdi-form-feedback { border: 1px solid var(--jdi-ink); border-left: 5px solid var(--cerulean); padding: 18px; margin: 0 0 24px; font-size: .9rem; background: var(--jdi-paper); }
.jdi-form-feedback.is-success { background: var(--jdi-blue); }
.jdi-brief .jdi-budget-hint { padding: 16px; font: 400 .85rem/1.6 Inter,sans-serif; background: var(--jdi-blue); }
.jdi-brief .jdi-budget-agreement { margin-top: 20px; }
.jdi-brief .jdi-form-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 26px; border-top: 1px solid var(--jdi-line); padding-top: 20px; }
.jdi-brief .jdi-form-actions button { width: auto; min-width: 96px; padding: 13px 20px; min-height: 48px; }
.jdi-brief .jdi-form-actions .jdi-form-back { background: transparent; color: var(--jdi-ink); }
.jdi-brief .jdi-form-actions button:disabled { opacity: .6; cursor: wait; }
.jdi-brief .jdi-form-actions .jdi-form-next, .jdi-brief .jdi-form-actions .jdi-form-submit { margin-left: auto; }
.jdi-brief .jdi-form-step-note { text-align: right; margin-bottom: 0; }
.jdi-contact-dialog { width: min(800px, calc(100% - 32px)); }
.jdi-contact .jdi-contact-fallback { color: var(--jdi-ink); background: var(--jdi-paper); padding: 24px; margin-top: 32px; }
.jdi-project-button { width: fit-content; max-width: 100%; }
.jdi-project-button .wp-block-button__link { width: auto; padding: 13px 20px; }
.jdi-contact .jdi-contact-open { padding: 14px 22px; }

@keyframes jdi-brief-enter {
    from { opacity: .35; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes jdi-dialog-enter {
    from { opacity: .2; transform: translateY(16px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes jdi-art-float {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: no-preference) {
    .jdi-entered { animation-duration: .7s; animation-delay: var(--jdi-reveal-delay,0ms); }
    .jdi-brief-ready .jdi-form-step:not([hidden]) { animation: jdi-brief-enter .22s ease-out both; }
    .jdi-dialog[open] { animation: jdi-dialog-enter .22s cubic-bezier(.2,.7,.25,1) both; }
    .jdi-dialog[open] .jdi-dialog-content, .jdi-dialog[open] .jdi-menu-links { animation: none; }
    .jdi-studio-board figure { animation: jdi-art-float 6s ease-in-out 1s 2; }
    .jdi-choice, .jdi-form-progress li { transition: background-color .18s ease, border-color .18s ease; }
    .jdi-project figure { position: relative; }
    .jdi-project figure::after {
        content: ''; position: absolute; pointer-events: none; inset: 0;
        background: linear-gradient(110deg,transparent 35%,rgb(255 255 255 / 18%) 50%,transparent 65%);
        transform: translateX(-120%); transition: transform .65s ease;
    }
    .jdi-project figure:hover::after { transform: translateX(120%); }
    .jdi-project figure:hover img { transform: scale(1.055); }
}
@media (prefers-reduced-motion: reduce) {
    .jdi-dialog, .jdi-form-step, .jdi-studio-board figure { animation: none !important; }
    .jdi-project figure::after { display: none; }
}
@media (max-width: 599px) {
    .jdi-contact-dialog { width: calc(100% - 16px); }
    .jdi-form-progress { gap: 8px; }
    .jdi-form-progress li { font-size: .66rem; }
    .jdi-choice-grid { grid-template-columns: minmax(0,1fr); }
    .jdi-brief .jdi-form-grid { gap: 0; }
    .jdi-brief .jdi-form-step > h3 { font-size: 1.7rem; }
}
@media (max-width: 380px) {
    .jdi-hero .wp-block-buttons > .wp-block-button { width: auto; }
    .jdi-hero .wp-block-button__link { width: auto; }
}
