/* =====================================================================
   Our Work: the portfolio index, project pages, and their privacy/support
   pages. Pages are generated by scripts/build-work.mjs. Extends concept.css
   and subpages.css; each project page sets --project-accent.
   ===================================================================== */

/* Each page and card sets --project-accent (and --project-accent-light, computed by the
   build for WCAG AA on the light theme). Everything below reads --pa. */
.work-page, .work-card { --pa: var(--project-accent, var(--accent)); }
html[data-theme="light"] :is(.work-page, .work-card) { --pa: var(--project-accent-light, var(--project-accent, var(--accent))); }

/* ---------- Index grid ---------- */
/* Portfolio pages run tighter than the marketing pages: the work is the point,
   so the first project should be visible without scrolling. The fixed top bar
   is ~90px, so intros clear it with a little air rather than a quarter-screen. */
.work-intro { padding-top: clamp(130px, 17vh, 190px); padding-bottom: 0; }
.work-intro .body-line { margin-top: 20px; }
.work-index { padding-top: clamp(32px, 5vh, 56px); padding-bottom: 8vh; }
.work-closing { min-height: 0; padding-top: 8vh; padding-bottom: 12vh; gap: 32px; }
@media (max-width: 720px) {
    .work-intro { padding-top: 120px; }
    .work-index { padding-top: 28px; }
}
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: clamp(20px, 3vw, 36px);
    padding-top: 40px;
    border-top: 1px solid var(--rule);
}
.work-card {
    display: flex; flex-direction: column; gap: 14px;
    padding: 28px;
    border: 1px solid var(--rule); border-radius: 24px;
    color: inherit; text-decoration: none;
    background: linear-gradient(160deg, color-mix(in srgb, var(--pa) 9%, transparent), transparent 60%);
    transition: transform 400ms cubic-bezier(.2,.7,.2,1), border-color 300ms ease, box-shadow 400ms ease;
}
.work-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--pa) 55%, transparent);
    box-shadow: 0 18px 50px -24px color-mix(in srgb, var(--pa) 60%, transparent);
}
.work-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work-card-icon { width: 56px; height: 56px; border-radius: 22%; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }
.work-card-tagline {
    margin: -4px 0 0; font-family: var(--serif); font-style: italic; font-weight: 300;
    font-size: 17px; color: var(--pa);
}
.work-card-meta { margin: auto 0 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.work-card .service-subtitle { max-width: none; }

/* ---------- Project hero ---------- */
.work-hero { padding-top: clamp(120px, 15vh, 170px); padding-bottom: 8vh; }
@media (max-width: 720px) { .work-hero { padding-top: 112px; } }
.work-back {
    display: inline-block; margin-bottom: 24px;
    font-size: 13px; letter-spacing: 0.08em; text-transform: lowercase;
    color: var(--ink-faint); text-decoration: none; transition: color 200ms ease;
}
.work-back:hover { color: var(--ink); }
.work-hero-grid {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(40px, 6vw, 96px); align-items: center;
}
@media (max-width: 900px) { .work-hero-grid { grid-template-columns: 1fr; } }
.work-hero-copy { display: flex; flex-direction: column; gap: 20px; }
.work-hero-copy .display { font-size: clamp(40px, 5.6vw, 76px); max-width: 14ch; }
.work-hero-copy .body-line { max-width: 46ch; }
.work-id { display: flex; align-items: center; gap: 16px; }
.work-icon { width: 84px; height: 84px; border-radius: 22%; box-shadow: 0 12px 34px -14px color-mix(in srgb, var(--pa) 70%, black); }
.work-tagline {
    margin: 0; font-family: var(--serif); font-style: italic; font-weight: 300;
    font-size: clamp(20px, 2vw, 26px); color: var(--pa);
}
.work-meta { margin: 0; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.work-hero-media { display: flex; justify-content: center; }

/* ---------- Actions ---------- */
.work-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.work-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 22px; border-radius: 999px; border: 1px solid var(--ink);
    color: var(--ink); text-decoration: none; font-size: 14px; letter-spacing: 0.04em;
    transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
}
.work-btn:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.work-btn--primary { background: var(--ink); color: var(--bg); }
.work-btn--quiet { border-color: var(--rule); color: var(--ink-soft); }
.work-btn--store { background: #000; color: #fff; border-color: #000; padding: 9px 20px 9px 16px; }
html[data-theme="dark"] .work-btn--store { border-color: rgba(255,255,255,.35); }
.work-btn--store:hover { background: #000; color: #fff; }
.work-btn--store span { display: flex; flex-direction: column; line-height: 1.1; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.work-btn--store small { font-size: 10px; font-weight: 400; letter-spacing: 0.02em; }
.work-btn-logo { width: 18px; height: 22px; }

/* QR: for someone reading on a laptop. On a phone you just tap the button. */
.work-qr { display: flex; align-items: center; gap: 16px; margin: 18px 0 0; }
.work-qr svg { width: 116px; height: 116px; padding: 6px; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }
.work-qr figcaption { max-width: 18ch; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 900px), (hover: none) { .work-qr { display: none; } }

.work-note { margin: 14px 0 0; font-size: 14px; color: var(--ink-soft); max-width: 46ch; }
.work-note a { color: var(--pa); }

/* ---------- Media ---------- */
.work-video, .work-image { width: 100%; max-width: 560px; border-radius: 28px; display: block; }
.work-embed { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; }
.work-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Highlights, story ---------- */
.work-highlights { padding-top: 6vh; padding-bottom: 6vh; }
.work-highlight-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 56px); padding-top: 48px; border-top: 1px solid var(--rule);
}
.work-highlight { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1024px) { .work-highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .work-highlight-grid { grid-template-columns: 1fr; } }
.work-highlight .work-headline::before {
    content: ""; display: block; width: 28px; height: 3px; border-radius: 3px;
    background: var(--pa); margin-bottom: 16px;
}
.work-highlight .service-subtitle { max-width: none; }
.work-about { padding-top: 4vh; }

.work-prose { max-width: 66ch; font-size: 17px; line-height: 1.7; color: var(--ink); }
.work-prose h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.015em; margin: 1.8em 0 0.5em; }
.work-prose h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 1.5em 0 0.4em; }
.work-prose p, .work-prose ul { margin: 0 0 1em; }
.work-prose ul { padding-left: 1.2em; }
.work-prose li { margin-bottom: 0.5em; }
.work-prose a { color: var(--pa); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--pa) 40%, transparent); }
.work-prose a:hover { border-bottom-color: var(--pa); }
.work-prose strong { font-weight: 500; }
.work-prose code { font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--bg-soft); }

/* ---------- Legal pages, footer links ---------- */
.work-legal { padding-top: clamp(120px, 15vh, 170px); }
@media (max-width: 720px) { .work-legal { padding-top: 112px; } }
.work-legal .display { font-size: clamp(36px, 5vw, 64px); margin-bottom: 12px; }
.work-updated { margin: 0 0 40px; font-size: 13px; letter-spacing: 0.08em; color: var(--ink-faint); }
.work-foot { padding-top: 2vh; }
.work-fine { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 28px; margin-top: 12px; border-top: 1px solid var(--rule); }
.work-fine a { font-size: 14px; color: var(--ink-soft); text-decoration: none; transition: color 200ms ease; }
.work-fine a:hover { color: var(--pa); }

@media (prefers-reduced-motion: reduce) {
    .work-card, .work-btn { transition: none; }
    .work-card:hover, .work-btn:hover { transform: none; }
    .work-status::before { animation: none; }
}
