/* ==========================================================================
   STYLE.CSS — Shared Components & Utility Classes
   ========================================================================== */

/* Hide h1 visually — present in markup for SEO/screen readers, not displayed
   ========================================================================== */

h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Utility
   ========================================================================== */

.bright {
    color: var(--accent);
}

.dense {
    font-weight: var(--fw-bold);
    color: #666;
}

.small {
    font-size: 0.9em;
}

.quiet {
    color: #888;
}

.imageCaption {
    color: #999;
    font-weight: var(--fw-light);
}

/* margin-bottom: 0 — used to suppress default h2 margin in lists */
.smallFeet {
    margin-bottom: 0;
}

.noMargin {
    margin-bottom: 0;
    margin-top: 0;
}

.floatLeft {
    float: left;
}

.floatRight {
    float: right;
}

/* Miscellaneous Components
   ========================================================================== */
.categoryLabel {
    color: var(--accent);
    font-weight: var(--fw-bold);
}

/* Link Components
   ========================================================================== */

/* /// prefix link — "more info" / "less info" */
.link-more::before {
    content: "///";
    font-weight: var(--fw-normal);
    letter-spacing: -0.2em;
    margin-right: 0.3em;
    display: inline-block;
    text-decoration: none;
}

.link-more {
    color: inherit;
    font-weight: var(--fw-bold);
    text-decoration: none;
}

.link-more:hover {
    text-decoration: underline;
}

/* » prefix link — "buy this" */
.link-buy::before {
    content: "\00bb ";
    padding-right: 0.5rem;
}

.link-buy {
    font-weight: var(--fw-bold);
}

.link-buy:hover {
    text-decoration: none;
}

/* « prefix link — "back" */
.link-back::before {
    content: "\00ab ";
    font-size: var(--fs-large);
    margin-bottom: -0.25em;
    padding-right: 0.5rem;
}

.link-back {
    font-style: italic;
    font-weight: var(--fw-bold);
}

.link-back:hover {
    text-decoration: none;
}

/* ↓ prefix link — "download pdf" / "watch video" actions */
.link-download::before {
    content: "\2193 ";
    padding-right: 0.3em;
}

.link-download:hover {
    text-decoration: none;
}

.action-close::before {
    content: "x";
    font-size: var(--fs-large);
    margin-bottom: -0.25em;
    padding-right: 0.5rem;
}

.action-close {
    font-weight: var(--fw-bold);
}

.action-close:hover {
    text-decoration: none;
}

/* Utility: opt-in text uppercase — use alongside other classes */
.text-upper {
    text-transform: uppercase;
}

/* » arrow link — used inline in work/text lists */
.arrowLink {
    font-size: 1.5em;
    font-weight: var(--fw-bold);
}

.arrowLinkLarge {
    font-size: 2em;
    font-weight: var(--fw-bold);
}

.arrowLink a:hover,
.arrowLinkLarge a:hover {
    text-decoration: none;
}

/* Back link wrapper */
.backLink {
    margin-bottom: 1em;
}

/* Works Detail
   ========================================================================== */

/* Top margin on image section to align with content top margin */
.stills {
    margin-top: 0;
}

/* Works detail image slideshow */
.image-slides {
    display: grid;
}

.work-image {
    grid-area: 1 / 1;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-image.active {
    opacity: 1;
    z-index: 1;
}

.stills-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: var(--padding-sm);
}

/* Optional links below the stills — PDF download / video toggle */
.stills-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    margin-top: var(--padding-sm);
    clear: right;
}

.stills-extra p {
    margin: 0;
}

/* Responsive 16:9 video embed, replaces the image slideshow when active */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Reverses color scheme for inline use (e.g. email @ symbol) */
.txtReset {
    background-color: #fff;
    color: #000;
    padding: 0.5em;
}

/* Hidden / Covert pages
   ========================================================================== */

body.covert {
    background-color: #000;
    color: #fff;
}

body.covert p,
body.covert h1,
body.covert h2,
body.covert h3,
body.covert h4,
body.covert h5,
body.covert a:hover,
body.covert #nav a:hover,
body.covert #nav li.current a {
    color: #fff;
}

/* Forms
   ========================================================================== */

.checkout-form,
.contact-form {
    display: flex;
    flex-direction: column;
}

.checkout-form fieldset,
.contact-form fieldset {
    display: flex;
    gap: var(--padding-md);
    border: 0;
    margin: 0;
    padding: 0;
    width: 100%;
}

.checkout-form fieldset .form-field,
.contact-form fieldset .form-field {
    display: flex;
    flex-basis: 50%;
    flex-direction: column;
}

.checkout-form fieldset.submit,
.contact-form fieldset.submit {
    flex-direction: column;
    margin-top: var(--padding-lg);
}

.checkout-form fieldset .form-field.full-width,
.contact-form fieldset .form-field.full-width {
    flex-basis: 100%;
}

.checkout-form fieldset input,
.checkout-form fieldset select,
.contact-form fieldset input {
    box-sizing: border-box;
    color: var(--pencil);
    font-family: inherit;
    font-size: inherit;
    height: 2rem;
    line-height: 1.5;
    margin: var(--padding-md) 0 0;
    padding: 0.2rem 0.5rem;
}

.checkout-form fieldset label,
.contact-form fieldset label {
    color: var(--accent);
    font-size: var(--fs-small);
    font-style: italic;
    font-weight: var(--fw-normal);
}

/* Primary button */
.btn-primary {
    align-items: center;
    background: none;
    border: none;
    color: var(--accent);
    display: flex;
    font-family: inherit;
    font-style: italic;
    font-weight: var(--fw-bold);
    line-height: 1;
    padding: 0;
    cursor: pointer;
    text-transform: uppercase;
    width: fit-content;
}

.btn-primary:hover {
    color: var(--figure);
}

.btn-primary::after {
    content: " \00bb ";
    font-size: var(--fs-large);
    margin-top: -0.25em;
    padding: 0 0 0 0.5rem;
}

/* Mobile — stack fields full width */
@media (max-width: 768px) {
    .checkout-form fieldset,
    .contact-form fieldset {
        flex-direction: column;
    }

    .checkout-form fieldset .form-field,
    .contact-form fieldset .form-field {
        flex-basis: auto;
    }
}
