/*
Theme Name: O.S.S.A. Studio
Description: Dvikalbė LT/EN O.S.S.A. portfolio tema su projektų valdymu.
Version: 1.5.0
Requires at least: 6.1
Requires PHP: 7.4
Text Domain: ossa-studio
*/
/* O.S.S.A. — typography, proportions and motion. */
@font-face {
  font-family: Bodoni;
  src: url('assets/bodoni-72-book.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #242420;
  --muted: #777771;
  --line: #deded8;
  --paper: #ffffff;
  --margin: clamp(24px, 5vw, 88px);
  --serif: Bodoni, 'Times New Roman', serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
html:has(body.home-mode) { scrollbar-gutter: auto; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 400 18px var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { -webkit-appearance: none; appearance: none; color: inherit; font: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
img { display: block; width: 100%; height: auto; }
h1, h2, h3, p { font-weight: 400; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }
main:focus { outline: none; }
::selection { background: #e7e6df; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 20px; top: -90px; padding: 14px; background: white; z-index: 50; }
.skip:focus { top: 12px; }

/* Quiet, persistent navigation. */
.header {
  height: calc(94px + var(--safe-top));
  padding: var(--safe-top) var(--margin) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
}
.small-brand { font-size: 36px; letter-spacing: -.035em; }
.home-brand, .header-description { display: none; }
.header-right { display: flex; align-items: center; gap: 34px; font-size: 17px; }
.header-nav { display: flex; align-items: center; gap: 28px; }
.contact-link { display: inline-flex; align-items: center; position: relative; min-height: 44px; white-space: nowrap; }
.contact-link::after { content: ''; height: 1px; position: absolute; left: 0; right: 0; bottom: 8px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.contact-link:hover::after { transform: scaleX(1); transform-origin: left; }
.studio-open { min-height: 44px; position: relative; }
.studio-open::after { content: ''; position: absolute; height: 1px; background: currentColor; bottom: 8px; left: 0; right: 0; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.studio-open:hover::after { transform: scaleX(1); transform-origin: left; }
.language { display: flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .12em; border-left: 1px solid var(--line); padding-left: 22px; }
.footer { position: relative; margin: 0 var(--margin); display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 72px; padding: 16px 0 calc(16px + var(--safe-bottom)); font-size: 12px; letter-spacing: .025em; }
.footer::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; transform: scaleY(.5); transform-origin: top; background: linear-gradient(90deg, transparent, #24242024 18%, #24242040 50%, #24242024 82%, transparent); pointer-events: none; }
.footer-links { display: flex; align-items: center; gap: 26px; }
.privacy-link { min-height: 44px; display: flex; align-items: center; white-space: nowrap; }
.privacy-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.language button { min-height: 44px; min-width: 28px; opacity: .45; transition: opacity .25s; }
.language button.active, .language button:hover { opacity: 1; }
.language button.active { text-decoration: underline; text-underline-offset: 5px; }

/* Homepage stays within one visible screen. */
.home-mode {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: calc(86px + var(--safe-top)) minmax(0, 1fr) calc(46px + var(--safe-bottom));
}
.home-mode .header { height: auto; padding: var(--safe-top) 30px 0; }
.home-mode .small-brand { display: none; }
.home-mode .home-brand { display: block; position: absolute; left: 50%; top: calc(50% + var(--safe-top) / 2); transform: translate(-50%, -50%); width: 182px; mix-blend-mode: multiply; }
.home-mode .header-description { display: block; font-size: 11px; line-height: 1.4; letter-spacing: .13em; text-transform: uppercase; }
.home-mode #main { min-height: 0; }
.home { height: 100%; padding: 0 18px 8px; }
.home-choices { height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.choice { min-width: 0; display: block; }
.home-choices .choice { display: grid; grid-template-rows: minmax(0, 1fr) 65px; min-height: 0; }
.choice-photo { background: #eeeeea; overflow: hidden; position: relative; isolation: isolate; }
.home-choices .choice-photo { min-height: 0; height: 100%; }
.choice-photo img { height: 100%; object-fit: cover; transition: transform 1.3s var(--ease), filter 1s; }
.home-choices .choice:first-child img { object-position: center 50%; }
.choice-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0 0; }
.home-choices .choice-caption { padding: 5px 5px 0; }
.choice-title { font-size: clamp(34px, 3.6vw, 60px); letter-spacing: -.045em; line-height: 1.05; }
.choice-number { position: absolute; left: 22px; top: 20px; color: white; font: 11px Arial, sans-serif; letter-spacing: .17em; text-shadow: 0 1px 8px #0006; }
.choice-arrow { display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; width: 42px; height: 42px; border: 1px solid transparent; border-radius: 50%; transition: transform .65s var(--ease), border-color .65s; }
.choice-arrow svg { width: 22px; height: 22px; }
.home-mode .footer { margin: 0 30px; min-height: 0; padding: 0 0 var(--safe-bottom); font-size: 11px; }

/* Editorial portfolio pages. */
.page { width: 100%; max-width: 1920px; margin: auto; padding: 35px var(--margin) 88px; }
.back-link { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; margin-bottom: 26px; font-size: 15px; }
.back-link span { transition: transform .4s var(--ease); }
.back-link:hover span { transform: translateX(-5px); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; border-bottom: 1px solid var(--line); padding-bottom: 35px; margin-bottom: 40px; }
.eyebrow { text-transform: uppercase; font-size: 11px; letter-spacing: .17em; margin: 0 0 24px; color: var(--muted); }
h1 { font-size: clamp(54px, 7.1vw, 112px); line-height: 1.04; letter-spacing: -.055em; margin: 0; overflow-wrap: break-word; }
h2 { font-size: clamp(36px, 4.5vw, 68px); line-height: 1.09; letter-spacing: -.04em; }
.heading-note { margin: 0 0 6px; font-size: 17px; line-height: 1.4; color: var(--muted); max-width: 230px; flex-shrink: 0; }
.category-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.category-choices .choice-photo { height: min(56svh, 690px); min-height: 330px; }
.category-choices .choice-title { font-size: clamp(29px, 3.2vw, 52px); }
.category-description { font-size: 15px; margin: 14px 0 0; color: var(--muted); }
.portfolio-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.portfolio-header p { margin: 0; color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 28px; font-size: 17px; }
.filters button { min-height: 44px; color: var(--muted); position: relative; }
.filters button.active { color: var(--ink); }
.filters button::after { content: ''; height: 1px; background: var(--ink); position: absolute; left: 0; right: 0; bottom: 3px; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.filters button.active::after, .filters button:hover::after { transform: scaleX(1); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; row-gap: 76px; }
.project-card { min-width: 0; display: block; }
.project-photo { height: clamp(350px, 44vw, 690px); position: relative; overflow: hidden; background: #eeeeea; }
.project-photo img { height: 100%; object-fit: cover; transition: transform 1.3s var(--ease); }
.project-index { position: absolute; left: 22px; top: 20px; color: white; font: 11px Arial, sans-serif; letter-spacing: .17em; text-shadow: 0 1px 8px #0006; }
.project-caption { height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 15px; }
.project-caption h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 34px; line-height: 1.1; margin: 0; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 14px; color: var(--muted); padding-top: 5px; }
.empty-state { padding: 70px 0; font-size: 24px; color: var(--muted); }
.project-info { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 38px; padding: 5px 0 34px; border-bottom: 1px solid var(--line); }
.project-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin: 0; }
.project-facts div:last-child { grid-column: 1 / -1; }
.project-facts dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.project-facts dd { font-size: 23px; margin: 0; }
.project-description .eyebrow { margin-bottom: 14px; }
.project-description p:not(.eyebrow) { font-size: 21px; line-height: 1.5; margin: 0 0 16px; }
.project-description > :last-child { margin-bottom: 0; }
.project-hero { display: block; width: 100%; margin-bottom: 36px; background: #eeeeea; position: relative; cursor: zoom-in; overflow: hidden; }
.project-hero img { height: min(75svh, 1000px); min-height: 400px; object-fit: cover; object-position: center 52%; }
.zoom-note { position: absolute; bottom: 24px; right: 24px; background: white; padding: 13px 18px; font-size: 14px; transition: transform .5s var(--ease); }
.project-hero:hover .zoom-note { transform: translateY(-4px); }
.image-grid { columns: 2; column-gap: 36px; }
.image-tile { display: block; width: 100%; margin-bottom: 36px; break-inside: avoid; cursor: zoom-in; overflow: hidden; background: #eeeeea; }
.image-tile img { transition: transform 1.1s var(--ease); }
.detail-end { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; font-size: 18px; }
.detail-end button { min-height: 44px; }
.text-link { display: inline-flex; align-items: center; gap: 35px; min-height: 44px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.text-link:hover { color: var(--muted); }

/* Dialogs and touch-friendly full-screen photography. */
.dialog-open { overflow: hidden; }
dialog { border: 0; color: var(--ink); padding: 0; overscroll-behavior: contain; }
dialog::backdrop { background: #16161250; backdrop-filter: blur(5px); }
.studio-dialog { background: white; width: min(760px, calc(100% - 40px)); max-height: calc(100svh - 60px); padding: 76px 74px 65px; overflow: auto; }
.studio-dialog[open] { animation: dialog-in .55s var(--ease); }
.dialog-close { position: absolute; right: 20px; top: 16px; }
.studio-dialog h2 { margin: 28px 0; }
.studio-copy { font-size: 20px; line-height: 1.6; max-width: 470px; margin: 0 0 22px; }
.studio-link { margin-top: 18px; }
.lightbox { width: 100%; height: 100vh; height: 100svh; max-width: none; max-height: none; margin: 0; position: fixed; background: white; overflow: hidden; padding: calc(82px + var(--safe-top)) 82px calc(68px + var(--safe-bottom)); }
.lightbox[open] { animation: dialog-in .5s var(--ease); }
.lightbox::backdrop { background: white; }
.lightbox-top { position: absolute; left: 30px; right: 22px; top: calc(20px + var(--safe-top)); display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 18px; }
#lightbox-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-close {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  gap: 14px; min-height: 46px; width: auto; padding: 0 16px 0 20px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font: 400 15px/1 var(--serif); letter-spacing: .035em; white-space: nowrap;
  transition: border-color .35s ease, background-color .35s ease, color .35s ease;
}
.close-label { display: inline-block; flex: 0 0 auto; width: auto; font: inherit; }
.close-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 16px; width: 16px; height: 16px; }
.close-icon svg { display: block; width: 16px; height: 16px; }
#lightbox-image { width: 100%; height: 100%; object-fit: contain; opacity: 1; transition: opacity .24s ease, transform .5s var(--ease); }
#lightbox-image.is-switching { opacity: 0; transform: translateX(6px); }
.dialog-close, .image-prev, .image-next {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--paper);
  transition: border-color .35s ease, background-color .35s ease, color .35s ease;
}
.dialog-close svg { width: 16px; height: 16px; }
.image-prev svg, .image-next svg { width: 21px; height: 21px; }
.image-prev, .image-next { position: absolute; top: 50%; transform: translateY(-50%); }
.image-prev { left: 12px; }
.image-next { right: 12px; }
.policy-content { max-width: 840px; margin: 0 auto; overflow-wrap: anywhere; }
.policy-content h2 { font-size: 33px; line-height: 1.2; margin: 42px 0 18px; }
.policy-content p, .policy-content li { font-size: 19px; line-height: 1.65; }
.policy-content strong { font-weight: 400; border-bottom: 1px dotted #888; }
.policy-content a { text-decoration: underline; text-underline-offset: 3px; }
.policy-notice { padding: 22px; border: 1px solid var(--line); background: #fafaf8; font-size: 17px; line-height: 1.5; }
.contact-page { min-height: 70svh; }
.contact-page .page-heading { margin-bottom: 64px; }
.contact-page h1 { font-size: clamp(48px, 6vw, 88px); line-height: 1.08; letter-spacing: -.045em; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 8vw, 140px); }
.contact-intro > p { max-width: 410px; margin: 0 0 42px; font-size: clamp(21px, 2vw, 29px); line-height: 1.5; }
.contact-intro .text-link { font-size: 17px; }
.contact-details { margin: 0; }
.contact-row { padding: 0 0 26px; margin: 0 0 26px; border-bottom: 1px solid #eeeeea; }
.contact-row:last-child { border-bottom: 0; margin-bottom: 0; }
.contact-row dt { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.contact-row dd { margin: 0; font-size: clamp(23px, 2.5vw, 35px); line-height: 1.35; overflow-wrap: anywhere; }
.contact-row dd a { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 44px; transition: color .3s ease; }
.contact-row dd a:hover { color: var(--muted); }
.contact-row dd a span { flex-shrink: 0; font-size: 24px; }
.contact-pending { margin: 0; padding-top: 4px; font-size: 20px; line-height: 1.5; color: var(--muted); }
.contact-form { min-width: 0; padding: 4px 0 0; }
.contact-form .eyebrow { color: var(--ink); margin-bottom: 30px; }
.contact-field { margin-bottom: 28px; }
.contact-field label { display: block; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.contact-field input, .contact-field textarea { display: block; width: 100%; -webkit-appearance: none; appearance: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 0 14px; font: 400 19px/1.5 var(--serif); background: transparent; color: var(--ink); transition: border-color .35s; }
.contact-field textarea { resize: vertical; min-height: 125px; max-height: 400px; }
.contact-field input:focus, .contact-field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.contact-field textarea::placeholder { color: #92928a; opacity: 1; }
.contact-privacy { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); margin: 8px 0 26px; }
.contact-privacy input { accent-color: var(--ink); width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; }
.contact-privacy a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.contact-submit { width: 100%; min-height: 58px; display: flex; justify-content: space-between; align-items: center; padding: 4px 18px 4px 24px; border: 1px solid var(--ink); color: white; background: var(--ink); font-size: 17px; letter-spacing: .02em; transition: background .35s, color .35s; }
.contact-submit .choice-arrow { width: 36px; height: 36px; border: 0; }
.contact-submit:hover { color: var(--ink); background: white; }
.contact-submit:disabled { cursor: wait; opacity: .65; }
.contact-status { font-size: 15px; line-height: 1.5; margin: 16px 0 0; }
.contact-status:empty { display: none; }
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { padding: 70px var(--margin); font-size: 25px; line-height: 1.6; }

/* Motion is restrained: short departures, softer arrivals. */
.loading { position: fixed; inset: 0; display: grid; place-items: center; background: white; font-size: 48px; letter-spacing: -.04em; z-index: 30; opacity: 1; transition: opacity .4s ease; }
.loading[hidden] { display: none; }
.loading.is-ready { opacity: 0; pointer-events: none; }
.route-progress { position: fixed; z-index: 40; left: 0; top: 0; width: 100%; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease), opacity .3s; opacity: 0; pointer-events: none; }
.route-changing .route-progress { transform: scaleX(1); opacity: .5; }
#main { transition: opacity .18s ease, transform .3s var(--ease); }
#main.is-leaving { opacity: 0; transform: translateY(-8px); }
.reveal-pending { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform 1s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal-pending.is-visible { opacity: 1; transform: none; }
.home .choice.is-visible .choice-photo img { animation: photograph-in 1.35s var(--ease) backwards; }
::view-transition-old(root) { animation: page-out .2s ease both; }
::view-transition-new(root) { animation: page-in .65s var(--ease) both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes photograph-in { from { transform: scale(1.055); } to { transform: scale(1); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (pointer: fine) {
  .lightbox-close:hover, .dialog-close:hover, .image-prev:hover, .image-next:hover { color: white; border-color: var(--ink); background: var(--ink); }
  .choice:hover .choice-photo img, .project-card:hover .project-photo img { transform: scale(1.035); }
  .image-tile:hover img { transform: scale(1.018); }
  .choice:hover .choice-arrow, .project-card:hover .choice-arrow { border-color: var(--line); transform: rotate(5deg); }
}
.admin-bar.home-mode { height: calc(100svh - 32px); }

/* Tablets: keep two aligned image columns. */
@media (max-width: 1100px) {
  :root { --margin: 32px; }
  .header { height: calc(86px + var(--safe-top)); }
  .home-mode .header-description { max-width: 170px; font-size: 10px; }
  .home-mode .home-brand { width: 168px; }
  h1 { font-size: clamp(52px, 7.3vw, 82px); }
  .heading-note { font-size: 16px; max-width: 190px; }
  .category-choices, .project-grid { column-gap: 24px; }
  .category-choices .choice-title { font-size: clamp(29px, 4vw, 40px); }
    .project-photo { height: 58vw; max-height: 640px; }
    .project-info { gap: 32px; }
  .project-facts dd { font-size: 22px; }
  .image-grid { column-gap: 24px; }
  .image-tile { margin-bottom: 24px; }
  .project-caption h2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 30px; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .home-mode .header-description { display: none; }
  .home-mode .home-brand { left: calc(30px + var(--safe-left)); transform: translateY(-50%); }
  .home-mode .header-right { margin-left: auto; }
}

/* Phones: two vertically composed choices on a single screen. */
@media (max-width: 600px) {
  :root { --margin: 22px; }
  .header { height: calc(104px + var(--safe-top)); align-items: flex-start; padding-top: calc(12px + var(--safe-top)); }
  .header-nav { position: static; gap: 20px; }
  .small-brand { font-size: 30px; }
  .header-right { margin-left: auto; flex-direction: column; align-items: flex-end; gap: 0; font-size: 14px; }
  .language { padding-left: 0; border-left: 0; font-size: 11px; }
  .language button { min-height: 34px; }
  .home-mode { grid-template-rows: calc(96px + var(--safe-top)) minmax(0,1fr) calc(46px + var(--safe-bottom)); }
  .home-mode .header { padding: var(--safe-top) 20px 0; }
  .home-mode .home-brand { left: 20px; top: calc(16px + var(--safe-top)); transform: none; width: 110px; }
  .home-mode .header-description { display: none; }
  .home-mode .header-right { margin-left: auto; padding-top: 4px; }
  .home { padding: 0 12px 6px; }
  .home-choices { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 9px; }
  .home-choices .choice { grid-template-rows: minmax(0,1fr) 43px; }
  .home-choices .choice-title { font-size: 31px; }
  .home-choices .choice-caption { padding: 1px 4px 0; }
  .home-choices .choice-photo img { object-position: 50% 48%; }
  .choice-number, .project-index { left: 15px; top: 14px; font-size: 10px; }
  .choice-arrow { width: 40px; height: 40px; }
  .choice-arrow svg { width: 20px; height: 20px; }
  .home-mode .footer { margin: 0 18px; font-size: 10px; gap: 12px; }
  .footer-links { gap: 16px; }
  .footer .contact-link { font-size: 11px; min-height: 40px; }
  .home-mode .footer > span:last-child { display: none; }
  .privacy-link { font-size: 11px; min-height: 40px; }
  .footer { flex-wrap: wrap; min-height: 92px; font-size: 11px; gap: 0 14px; }
  .footer > span:last-child { width: 100%; color: var(--muted); font-size: 10px; }
  .page { padding-top: 20px; padding-bottom: 60px; }
  .back-link { font-size: 14px; margin-bottom: 20px; }
  .page-heading { display: block; padding-bottom: 25px; margin-bottom: 28px; }
  .eyebrow { font-size: 10px; margin-bottom: 18px; }
  h1 { font-size: clamp(45px, 11.8vw, 65px); line-height: 1.06; letter-spacing: -.048em; }
  .heading-note { margin-top: 20px; max-width: 270px; font-size: 15px; }
  .category-choices { grid-template-columns: 1fr; gap: 36px; }
  .category-choices .choice-photo { height: 90vw; min-height: 0; max-height: 460px; }
  .category-choices .choice-title { font-size: 34px; }
  .category-description { font-size: 14px; margin-top: 10px; }
  .portfolio-header { display: block; margin-bottom: 28px; }
  .portfolio-header p { margin-top: 17px; font-size: 13px; }
  .filters { gap: 22px; font-size: 15px; flex-wrap: wrap; }
  .project-grid { grid-template-columns: 1fr; gap: 42px; }
  .project-photo { height: 117vw; min-height: 300px; max-height: 630px; }
  .project-caption { height: 88px; }
  .project-caption h2 { font-size: 31px; }
  .project-meta { font-size: 13px; }
  .project-info { grid-template-columns: 1fr; gap: 26px; padding-bottom: 25px; margin-bottom: 25px; }
  .project-facts { gap: 22px; }
  .project-facts dt { font-size: 10px; }
  .project-facts dd { font-size: 21px; }
  .project-description p:not(.eyebrow) { font-size: 19px; }
  .project-hero { margin-bottom: 14px; }
  .project-hero img { height: 115vw; min-height: 300px; max-height: 630px; }
  .zoom-note { bottom: 15px; right: 15px; font-size: 12px; padding: 11px 13px; }
  .image-grid { columns: 1; }
  .image-tile { margin-bottom: 14px; }
  .detail-end { margin-top: 30px; gap: 18px; font-size: 16px; }
  .text-link { gap: 24px; }
  .studio-dialog { width: calc(100% - 28px); max-height: calc(100svh - 40px); padding: 66px 26px 38px; }
  .studio-dialog h2 { font-size: 42px; }
  .studio-copy { font-size: 18px; }
  .lightbox { padding: calc(78px + var(--safe-top)) 12px calc(82px + var(--safe-bottom)); }
  .lightbox-top { top: calc(12px + var(--safe-top)); left: 18px; right: 12px; font-size: 16px; }
  .lightbox-close { min-height: 44px; padding: 0 13px 0 16px; font-size: 14px; gap: 12px; }
  .image-prev, .image-next { top: auto; bottom: calc(16px + var(--safe-bottom)); transform: none; width: 48px; height: 48px; }
  .image-prev { left: 14px; }
  .image-next { right: 14px; }
    .policy-content h2 { font-size: 29px; }
  .policy-content p, .policy-content li { font-size: 18px; }
  .policy-notice { font-size: 16px; padding: 18px; }
  .contact-page .page-heading { margin-bottom: 34px; }
  .contact-page h1 { font-size: clamp(43px, 10vw, 59px); }
  .contact-layout { grid-template-columns: 1fr; gap: 44px; }
  .contact-form { grid-row: 1; }
  .contact-intro { grid-row: 2; }
  .contact-intro > p { max-width: 100%; font-size: 23px; margin-bottom: 30px; }
  .contact-row dd { font-size: 27px; }
  .admin-bar.home-mode { height: calc(100svh - 46px); }
}

/* Landscape phones and shorter laptop windows. */
@media (max-height: 520px) and (min-width: 601px) {
  .home-mode { grid-template-rows: calc(60px + var(--safe-top)) minmax(0,1fr) calc(35px + var(--safe-bottom)); }
  .home-mode .home-brand { width: 130px; }
  .home-mode .header-description { font-size: 9px; }
  .home-choices .choice { grid-template-rows: minmax(0,1fr) 44px; }
  .home-choices .choice-title { font-size: 29px; }
  .home-mode .footer { font-size: 10px; }
}
@media (max-height: 600px) and (max-width: 600px) {
  .home-mode { grid-template-rows: calc(86px + var(--safe-top)) minmax(0,1fr) calc(44px + var(--safe-bottom)); }
  .home-mode .home-brand { width: 115px; }
  .home-choices .choice { grid-template-rows: minmax(0,1fr) 34px; }
  .home-choices .choice-title { font-size: 26px; }
  .home-choices .choice-arrow { height: 32px; }
}
@media (max-width: 350px) {
  :root { --margin: 17px; }
  .header-right { gap: 12px; }
  .home-mode .home-brand { width: 116px; }
  .filters { gap: 16px; font-size: 14px; }
  .project-meta { font-size: 12px; }
  .category-choices .choice-title { font-size: 29px; }
  .lightbox-close { font-size: 13px; padding: 0 12px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* Landscape notches stay clear of content and tap targets. */
.header, .page { padding-left: max(var(--margin), var(--safe-left)); padding-right: max(var(--margin), var(--safe-right)); }
.home-mode .header { padding-left: calc(30px + var(--safe-left)); padding-right: calc(30px + var(--safe-right)); }
.home { padding-left: calc(18px + var(--safe-left)); padding-right: calc(18px + var(--safe-right)); }
@media (max-width:600px) {
  .home-mode .header { padding-left: calc(20px + var(--safe-left)); padding-right: calc(20px + var(--safe-right)); }
  .home-mode .home-brand { left: calc(20px + var(--safe-left)); }
  .home { padding-left: calc(12px + var(--safe-left)); padding-right: calc(12px + var(--safe-right)); }
}
