/* EspaiObra · galería documental de trabajos */
:root { --gallery-line: #cfccc3; }
[id] { scroll-margin-top: 118px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #b44710; outline-offset: 5px; }
.projects-section .section-head { grid-template-columns: 1.15fr .85fr; }
.projects-section .eyebrow { color: #a83f0e; }
.work-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 40px; }
.work-nav a { padding: 10px 17px; border: 1px solid #aaa69c; border-radius: 99px; font-size: .88rem; font-weight: 750; }
.work-nav a:hover { background: var(--ink); color: white; }
.work-story { padding: 32px; background: #fff; border: 1px solid var(--gallery-line); border-radius: 22px; margin: 0 0 28px; }
.work-heading { display: flex; justify-content: space-between; align-items: start; gap: 32px; margin: 0 0 25px; }
.work-kicker { color: #9d400f; text-transform: uppercase; letter-spacing: .1em; font-size: .73rem; font-weight: 850; }
.work-heading h3, .work-detail-heading h3 { font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.08; letter-spacing: -.045em; margin: 10px 0 0; }
.work-heading p { color: #64625c; max-width: 400px; font-size: .95rem; margin: 4px 0 0; }
.work-pair, .work-progress-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.work-photo { margin: 0; min-width: 0; }
.work-photo-link { display: block; position: relative; border-radius: 12px; overflow: hidden; background: #e9e7e1; cursor: zoom-in; }
.work-photo-link img { width: 100%; height: 540px; object-fit: contain; }
.work-stage { position: absolute; top: 15px; left: 15px; z-index: 1; padding: 7px 13px; border-radius: 99px; background: #242421; color: white; text-transform: uppercase; letter-spacing: .09em; font-size: .69rem; font-weight: 850; }
.work-stage.after { background: #f06a24; color: #151514; }
.work-zoom { position: absolute; right: 13px; bottom: 13px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #151514d9; font-size: 1.2rem; }
.work-photo figcaption { color: #64625c; margin: 12px 0 0; font-size: .85rem; line-height: 1.5; }
.work-photo figcaption strong { display: block; color: #22221f; font-size: .97rem; margin-bottom: 3px; }
.work-progress { margin: 24px 0 0; border-top: 1px solid #ddd9d0; }
.work-progress summary { padding: 20px 2px 4px; font-weight: 800; cursor: pointer; }
.work-progress summary span { font-weight: 500; color: #706d65; font-size: .83rem; margin-left: 9px; }
.work-progress[open] summary { padding-bottom: 22px; }
.work-progress-grid img { height: 350px; }
.work-pair.bathroom { grid-template-columns: 1.3fr .7fr; }
.work-pair.bathroom img { height: 430px; }
.work-details { padding: 34px 0 0; }
.work-detail-heading { margin: 0 0 26px; }
.work-detail-heading p { color: #64625c; margin: 13px 0 0; }
.work-details-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work-details-grid img { height: 410px; }
.work-cta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--gallery-line); }
.work-cta p { margin: 0; font-size: 1.15rem; font-weight: 750; }
.team-photo { margin: 28px 0 0; max-width: 450px; }
.team-photo img { width: 100%; height: 310px; object-fit: cover; object-position: center 48%; border-radius: 16px; }
.team-photo figcaption { color: #d2cfc6; margin-top: 9px; font-size: .83rem; }
.photo-dialog { border: 1px solid #4c4b47; border-radius: 16px; background: #1b1b19; color: white; padding: 16px; width: min(1050px, calc(100% - 24px)); max-height: calc(100dvh - 24px); }
.photo-dialog::backdrop { background: #080807e8; }
.photo-dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 12px; }
.photo-dialog h2 { font-size: 1.1rem; line-height: 1.4; letter-spacing: 0; margin: 0; }
.photo-dialog button { font: inherit; cursor: pointer; min-width: 44px; min-height: 44px; border: 1px solid #72716b; border-radius: 8px; background: #2d2d2a; color: white; padding: 8px 13px; }
.photo-dialog button:hover { background: #484740; }
.photo-dialog figure { margin: 0; }
.photo-dialog img { display: block; width: 100%; height: min(70dvh, 820px); object-fit: contain; }
.photo-dialog figcaption { font-size: .88rem; line-height: 1.4; padding: 13px 0 5px; color: #e1dfd7; }
.photo-dialog-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.photo-dialog-count { font-size: .84rem; color: #c9c6bb; }
body.gallery-open { overflow: hidden; }
@media (max-width: 1050px) { .navlinks { gap: 16px; } }
@media (max-width: 900px) {
  .projects-section .section-head { grid-template-columns: 1fr; gap: 24px; }
  .work-heading { display: block; }
  .work-heading p { margin-top: 15px; max-width: 620px; }
  .work-photo-link img { height: 430px; }
  .work-pair.bathroom img { height: 340px; }
  .work-details-grid { gap: 14px; }
  .work-details-grid img { height: 310px; }
  .work-progress-grid img { height: 290px; }
}
@media (max-width: 620px) {
  [id] { scroll-margin-top: 98px; }
  .work-nav { margin-bottom: 28px; gap: 8px; }
  .work-nav a { padding: 8px 12px; font-size: .82rem; }
  .work-story { padding: 17px; border-radius: 17px; }
  .work-heading { margin-bottom: 20px; }
  .work-pair, .work-pair.bathroom, .work-progress-grid, .work-details-grid { grid-template-columns: 1fr; gap: 25px; }
  .work-photo-link img, .work-pair.bathroom img, .work-details-grid img { height: auto; max-height: none; aspect-ratio: auto; object-fit: contain; }
  .work-progress-grid img { height: auto; }
  .work-stage { top: 12px; left: 12px; }
  .work-progress summary span { display: block; margin: 5px 0 0; }
  .work-details { padding-top: 26px; }
  .work-cta { margin-top: 30px; }
  .work-cta .btn { width: 100%; }
  .photo-dialog { padding: 12px; }
  .photo-dialog img { height: 60dvh; }
  .photo-dialog h2 { font-size: .92rem; }
  .instagram-card { padding: 22px; }
  .instagram-embed { padding: 6px; }
  .instagram-embed .instagram-media { min-width: 0!important; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto!important; } }
