/* Application styles that are not part of the captured design.
   Kept separate from the captured stylesheets so those stay byte-identical
   and a future design refresh can replace them wholesale. */

/* Skip link: visible only when focused. The Tailwind build shipped with the
   site does not include sr-only, so the rule lives here. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    color: #000000;
    border-radius: 0.375rem;
    font-weight: 700;
}

/* Hidden from sight, kept in the accessibility tree: the honeypot wrapper and
   the carousel status regions. Not display:none, which would remove them from
   the tree along with the status announcements. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The captured .reveal rule starts sections at opacity 0 and slides them in
   when they scroll into view. Under reduced motion the content must be
   readable immediately, so the animation is not applied at all rather than
   cancelled with a zero duration, which would leave a snap. */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
        will-change: auto;
    }
}

/* ---------------------------------------------------------------------------
   Utilities missing from the purged Tailwind build.

   The shipped build has [hidden] before the layout utilities, so a class such
   as .grid (equal specificity, later in the file) wins and an element marked
   hidden stays visible. Every hidden attribute in the app is load-bearing —
   the quote fields and the reduced-motion carousel controls — so this is
   fixed once, here.
   --------------------------------------------------------------------------- */

[hidden] {
    display: none !important;
}

.underline {
    text-decoration: underline;
}

.resize-vertical {
    resize: vertical;
}

/* Present on the captured ZWCAD, D5, and FAQ markup but absent from the
   shipped build, which was generated before those pages were finished.
   Each rule is the utility's own declaration, not a restyle. */

.aspect-video {
    aspect-ratio: 16 / 9;
}

.mix-blend-lighten {
    mix-blend-mode: lighten;
}

.text-sky-400 {
    color: #38bdf8;
}

.list-decimal {
    list-style-type: decimal;
}

.bg-gray-900 {
    background-color: #111827;
}

.bg-gray-900\/40 {
    background-color: rgba(17, 24, 39, 0.4);
}

.border-gray-700 {
    border-color: #374151;
}

.bg-indigo-600\/20 {
    background-color: rgba(79, 70, 229, 0.2);
}

.h-0\.5 {
    height: 0.125rem;
}

/* The FAQ browser highlights each search match with this class. */
.zwcad-faq-highlight {
    background: rgba(56, 189, 248, 0.25);
    color: #ffffff;
    border-radius: 0.125rem;
}

/* The captured page used max-h-[550px], an arbitrary value the build lacks.
   A named class is clearer than an escaped arbitrary one. */
.faq-scroll {
    max-height: 550px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* ---------------------------------------------------------------------------
   Event gallery viewer.

   gallery.css styles the thumbnail grid, and a fixed-position overlay for the
   live viewer that toggled .hidden. That overlay is gone: the viewer is a
   native <dialog>, so the browser supplies the top layer, the backdrop, Esc, and
   the focus return. Only the shell it renders in is new.
   --------------------------------------------------------------------------- */

.lightbox {
    width: min(1100px, 92vw);
    max-width: none;
    max-height: 92vh;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    overflow: visible;
}

.lightbox::backdrop {
    background: rgba(1, 3, 8, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Contain scroll chaining at the dialog boundary where it is supported. */
.lightbox:modal,
.lightbox::backdrop {
    overscroll-behavior: contain;
}

.lightbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.lightbox-figure img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
}

.lightbox-figure figcaption {
    color: #b9c2d0;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
}

.lightbox-figure figcaption:empty {
    display: none;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.lightbox-controls form {
    margin: 0;
}

a.gallery-cell {
    display: block;
}

a.gallery-cell:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   Form state and page notices.

   The build has no red border or red tint utilities (only the green pair), so
   the error treatment lives here rather than in half-present utility classes.
   --------------------------------------------------------------------------- */

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
input:user-invalid,
select:user-invalid,
textarea:user-invalid {
    border-color: #f87171;
}

.notice {
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.notice:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.notice-error {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
}

.notice-success {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(34, 197, 94, 0.08);
    color: #86efac;
}

/* ---------------------------------------------------------------------------
   Blog category chips.

   The captured .blog-chip is decoration only: the live page rendered <span>s.
   Ours are links to a filtered listing, so they need hover, focus, and a
   selected state.
   --------------------------------------------------------------------------- */

a.blog-chip {
    text-decoration: none;
    transition: border-color 200ms ease, color 200ms ease, background 200ms ease;
}

a.blog-chip:hover,
a.blog-chip:focus-visible {
    border-color: rgba(56, 189, 248, 0.55);
    color: #ffffff;
}

a.blog-chip:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

a.blog-chip.is-active {
    border-color: #ffffff;
    background: #ffffff;
    color: #020617;
}

/* ---------------------------------------------------------------------------
   Admin-authored HTML: offer details, blog bodies, event descriptions.

   The sanitiser in app/html.php emits plain tags with no attributes, so those
   blocks inherit nothing. This scope gives them the typography the rest of the
   site uses: light headings, gray body copy, and rhythm between blocks. Rules
   are scoped to .rich so they cannot leak into hand-written markup.
   --------------------------------------------------------------------------- */

.rich > :first-child {
    margin-top: 0;
}

.rich > :last-child {
    margin-bottom: 0;
}

.rich p {
    margin: 0 0 1rem;
    color: #d1d5db;
    font-weight: 500;
    line-height: 1.75;
}

.rich h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #ffffff;
}

.rich h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: #ffffff;
}

.rich ul,
.rich ol {
    margin: 0 0 1.25rem;
    padding-left: 1.25rem;
    color: #d1d5db;
    font-weight: 500;
    line-height: 1.75;
}

.rich ul {
    list-style: disc;
}

.rich ol {
    list-style: decimal;
}

.rich li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.rich li::marker {
    color: #93c5fd;
}

.rich strong {
    font-weight: 700;
    color: #ffffff;
}

.rich em {
    font-style: italic;
}

.rich blockquote {
    margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 2px solid rgba(147, 197, 253, 0.5);
    color: #e5e7eb;
    font-weight: 500;
}

.rich a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.rich a:hover {
    color: #ffffff;
}

.rich > :focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* The FAQ tabs toggle this attribute; keep it authoritative over any
   component CSS that sets display on <details> or list items. */
[hidden] {
    display: none !important;
}

/* --- Compact mobile navigation ------------------------------------------- */
/* A sheet below the header instead of a full-screen wall of oversized links.
   The panel scrolls on short screens without scrolling the page behind it. */
#full-screen-menu {
    /* Below the fixed header so the close button stays visible and usable. */
    z-index: 40;
}

.mobile-menu-panel {
    position: absolute;
    inset-inline: 0;
    top: 0;
    max-block-size: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 5.5rem 1.25rem 1.5rem;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 1.25rem 1.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.mobile-menu-list {
    display: flex;
    flex-direction: column;
}

.mobile-menu-list a {
    display: block;
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.mobile-menu-list li:last-child a {
    border-bottom: 0;
}

.mobile-menu-list a:hover {
    color: #ffffff;
}

.mobile-menu-cta {
    display: block;
    margin-top: 1.25rem;
    text-align: center;
}

@media (min-width: 768px) {
    .mobile-menu-panel {
        padding-inline: 2rem;
    }
}
