/* =====================================================================
   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-reel { --pa: var(--project-accent, var(--accent)); }
html[data-theme="light"] :is(.work-page, .work-reel) { --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; }
}
/* One reel per app: the name and where to get it on top, its demo underneath. The reel is
   sized so the whole thing (copy and video) fits one laptop screen: never wider than 1180px,
   or than 1.5× the height left under the copy. */
.work-reels {
    display: grid; gap: clamp(72px, 12vh, 136px);
    padding-top: 44px; border-top: 1px solid var(--rule);
}
.work-reel {
    display: grid; gap: clamp(22px, 3.2vh, 34px);
    width: min(100%, max(720px, min(1180px, calc((100svh - 230px) * 1.5))));
    scroll-margin-top: 110px;
}
.work-reel-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px clamp(32px, 5vw, 72px); align-items: end; }
.work-reel-id { display: flex; align-items: flex-start; gap: 20px; }
.work-reel-icon { flex: none; line-height: 0; }
.work-reel-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.work-reel-name { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.1vw, 46px); letter-spacing: -0.025em; line-height: 1.04; }
.work-reel-name a { color: var(--ink); text-decoration: none; }
.work-reel-name a:hover { color: var(--pa); }
.work-reel-summary { margin: 0 0 16px; max-width: 58ch; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.reel--still { aspect-ratio: 3 / 2; display: grid; place-items: center; padding: clamp(20px, 4vw, 48px); text-decoration: none; }
.reel--still > * { max-width: 520px; width: 100%; }
.reel-still-icon { width: 160px; border-radius: 22%; }
@media (max-width: 900px) {
    .work-reel { width: 100%; }
    .work-reel-head { grid-template-columns: 1fr; align-items: start; }
    .work-reel-id { gap: 16px; }
}
.work-card-icon {
    width: 64px; height: 64px; border-radius: 22%;
    box-shadow: 0 0 0 1px var(--icon-ring), 0 10px 26px -14px color-mix(in srgb, var(--pa) 70%, black);
    transition: transform 520ms cubic-bezier(.34,1.56,.64,1), box-shadow 400ms ease;
}
/* On hover the icon leans in a little, like it's being picked up. */
.work-reel-head:hover .work-card-icon {
    transform: translateY(-2px) rotate(-5deg) scale(1.06);
    box-shadow: 0 0 0 1px var(--icon-ring), 0 14px 28px -12px color-mix(in srgb, var(--pa) 75%, black);
}
.work-card-tagline {
    margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-weight: 300;
    font-size: clamp(18px, 1.5vw, 21px); color: var(--pa);
}
.work-card-meta { margin: 8px 0 0; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- 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;
}
/* With a demo video, the video takes the wider column so it reads at a glance. */
.work-hero-grid--reel { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(32px, 4.5vw, 72px); }
.work-hero-grid--reel .work-hero-media { display: block; }
@media (max-width: 900px) { .work-hero-grid, .work-hero-grid--reel { 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: 54ch; }
.work-id { display: flex; align-items: center; gap: 16px; }
.work-icon { width: 84px; height: 84px; border-radius: 22%; box-shadow: 0 0 0 1px var(--icon-ring), 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: the shared link row (concept.css), then a QR code and the status note ---------- */
.work-hero-copy .link-row { margin-top: 8px; }

/* 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: 4vh; 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: 2vh; padding-bottom: 6vh; }
/* One column per story section on wide screens, stacked on narrow ones. */
.work-story {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: clamp(32px, 5vw, 88px); padding-top: 48px; border-top: 1px solid var(--rule);
}
.work-story .work-prose { max-width: none; }
.work-story .work-prose > h2:first-child { margin-top: 0; }

.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: 0; }
.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-reel-head:hover .work-card-icon { transform: none; }
    .work-card-icon { transition: none; }
    .work-status::before { animation: none; }
}

/* The App Store set, right under the hero */
.work-store { padding-top: 4vh; padding-bottom: 4vh; display: grid; gap: 28px; }
