/*
Theme Name: RMA Modern v1
Description: Richard McElhiney Architects. Scrolling home page, project and bio pop-ups. Reads the existing Projects, Industries and Staff content.
Version: 3.11.21
Author: @bohdanhr
Author URI: https://github.com/bohdanhr
Text Domain: rma-modern-v1
*/

/* Libre Franklin, served from the theme (one variable file per character set covers weights 300 to 600). */
@font-face {
    font-family: "Libre Franklin"; font-style: normal; font-weight: 300 600; font-display: swap;
    src: url(assets/fonts/libre-franklin-latin-ext.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Libre Franklin"; font-style: normal; font-weight: 300 600; font-display: swap;
    src: url(assets/fonts/libre-franklin-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ink: #1b1b1b;
    --muted: #666;
    --line: #e4e2de;
    --alt: #f6f5f3;
    --accent: #b3261e;
    --ribbon-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
/* scrollbar-gutter keeps the scrollbar's space when a pop-up locks scrolling, so the page doesn't shift sideways */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
    margin: 0; color: var(--ink); background: #fff;
    /* One family everywhere. Type scale — display 28–46 / lead 22–28 / body 17 / small 15; caps labels 14 section, 12 label, 11 caption */
    font: 17px/1.65 "Libre Franklin", "Helvetica Neue", Arial, system-ui, sans-serif;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Ribbon */
.ribbon { position: fixed; inset: 0 0 auto 0; height: var(--ribbon-h); z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.admin-bar .ribbon { top: 32px; }
.ribbon__inner { max-width: 1280px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; flex-wrap: wrap; align-items: baseline; text-decoration: none; text-transform: uppercase; letter-spacing: .12em; font-size: 14px; white-space: nowrap; color: var(--accent); }
/* Full name in red at the top of the page; scrolled, the letters after each initial fold away to "RMA" (R and M bold, A stays light) */
.brand__word { display: inline-flex; margin-right: .42em; font-weight: 600; transition: margin .45s ease, color .3s ease; }
.brand__word:last-child { margin-right: 0; }
.brand__word--sub { font-weight: 400; }
.brand__rest { display: inline-block; overflow: hidden; max-width: 10em; transition: max-width .45s ease, opacity .3s ease; }
.ribbon.is-compact .brand__rest { max-width: 0; opacity: 0; }
.ribbon.is-compact .brand__word { margin-right: 0; }
.brand img { max-height: 44px; width: auto; display: block; }
.ribbon__nav { display: flex; align-items: center; gap: 28px; }
.ribbon__nav > a, .nav-drop > a { text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 6px 0; border-bottom: 2px solid transparent; }
.ribbon__nav > a, .nav-drop > a { transition: color .2s, border-color .2s; }
.ribbon__nav > a:hover, .nav-drop > a:hover, .nav-drop:hover > a, .ribbon__nav > a:focus-visible, .nav-drop > a:focus-visible { color: var(--accent); border-color: var(--line); }
.ribbon__nav > a.is-active, .nav-drop > a.is-active { color: var(--accent); border-color: var(--accent); }
/* Projects drop-down: opens on hover or keyboard focus; the padding bridges the gap so it stays open */
.nav-drop { position: relative; display: flex; align-items: center; padding: 14px 0; }
.nav-drop__menu { display: none; position: absolute; top: 100%; left: -16px; min-width: 220px; padding: 8px 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 12px 28px rgba(0,0,0,.12); z-index: 60; }
.nav-drop:hover .nav-drop__menu, .nav-drop:focus-within .nav-drop__menu { display: block; }
.nav-drop__menu a { display: block; padding: 10px 16px; text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.nav-drop__menu a:hover, .nav-drop__menu a:focus-visible { color: var(--accent); background: var(--alt); }
.ribbon__toggle { display: none; }

main { padding-top: var(--ribbon-h); }
.admin-bar main { padding-top: calc(var(--ribbon-h) + 32px); }
[id] { scroll-margin-top: calc(var(--ribbon-h) + 12px); }

/* Layout */
.section { padding: 88px 0; }
.section--alt { background: var(--alt); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }
.heading { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; margin: 0 0 32px; color: var(--accent); }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3, .prose h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin: 40px 0 10px; color: var(--accent); }
.lead { font-size: 22px; line-height: 1.6; }

/* Project type tiles (3 x 2) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
#projects .heading { margin-bottom: 14px; }
.tiles__lead { margin: 0 0 32px; font-size: 17px; color: var(--muted); max-width: 60ch; }
.tiles__lead a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: opacity .2s; }
.tiles__lead a:hover, .tiles__lead a:focus-visible { opacity: .7; }
.tile { text-decoration: none; display: block; }
.tile__img { display: block; aspect-ratio: 4 / 3; background: #ddd center / cover no-repeat; transition: opacity .2s; }
.tile:hover .tile__img { opacity: .7; }
.tile__label { display: block; margin-top: 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }

/* Team */
.team { display: grid; grid-template-columns: repeat(6, 1fr); gap: 36px 20px; margin-top: 32px; }
.wrap--wide { max-width: 1180px; }
.section--tight { padding: 56px 0 48px; }

/* Home statement: a labelled, headline-sized opening with generous space before Projects */
/* The statement fills the first screen on any device; Projects starts below the fold */
.intro.section { position: relative; display: flex; align-items: center; min-height: calc(100vh - var(--ribbon-h)); min-height: calc(100svh - var(--ribbon-h)); padding: 64px 0 112px; }
.admin-bar .intro.section { min-height: calc(100svh - var(--ribbon-h) - 32px); }
.intro .wrap { position: relative; z-index: 1; width: 100%; }
/* Screened skyline behind the opening text: faint, faded top and bottom, drifting left to right */
.intro__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.intro__bg img { position: absolute; left: 0; top: 0; height: 100%; width: auto; max-width: none; opacity: .3; filter: grayscale(.3); }
@media (prefers-reduced-motion: no-preference) {
    .intro__bg img { animation: rma-pan 300s linear infinite alternate; will-change: transform; }
}
@keyframes rma-pan { from { transform: translateX(0); } to { transform: translateX(calc(100vw - 100%)); } }
.statement { max-width: 1080px; will-change: transform, opacity; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: opacity .4s ease; }
.scroll-cue i { position: relative; display: block; width: 1px; height: 48px; overflow: hidden; background: var(--line); }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: var(--accent); }
.ribbon.is-compact ~ main .scroll-cue { opacity: 0; pointer-events: none; }

/* Careers: opening paragraph large, like the statement */
/* Lead style: the Careers invitation, the Contact line and the first two paragraphs under Studio → Focus */
.careers__lead > :first-child, .contact__lead, #studio .split__col:first-child > p:first-of-type, #studio .split__col:nth-child(2) > p:first-of-type { font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif; font-weight: 300; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.4; letter-spacing: -.01em; }
/* Notes under the invitation (portfolio guidance) in the same light grey as "Architects"; the same for the
   paragraphs after the two lead lines under Studio → Focus */
#studio .split__col > p:nth-of-type(n+2) { margin-top: 20px; }
.careers__lead > p:not(:first-child):not(:last-child) { margin-top: 20px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.careers__lead > p:last-child { margin-top: 28px; }
/* Buttons read as links: small caps on the red underline, with an arrow, like "Projects →". Hover turns the text red
   and nudges the arrow. Used by "Load more" and "Send your resume & portfolio". */
.link-btn { display: inline-flex; align-items: center; gap: 10px; padding: 6px 0 4px; border: 0; border-bottom: 2px solid var(--accent); background: none; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--ink); text-decoration: none; transition: color .2s; }
.link-btn__arrow { display: inline-block; color: var(--accent); transition: transform .25s; }
.link-btn:hover { color: var(--accent); }
.link-btn:hover .link-btn__arrow { transform: translateX(4px); }
.more__btn:hover .link-btn__arrow { transform: translateY(3px); }
.cta { margin-top: 12px; }

/* Scroll reveals (only with JavaScript and when the visitor has not asked for reduced motion) */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--reveal-delay, 0s); }
.reveal-on [data-reveal].is-in { opacity: 1; transform: none; }
.reveal-on .tile[data-reveal] .tile__img { transform: scale(1.08); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1), opacity .2s; transition-delay: var(--reveal-delay, 0s); }
.reveal-on .tile[data-reveal].is-in .tile__img { transform: none; }
.tile { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
    @keyframes rma-cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
    .scroll-cue i::after { animation: rma-cue 2.2s cubic-bezier(.6, 0, .3, 1) infinite; }
}
.statement__label { display: flex; align-items: center; gap: 14px; margin: 0 0 32px; font-size: 14px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.statement__text > :first-child { margin: 0; font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif; font-weight: 300; font-size: clamp(26.6px, 3.23vw, 43.7px); line-height: 1.2; letter-spacing: -.015em; }
.statement__text > * + * { margin: 24px 0 0; max-width: 720px; font-size: 19px; line-height: 1.65; color: var(--muted); }
.statement__text > :first-child + * { margin-top: 40px; }

/* Studio and Careers: two columns on wide screens, stacked below 1024px */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 72px; }
.split__col > :first-child { margin-top: 0; }
.see-more { display: none; }
/* Studio, every screen: the lead paragraph(s) of each column show; the rest wait behind "Learn more" */
#studio .split__col:first-child.is-collapsible:not(.is-open) > p:nth-of-type(n+2),
#studio .split__col:nth-child(2).is-collapsible:not(.is-open) > p:nth-of-type(n+2) { display: none; }
#studio .see-more { display: inline-block; min-height: 44px; margin-top: 8px; font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#studio .see-more:hover, #studio .see-more:focus-visible { color: var(--accent); }
.subheading { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin: 40px 0 10px; color: var(--accent); }
.team__heading { margin: 88px 0 0; padding-top: 40px; border-top: 1px solid var(--line); }
.person { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; align-self: start; text-align: left; }
.person__img { display: block; flex: none; width: 100%; aspect-ratio: 3 / 4; background: #e6e3de center / cover no-repeat; transition: opacity .2s; }
.person:hover .person__img, .person:focus-visible .person__img { opacity: .7; }
.person__name { display: block; margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.person:hover .person__name { color: var(--accent); }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.contact__list { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; margin: 24px 0 0; }
.contact__list dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.contact__list dd { margin: 0; }
.team__work { margin: 48px 0 0; }
.modal--careers .modal__panel { width: min(1000px, 100%); max-width: none; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
/* Drawn map (template-parts/contact-map.php) with a link out to Google Maps */
.map { position: relative; min-height: 340px; background: #ece8e1; overflow: hidden; }
.map svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.map__chip { position: absolute; left: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; background: #fff; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--accent); box-shadow: 0 6px 24px rgba(0,0,0,.08); transition: color .2s; }
.map__chip:hover { color: var(--accent); }
.map__chip span[aria-hidden] { color: var(--accent); transition: transform .25s; }
.map__chip:hover span[aria-hidden] { transform: translate(2px, -2px); }

/* Projects page */
.chips { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 40px; }
.chips a { text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 4px 0; border-bottom: 2px solid transparent; }
.chips a:hover { border-color: var(--line); }
.chips a.is-active { color: var(--accent); border-color: var(--accent); }
.chips__all { margin-left: auto; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; gap: 40px 28px; }
.card { display: block; width: 100%; min-width: 0; align-self: start; }
.card__img { display: block; width: 100%; aspect-ratio: 4 / 3; background: #e6e3de center / cover no-repeat; transition: opacity .2s; }
.card:hover .card__img { opacity: .7; }
/* Wide card: two columns across, but only one photo high (so its height is 3/4 of a single column, not of its own width). */
.cards { grid-auto-flow: row dense; }
.card--wide { grid-column: span 2; }
.card--wide .card__img { aspect-ratio: auto; height: 0; padding-bottom: calc(37.5% - 10.5px); }
/* Hovered or keyboard-focused project, category or person: its name turns red */
.card__title, .tile__label, .person__name { transition: color .2s; }
.card:hover .card__title, .card:focus-visible .card__title,
.person:focus-visible .person__name { color: var(--accent); }
.card__text { display: block; margin-top: 12px; }
.card__title { display: block; font-weight: 600; line-height: 1.35; }
.card__meta { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }
/* Home page type tiles: the name sits on the photo, bottom left, over a soft dark fade with a short red bar above it */
.tile { position: relative; color: #fff; }
.tile::after, .tile::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; pointer-events: none; transition: opacity .3s ease; }
.tile::after { background: linear-gradient(to top, rgba(12, 12, 12, .5) 0%, rgba(12, 12, 12, .24) 50%, rgba(12, 12, 12, 0) 100%); }
/* On hover the photo is screened back and the dark fade gives way to a pale one, so the red name stays easy to read */
.tile::before { background: linear-gradient(to top, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, .3) 55%, rgba(255, 255, 255, 0) 100%); opacity: 0; }


.tile__label { position: absolute; z-index: 1; left: 24px; right: auto; width: max-content; max-width: calc(100% - 48px); bottom: 22px; margin-top: 0; font-size: 15px; letter-spacing: .16em; line-height: 1.3; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.tile__label::after { content: ""; display: block; width: 32px; height: 2px; margin-top: 12px; background: var(--accent); transition: width .25s ease; }
/* Hovering a tile: the name stays white and the red line stretches to the width of the name. */
.tile:hover .tile__label::after, .tile:focus-visible .tile__label::after { width: 100%; }
/* Each card is an image row + a text row on the shared grid, so a tall photo (image, text, image rows) ends exactly where
   the photo beside it ends, whatever the text heights are. */
@supports (grid-template-rows: subgrid) {
    .cards { row-gap: 0; }
    .card { display: grid; grid-row: span 2; grid-template-rows: subgrid; align-self: stretch; }
    /* 4:3 via padding (not aspect-ratio) so the row height is exactly the photo height, with no rounding drift. */
    .card__img { grid-row: 1; aspect-ratio: auto; height: 0; padding-bottom: 75%; align-self: start; }
    .card__text { grid-row: 2; padding-bottom: 40px; }
    .card--tall { grid-row: span 4; }
    .card--tall .card__img { grid-row: 1 / span 3; height: auto; padding-bottom: 0; align-self: stretch; min-height: 0; }
    .card--tall .card__text { grid-row: 4; }
    .card { grid-template-columns: minmax(0, 1fr); }
    .card > * { grid-column: 1; }
    /* Two invisible photo-height spacers keep the tall photo two full photos high even when the cards beside it are also
       tall (or missing), e.g. in a category with few projects. */
    .card--tall::before, .card--tall::after { content: ""; grid-column: 1; height: 0; padding-bottom: 75%; pointer-events: none; }
    .card--tall::before { grid-row: 1; }
    .card--tall::after { grid-row: 3; }
}

/* Load more: later batches stay out of the layout (and their photos unfetched) until asked for */
.js .card.is-later { display: none; }
/* Live search on the All Projects list hides rows that do not match */
.js .plist tr.is-miss { display: none; }
/* Line search: no box, just an underline that turns accent red on focus */
.finder { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin: 4px 0 28px; }
.finder__field { position: relative; flex: 0 1 520px; min-width: 0; }
.finder__icon { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--muted); transition: color .2s; pointer-events: none; }
.finder__input { width: 100%; min-height: 48px; padding: 10px 64px 10px 30px; border: 0; border-bottom: 1px solid #b8b4ac; border-radius: 0; background: transparent; font: inherit; font-size: 19px; color: var(--ink); -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s; }
.finder__input::placeholder { color: #767676; }
.finder__input::-webkit-search-cancel-button { display: none; }
.finder__input:hover { border-bottom-color: var(--ink); }
/* Focus is shown by a heavier accent underline instead of the default outline */
.finder__input:focus, .finder__input:focus-visible { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.finder__field:focus-within .finder__icon { color: var(--accent); }
.finder__clear { position: absolute; right: 0; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 4px 0 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.finder__clear:hover { color: var(--accent); }
.finder__clear[hidden] { display: none; }
.finder__status { margin: 0 0 10px; font-size: 15px; color: var(--muted); min-height: 1.4em; }
.finder__empty { margin: 24px 0 32px; font-size: 18px; }
.finder__empty[hidden] { display: none; }

/* Projects completed at Richard McElhiney's previous firm */
.plist__tag { display: inline-block; margin-left: 10px; padding: 2px 7px; border: 1px solid currentColor; border-radius: 2px; font-size: 11px; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; color: var(--muted); vertical-align: 2px; white-space: nowrap; position: relative; cursor: help; }
/* What the tag means, shown on hover (screen readers get it from the hidden text inside the tag) */
.plist__tag[data-tip]::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 5; padding: 6px 10px; background: var(--ink); color: #fff; font-size: 12px; letter-spacing: .02em; text-transform: none; white-space: nowrap; border-radius: 2px; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.plist__tag[data-tip]:hover::after { opacity: 1; visibility: visible; transform: none; }
/* Under the project name, the tag sits right after the location */
.plist td small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.plist td small .plist__tag { margin-left: 0; padding: 1px 6px; }
.more { text-align: center; padding: 16px 0 24px; }
.more__btn[hidden] { display: none; }
.more__status { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
/* Photo skeleton: a shimmering block covers each card photo until its file has arrived, then fades away to show it. */
.card__img { position: relative; overflow: hidden; }
.card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.js .card__img::before { content: ""; position: absolute; inset: 0; background: #e6e3de linear-gradient(90deg, #e6e3de 0%, #f4f1ec 50%, #e6e3de 100%) 0 0 / 600px 100%; opacity: 1; transition: opacity .6s ease; pointer-events: none; }
.js .card__img.is-ready::before { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
    @keyframes rma-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
    @keyframes rma-shimmer { from { background-position: -300px 0; } to { background-position: 300px 0; } }
    .card.is-new { animation: rma-rise .5s ease-out both; }
    .js .card__img:not(.is-ready)::before { animation: rma-shimmer 1.3s linear infinite; }
}

/* All projects */
.plist { width: 100%; border-collapse: collapse; }
.plist th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 2px solid var(--ink); }
.plist__sort { display: inline-flex; align-items: center; gap: 6px; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.plist__sort:hover, .plist th[aria-sort] .plist__sort { color: var(--ink); }
.plist__arrow::before { content: "\2195"; opacity: .4; }
.plist th[aria-sort="ascending"] .plist__arrow::before { content: "\2191"; opacity: 1; }
.plist th[aria-sort="descending"] .plist__arrow::before { content: "\2193"; opacity: 1; }
.plist td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.plist button:hover { text-decoration: underline; }
.plist .has-page button { color: var(--accent); font-weight: 600; }
.plist small { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }
/* Projects with a pop-up: location, client and date are red like the title */
.plist .has-page td, .plist .has-page small { color: var(--accent); }

.results { list-style: none; padding: 0; }
.results li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.results span { color: var(--muted); }

.site-footer { padding: 32px 24px; text-align: center; font-size: 15px; color: var(--muted); border-top: 1px solid var(--line); }
/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); overflow-y: auto; padding: 40px 20px; }
.modal[hidden] { display: none; }
/* Top padding keeps the close button (and its focus ring) clear of the photo */
.modal__panel { position: relative; background: #fff; max-width: 1080px; margin: 0 auto; padding: 72px 56px 56px; }
.modal__close { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--ink); z-index: 2; }
.modal__close svg, .stage__btn svg { display: block; width: 24px; height: 24px; }
.modal__close:hover { color: var(--accent); }

/* Bio pop-up: one size for everyone, tall enough for a ~1,000-character bio (longer ones scroll beside the photo).
   Photo on the left with the name and title over its lower edge; the bio alone on the right. */
.modal--person { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.modal--person .modal__panel { width: min(1080px, 100%); height: min(780px, calc(100vh - 64px)); margin: 0; padding: 0; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal--person .modal__body { height: 100%; }
.bio { display: grid; grid-template-columns: 1fr 1.15fr; height: 100%; }
.bio__fig { position: relative; min-height: 0; background: #e6e3de; }
.bio__fig--empty { background: #2b2b2b; }
.bio__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
/* The shade is dark enough that white text stays above 7:1 contrast over any photo, light clothing included */
.bio__fig::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(to top, rgba(12,12,12,.82) 0%, rgba(12,12,12,.7) 35%, rgba(12,12,12,0) 100%); pointer-events: none; }
.bio__head { position: absolute; left: 36px; right: 36px; bottom: 32px; z-index: 1; color: #fff; }
.bio__head h2 { margin: 0; font-weight: 300; font-size: 30px; line-height: 1.2; letter-spacing: -.01em; }
.bio__role { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; }
.bio__role::before { content: ""; display: block; width: 32px; height: 2px; background: var(--accent); margin: 12px 0 10px; }
.bio__text { position: relative; min-height: 0; display: flex; flex-direction: column; }
.bio__scroll { overflow-y: auto; padding: 72px 56px 48px; scrollbar-width: thin; scrollbar-color: #cfcac2 transparent; }
.bio__scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.bio__text::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(to top, #fff, rgba(255,255,255,0)); pointer-events: none; opacity: 0; transition: opacity .2s; }
.bio__text.has-more::after { opacity: 1; }
@media (max-width: 1024px) {
    .bio { grid-template-columns: 1fr 1fr; }
    .bio__scroll { padding: 64px 40px 40px; }
}

/* Project pop-up: photos across the top, always shown whole on a charcoal band (never cropped), with the counter,
   progress line and arrows along their lower edge. The text sits underneath and the pop-up scrolls as one. */
.modal--project .modal__panel { width: min(1120px, 100%); max-width: none; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal--project .modal__close { top: 12px; right: 12px; background: rgba(255,255,255,.92); }
.stage { position: relative; height: min(940px, calc(100vh - 140px)); min-height: 360px; background: #fff; overflow: hidden; touch-action: pan-y; }
.stage__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .3s ease; }
.stage--many .stage__img { height: calc(100% - 48px); }
.stage.is-loading .stage__img { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
    @keyframes rma-stage-shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
    .stage.is-loading { background: linear-gradient(90deg, #fff 0%, #efedea 50%, #fff 100%) 0 0 / 800px 100%; animation: rma-stage-shimmer 1.3s linear infinite; }
}
/* Counter, progress line and arrows sit on their own white strip under the photo, so they never overlap it */
.stage__bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; align-items: center; gap: 20px; height: 48px; padding: 0 16px 0 32px; color: var(--ink); }
.stage__count { margin: 0; min-width: 64px; font-size: 12px; font-weight: 600; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.stage__progress { flex: 1; height: 2px; background: var(--line); position: relative; }
.stage__progress i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width .3s ease; }
.stage__nav { display: flex; gap: 4px; }
.stage__btn { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.stage__btn:hover { background: var(--alt); color: var(--accent); }
.stage__btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.proj__text { max-width: 760px; margin: 0 auto; padding: 8px 56px 56px; text-align: center; }
.proj__meta { margin: 8px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.proj__lede h2 { margin: 0; font-weight: 300; font-size: 30px; line-height: 1.2; letter-spacing: -.01em; }
.proj__lede::after { content: ""; display: block; width: 32px; height: 2px; background: var(--accent); margin: 14px auto 28px; }
.proj__desc p { font-size: 16px; line-height: 1.7; text-align: justify; hyphens: auto; }
/* Italic lines in a description or bio (awards, credits, project lists) read as small grey notes */
.proj__desc em, .bio__scroll em { color: var(--muted); font-style: normal; font-size: 14px; line-height: 1.6; }
@media (max-width: 1024px) {
    .proj__text { padding: 40px 40px 48px; }
}

/* Accessibility */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 200; background: #fff; color: var(--ink); padding: 10px 16px; border: 2px solid var(--ink); }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.modal__close:focus-visible { outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

/* Responsive */
@media (max-width: 1024px) {
    .split { grid-template-columns: minmax(0, 1fr); }
    .split__col + .split__col { margin-top: 40px; }
}
@media (max-width: 960px) {
    .tiles, .cards { grid-template-columns: repeat(2, 1fr); }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team { grid-template-columns: repeat(3, 1fr); }
    .contact { grid-template-columns: 1fr; }
}
@media (max-width: 782px) { .admin-bar .ribbon { top: 46px; } .admin-bar main { padding-top: calc(var(--ribbon-h) + 46px); } }
/* The logo plus five links need about 820px, so narrower screens use the Menu button */
@media (max-width: 900px) {
    .ribbon__toggle { display: block; flex: none; min-width: 44px; min-height: 44px; padding: 0 4px; text-align: right; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
    .ribbon__nav { display: none; position: absolute; top: var(--ribbon-h); left: 0; right: 0; background: #fff; padding: 16px 24px 24px; flex-direction: column; align-items: flex-start; gap: 0; border-bottom: 1px solid var(--line); }
    .ribbon.is-open .ribbon__nav { display: flex; }
    .ribbon__nav > a, .nav-drop > a { padding: 12px 0; }
    .nav-drop { display: block; padding: 0; }
    .nav-drop > a { display: inline-block; }
    .nav-drop__menu { display: block; position: static; min-width: 0; padding: 0 0 4px 16px; border: 0; box-shadow: none; }
    .nav-drop__menu a { padding: 8px 0; }
}
@media (max-width: 760px) {
    .section { padding: 56px 0; }
    /* Studio: long text collapses behind "See more" */
    .careers__lead.is-collapsible:not(.is-open) > p:not(:first-child):not(:last-child) { display: none; }
    .see-more { display: inline-block; min-height: 44px; margin-top: 8px; font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
    .intro.section { padding: 40px 0 112px; }
    .statement__label { margin-bottom: 24px; }
    .statement__text > * + * { font-size: 17px; }
    .statement__text > :first-child + * { margin-top: 28px; }
    .team__heading { margin-top: 56px; padding-top: 32px; }
    .lead { font-size: 19px; }
    .team { grid-template-columns: repeat(2, 1fr); }
    .tiles, .cards { grid-template-columns: 1fr; }
    .card--wide { grid-column: auto; }
    .card--wide .card__img { padding-bottom: 75%; }
    .card--tall { grid-row: span 2; }
    .card--tall .card__img { grid-row: 1; height: 0; padding-bottom: 75%; align-self: start; }
    .card--tall .card__text { grid-row: 2; }
    .card--tall::before, .card--tall::after { display: none; }
    /* Phone: header text fits beside the Menu button; touch targets are at least 44px */
    .ribbon__inner { gap: 12px; }
    .brand { white-space: normal; font-size: 12px; letter-spacing: .08em; line-height: 1.3; min-width: 0; }
    .finder__input { font-size: 16px; }
    .chips { gap: 0 20px; }
    .chips a { padding: 10px 0; }
    /* Link-style buttons keep a 48px tap target on phones */
    .link-btn { min-height: 48px; padding: 14px 0 10px; }
    /* Pop-ups fill the screen, with a large close button that stays in view */
    .modal { padding: 0; }
    .modal__panel { padding: 56px 16px 28px; min-height: 100%; }
    .modal__close { position: fixed; top: 0; right: 0; width: 48px; height: 48px; background: rgba(255,255,255,.92); z-index: 5; }
}
/* Bio pop-up on phones and portrait tablets: full screen, photo band on top, bio below, the whole pop-up scrolls */
@media (max-width: 900px) {
    .modal--person { display: block; padding: 0; }
    .modal--person .modal__panel { width: 100%; height: auto; min-height: 100%; overflow: visible; box-shadow: none; }
    .modal--person .modal__body { height: auto; }
    .modal--person .modal__close { position: fixed; top: 0; right: 0; background: rgba(255,255,255,.92); z-index: 5; }
    .bio { display: block; height: auto; }
    .bio__fig { height: min(62vh, 125vw, 720px); }
    .bio__head { left: 20px; right: 20px; bottom: 22px; }
    .bio__head h2 { font-size: 26px; }
    .bio__scroll { overflow: visible; padding: 28px 20px 40px; max-width: 640px; }
    .bio__text::after { display: none; }
    /* Project pop-up the same way: photo band on top, text below */
    .modal--project { padding: 0; }
    .modal--project .modal__panel { width: 100%; min-height: 100%; box-shadow: none; }
    .modal--project .modal__close { position: fixed; top: 0; right: 0; z-index: 5; }
    .stage { height: min(120vw, calc(100vh - 160px)); min-height: 0; }
    .stage__bar { padding: 0 8px 0 20px; }
    .proj__text { padding: 8px 20px 40px; }
    .proj__lede h2 { font-size: 26px; }
}
